hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790594ceb0379d0282ab529d7d592d700eff1a8c
6,702
py
Python
syslog.py
Bun/ha-syslog-devtracker
c789679dee8d9e07616a9661ac05d3663eb0b4b9
[ "MIT" ]
null
null
null
syslog.py
Bun/ha-syslog-devtracker
c789679dee8d9e07616a9661ac05d3663eb0b4b9
[ "MIT" ]
null
null
null
syslog.py
Bun/ha-syslog-devtracker
c789679dee8d9e07616a9661ac05d3663eb0b4b9
[ "MIT" ]
1
2019-11-21T09:40:36.000Z
2019-11-21T09:40:36.000Z
""" Support for Syslog-based networking devices. For now, support is limited to hostapd and dnsmasq. Example syslog lines: <30>Dec 31 13:03:21 router hostapd: wlan1: STA a4:77:33:e3:17:7c WPA: group key handshake completed (RSN) <29>Dec 31 13:05:15 router hostapd: wlan0: AP-STA-CONNECTED 64:20:0c:37:52:82 ...
35.089005
137
0.609669
from asyncio import coroutine from collections import namedtuple from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.device_tracker import PLATFORM_SCHEMA, SOURCE_TYPE_ROUTER from homeassistant.const import CONF_HOST, CONF_PORT, CONF_DEVICES from homeassistant.helpers....
true
true
790595cff4f39bec191db0f87f33bacf84dd9dd8
1,008
py
Python
preprocess/watershed.py
essential2189/Cell-Based-Model
f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e
[ "MIT" ]
null
null
null
preprocess/watershed.py
essential2189/Cell-Based-Model
f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e
[ "MIT" ]
null
null
null
preprocess/watershed.py
essential2189/Cell-Based-Model
f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e
[ "MIT" ]
null
null
null
#-*-coding:utf-8-*- import numpy as np import cv2 import gc from tqdm import tqdm def watershed(opencv_image): top_n_label = 2 gray = cv2.cvtColor(opencv_image, cv2.COLOR_BGR2GRAY) print('convert gray end') gray[gray == 0] = 255 _, cvt_img = cv2.threshold(gray, 225, 255, cv2.THRESH_BINARY_INV) ...
21.446809
88
0.641865
import numpy as np import cv2 import gc from tqdm import tqdm def watershed(opencv_image): top_n_label = 2 gray = cv2.cvtColor(opencv_image, cv2.COLOR_BGR2GRAY) print('convert gray end') gray[gray == 0] = 255 _, cvt_img = cv2.threshold(gray, 225, 255, cv2.THRESH_BINARY_INV) del(gray) p...
true
true
790595dd224074cc2fcfbece35f8a00f05b5ad51
2,192
py
Python
setup.py
GenusGeoff/tiingo-python
969cbca4124b0ad366d476ea55a31e55677aea7c
[ "MIT" ]
null
null
null
setup.py
GenusGeoff/tiingo-python
969cbca4124b0ad366d476ea55a31e55677aea7c
[ "MIT" ]
null
null
null
setup.py
GenusGeoff/tiingo-python
969cbca4124b0ad366d476ea55a31e55677aea7c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script. Based on Jeff Knupp's Demo + Cookiecutter""" import io import os from setuptools import setup, find_packages def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filenam...
27.4
67
0.654197
import io import os from setuptools import setup, find_packages def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filename in filenames: with io.open(filename, encoding=encoding) as f: buf.append(f.read()) r...
true
true
7905967b16f5e68d83f5d748d613ba0a86cdfb67
15,637
py
Python
sdk/python/pulumi_azure_native/documentdb/v20210615/private_endpoint_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/private_endpoint_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/private_endpoint_connection.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "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, overload from ... import _utilities fro...
53.00678
1,676
0.703716
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._inputs import * __all__ = ['PrivateEndpointConnectionArgs', 'PrivateEndpointConnection'] @pulumi.input_type class PrivateEndpointConnecti...
true
true
790596a93c5dcc1ad2ee157fcfea3482b9f652a8
7,032
py
Python
configs/litehrnet/ocr_litehrxv3_split_aux-border_256x256_40k_hrf_amsoftmax.py
openvinotoolkit/mmsegmentation
9f50fc158be50594ea4aecf0a07ea652c91ec846
[ "Apache-2.0" ]
3
2021-12-21T07:25:13.000Z
2022-02-07T01:59:19.000Z
configs/litehrnet/ocr_litehrxv3_split_aux-border_256x256_40k_hrf_amsoftmax.py
openvinotoolkit/mmsegmentation
9f50fc158be50594ea4aecf0a07ea652c91ec846
[ "Apache-2.0" ]
13
2021-12-10T15:08:56.000Z
2022-03-23T08:58:03.000Z
configs/litehrnet/ocr_litehrxv3_split_aux-border_256x256_40k_hrf_amsoftmax.py
evgeny-izutov/mmsegmentation
9f50fc158be50594ea4aecf0a07ea652c91ec846
[ "Apache-2.0" ]
3
2021-11-11T23:16:51.000Z
2021-12-08T23:49:29.000Z
_base_ = [ '../_base_/models/fcn_litehrxv3_no-aggregator.py', '../_base_/datasets/hrf_extra.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_step_40k_ml.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='CascadeEncoderDecoder', num_stages=2, decode_head=[...
35.695431
89
0.436576
_base_ = [ '../_base_/models/fcn_litehrxv3_no-aggregator.py', '../_base_/datasets/hrf_extra.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_step_40k_ml.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='CascadeEncoderDecoder', num_stages=2, decode_head=[...
true
true
790597103a8919f936e95edf5d4fa370cb587876
3,459
py
Python
main.py
nicksacco17/Quantum_Information
c1ee8369f34a9b78a7360cd68b6f2da082266d4a
[ "MIT" ]
null
null
null
main.py
nicksacco17/Quantum_Information
c1ee8369f34a9b78a7360cd68b6f2da082266d4a
[ "MIT" ]
null
null
null
main.py
nicksacco17/Quantum_Information
c1ee8369f34a9b78a7360cd68b6f2da082266d4a
[ "MIT" ]
1
2022-03-17T00:45:04.000Z
2022-03-17T00:45:04.000Z
from PauliInteraction import PauliInteraction from Ising import Ising from CoefficientGenerator import CoefficientGenerator from Evaluator import Evaluator #from DataVisualizer import DataVisualizer #from DataLogger import DataLogger import Driver as Driver_H from MasterEquation import MasterEquation from QuantumAn...
26.007519
94
0.665799
from PauliInteraction import PauliInteraction from Ising import Ising from CoefficientGenerator import CoefficientGenerator from Evaluator import Evaluator import Driver as Driver_H from MasterEquation import MasterEquation from QuantumAnnealer import QuantumAnnealer from Test import test import qutip as qp im...
true
true
790597b07fa152bf367fe83a10426b36ad3170a5
5,922
py
Python
ServidorPython/python32_web/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
25
2019-03-08T01:03:03.000Z
2022-02-14T17:38:32.000Z
ServidorPython/python32_web/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
9
2020-09-25T22:32:02.000Z
2022-02-09T23:45:10.000Z
ServidorPython/python32_web/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
31
2019-01-15T20:16:50.000Z
2022-03-01T05:47:38.000Z
import numpy as np import pytest from sklearn.datasets import make_classification, make_regression # To use this experimental feature, we need to explicitly ask for it: from sklearn.experimental import enable_hist_gradient_boosting # noqa from sklearn.ensemble import HistGradientBoostingRegressor from sklearn.ensembl...
40.013514
79
0.647248
import numpy as np import pytest from sklearn.datasets import make_classification, make_regression from sklearn.experimental import enable_hist_gradient_boosting from sklearn.ensemble import HistGradientBoostingRegressor from sklearn.ensemble import HistGradientBoostingClassifier X_classification, y_classificatio...
true
true
790598542ab2923ee70838942a0a01cb700db6ad
1,688
py
Python
env/lib/python3.8/site-packages/flask_cli/ext.py
thenack/sneaky
40bd9ae5004f49d7e3614ad9ec025a8f6bf2bced
[ "MIT" ]
null
null
null
env/lib/python3.8/site-packages/flask_cli/ext.py
thenack/sneaky
40bd9ae5004f49d7e3614ad9ec025a8f6bf2bced
[ "MIT" ]
null
null
null
env/lib/python3.8/site-packages/flask_cli/ext.py
thenack/sneaky
40bd9ae5004f49d7e3614ad9ec025a8f6bf2bced
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Flask-CLI # Copyright (C) 2015 CERN. # # Flask-AppFactory is free software; you can redistribute it and/or # modify it under the terms of the Revised BSD License; see LICENSE # file for more details. """Flask extension to enable CLI.""" import types from . import AppG...
28.133333
77
0.635664
import types from . import AppGroup class FlaskCLI(object): def __init__(self, app=None): if app is not None: self.init_app(app) def init_app(self, app): if not hasattr(app, 'extensions'): app.extensions = {} if 'flask-cli' in app.extension...
true
true
7905992b8e0da560c43dd071c06f5397e8beae9c
157
py
Python
Curso de Cisco/Actividades/py/packages/extra/good/best/tau.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
Curso de Cisco/Actividades/py/packages/extra/good/best/tau.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
Curso de Cisco/Actividades/py/packages/extra/good/best/tau.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 """ example module: extra.good.best.tau """ def FunT(): return "Tau" if __name__ == "__main__": print("I prefer to be a module")
17.444444
43
0.649682
def FunT(): return "Tau" if __name__ == "__main__": print("I prefer to be a module")
true
true
790599540b04918bead3ef7fe0b70e4fe69c4eea
833
py
Python
increment_build.py
EpicSalvation/FlutterStep
02fa2a2b90a9cbd7ced909f35d102162b61878dd
[ "MIT" ]
null
null
null
increment_build.py
EpicSalvation/FlutterStep
02fa2a2b90a9cbd7ced909f35d102162b61878dd
[ "MIT" ]
null
null
null
increment_build.py
EpicSalvation/FlutterStep
02fa2a2b90a9cbd7ced909f35d102162b61878dd
[ "MIT" ]
null
null
null
# Simple script for updating the build number in pubspec.yaml import re # Regex patter to be used to ID the correct line in pubspec.yaml version_line_pattern = "version:\s+\d+\.\d+\.\d+\+\d+" # Open pubspec.yaml and read lines into memory with open("pubspec.yaml", "r") as current_pubspec: contents = current_pubsp...
33.32
88
0.662665
import re version_line_pattern = "version:\s+\d+\.\d+\.\d+\+\d+" with open("pubspec.yaml", "r") as current_pubspec: contents = current_pubspec.readlines() with open("pubspec.yaml", "w") as updated_pubspec: counter = 0 for line in contents: if re.match(pattern=version_line_pattern, s...
true
true
79059b816d2f7a07a401a5eb9830e2585100cdd9
843
py
Python
projeto/urls.py
godah/s2b-python
e07aed1bec015ee13e33367bde827e6d7b66dd7d
[ "MIT" ]
null
null
null
projeto/urls.py
godah/s2b-python
e07aed1bec015ee13e33367bde827e6d7b66dd7d
[ "MIT" ]
null
null
null
projeto/urls.py
godah/s2b-python
e07aed1bec015ee13e33367bde827e6d7b66dd7d
[ "MIT" ]
null
null
null
"""projeto URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
33.72
79
0.698695
from django.conf.urls import url from django.contrib import admin from blog import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.index), ]
true
true
79059bc7c9641a5ddc0475c06968ca053e13e8a2
30,329
py
Python
Lib/test/test_capi.py
kmoza/cpython
fd93ae0c03a087e73dfcfb9995678223f6f16c1c
[ "CNRI-Python-GPL-Compatible" ]
1
2020-10-09T12:23:54.000Z
2020-10-09T12:23:54.000Z
Lib/test/test_capi.py
kmoza/cpython
fd93ae0c03a087e73dfcfb9995678223f6f16c1c
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_capi.py
kmoza/cpython
fd93ae0c03a087e73dfcfb9995678223f6f16c1c
[ "CNRI-Python-GPL-Compatible" ]
1
2020-10-09T12:23:55.000Z
2020-10-09T12:23:55.000Z
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. from collections import OrderedDict import os import pickle import random import re import subprocess import sys import textwrap import threading import time import unitt...
40.492657
106
0.601141
from collections import OrderedDict import os import pickle import random import re import subprocess import sys import textwrap import threading import time import unittest import weakref from test import support from test.support import MISSING_C_DOCSTRINGS from test.support.script_helper import assert_python_fail...
true
true
79059cac0c226a2ed8528429f8d6cceb48ac6300
128
py
Python
run.py
siketh/TRBlog
39855f23cee5c5639360374fa2c6ec5325321450
[ "MIT" ]
null
null
null
run.py
siketh/TRBlog
39855f23cee5c5639360374fa2c6ec5325321450
[ "MIT" ]
18
2016-06-21T04:30:14.000Z
2016-09-27T23:07:41.000Z
run.py
siketh/trevorroman-dot-com
39855f23cee5c5639360374fa2c6ec5325321450
[ "MIT" ]
null
null
null
#!flask/bin/python from app import app from config import DEBUG_MODE if __name__ == '__main__': app.run(debug=DEBUG_MODE)
16
29
0.742188
from app import app from config import DEBUG_MODE if __name__ == '__main__': app.run(debug=DEBUG_MODE)
true
true
79059fdd31f7d9e39fa492d14cec49f11c28129d
4,490
py
Python
howtolens/simulators/chapter_2/mass_sis__source_exp_x2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
howtolens/simulators/chapter_2/mass_sis__source_exp_x2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
howtolens/simulators/chapter_2/mass_sis__source_exp_x2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
from os import path import autolens as al """ This script simulates `Imaging` of a strong lens where: - The lens `Galaxy`'s total mass distribution is a *SphericalIsothermal*. - The source `Galaxy`'s `LightProfile` is a *SphericalExponential*. This dataset is used in chapter 2, tutorials 1-3. """ ...
37.107438
120
0.73029
from os import path import autolens as al dataset_type = "chapter_2" dataset_name = "mass_sis__source_exp_x2" dataset_path = path.join("dataset", "howtolens", dataset_type, dataset_name) grid = al.GridIterate.uniform( shape_2d=(100, 100), pixel_scales=0.1, fractional_accuracy=0.9999, ...
true
true
7905a02a3cf0e9f09ead09edf2fa29945dc8cdb3
1,260
py
Python
apps/api/serializers.py
azengard/reseller-api
6f08be4a63bb4e267d49f7368d2d8404c5b84230
[ "MIT" ]
null
null
null
apps/api/serializers.py
azengard/reseller-api
6f08be4a63bb4e267d49f7368d2d8404c5b84230
[ "MIT" ]
null
null
null
apps/api/serializers.py
azengard/reseller-api
6f08be4a63bb4e267d49f7368d2d8404c5b84230
[ "MIT" ]
null
null
null
from django.core.exceptions import ObjectDoesNotExist from rest_framework.serializers import PrimaryKeyRelatedField, RelatedField class UniqueRelatedField(RelatedField): """ Like rest_framework's PrimaryKeyRelatedField, but selecting by any unique field instead of the primary key. """ default_err...
38.181818
81
0.711111
from django.core.exceptions import ObjectDoesNotExist from rest_framework.serializers import PrimaryKeyRelatedField, RelatedField class UniqueRelatedField(RelatedField): default_error_messages = PrimaryKeyRelatedField.default_error_messages.copy() def __init__(self, field_name, serializer_field=None, **kwar...
true
true
7905a0da55cd59454211170ef0459873b054418e
107
py
Python
jgsnippets/strings/__init__.py
jgontrum/snippets
a23bd196cc24b8163d83d9daca3fb60bc67eabcf
[ "MIT" ]
1
2017-06-05T08:41:24.000Z
2017-06-05T08:41:24.000Z
jgsnippets/strings/__init__.py
jgontrum/snippets
a23bd196cc24b8163d83d9daca3fb60bc67eabcf
[ "MIT" ]
1
2021-06-01T21:53:53.000Z
2021-06-01T21:53:53.000Z
jgsnippets/strings/__init__.py
jgontrum/snippets
a23bd196cc24b8163d83d9daca3fb60bc67eabcf
[ "MIT" ]
null
null
null
from jgsnippets.strings.encoding import clean_encoding from jgsnippets.strings.format import jprint, pprint
53.5
54
0.878505
from jgsnippets.strings.encoding import clean_encoding from jgsnippets.strings.format import jprint, pprint
true
true
7905a0e03ce59fc1400be1265522fcc3a438b37d
19,122
py
Python
Unsupervised-Learning/rbm.py
gajeraj/MLSA-workshops-2020-student
cafbf5ac8750dd2b962174ad71dabf35ac90e2f4
[ "MIT" ]
5
2020-02-27T07:04:44.000Z
2021-06-03T17:20:55.000Z
Unsupervised-Learning/rbm.py
Phoebe0222/MLSA-workshops-2019-student
cafbf5ac8750dd2b962174ad71dabf35ac90e2f4
[ "MIT" ]
null
null
null
Unsupervised-Learning/rbm.py
Phoebe0222/MLSA-workshops-2019-student
cafbf5ac8750dd2b962174ad71dabf35ac90e2f4
[ "MIT" ]
9
2019-08-09T12:08:28.000Z
2019-10-16T06:35:22.000Z
import tensorflow as tf import numpy as np import os import matplotlib.pyplot as plt from tqdm import tqdm class RBM(object): def __init__(self,num_visible,num_hidden,visible_unit_type='bin',main_dir='/Users/chamalgomes/Documents/Python/GitLab/DeepLearning/KAI PROJECT/rbm/models', model_na...
38.474849
354
0.633459
import tensorflow as tf import numpy as np import os import matplotlib.pyplot as plt from tqdm import tqdm class RBM(object): def __init__(self,num_visible,num_hidden,visible_unit_type='bin',main_dir='/Users/chamalgomes/Documents/Python/GitLab/DeepLearning/KAI PROJECT/rbm/models', model_na...
true
true
7905a14b3082687027c806486229180e9f17e8c2
6,386
py
Python
tests/report/test_report_test.py
data-mermaid/golem
06bbb33275a9f79cd7cc30a0e264b9bafdad3073
[ "MIT" ]
null
null
null
tests/report/test_report_test.py
data-mermaid/golem
06bbb33275a9f79cd7cc30a0e264b9bafdad3073
[ "MIT" ]
null
null
null
tests/report/test_report_test.py
data-mermaid/golem
06bbb33275a9f79cd7cc30a0e264b9bafdad3073
[ "MIT" ]
null
null
null
import json import os from golem.core import utils from golem.test_runner import test_runner from golem.report.execution_report import create_execution_directory from golem.report.execution_report import create_execution_dir_single_test from golem.report import test_report from golem.report.test_report import get_tes...
41.2
96
0.628406
import json import os from golem.core import utils from golem.test_runner import test_runner from golem.report.execution_report import create_execution_directory from golem.report.execution_report import create_execution_dir_single_test from golem.report import test_report from golem.report.test_report import get_tes...
true
true
7905a36d029e7a8f3c5f4b1ec7b16c66f9b20769
3,538
py
Python
src/ZServer/medusa/monitor_client.py
tseaver/Zope-RFA
08634f39b0f8b56403a2a9daaa6ee4479ef0c625
[ "ZPL-2.1" ]
2
2015-12-21T10:34:56.000Z
2017-09-24T11:07:58.000Z
src/ZServer/medusa/monitor_client.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
src/ZServer/medusa/monitor_client.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
# -*- Mode: Python; tab-width: 4 -*- # monitor client, unix version. import asyncore import asynchat import regsub import socket import string import sys import os import time try: from hashlib import md5 except: from md5 import new as md5 class stdin_channel (asyncore.file_dispatcher): def handle_read ...
27.215385
91
0.546354
import asyncore import asynchat import regsub import socket import string import sys import os import time try: from hashlib import md5 except: from md5 import new as md5 class stdin_channel (asyncore.file_dispatcher): def handle_read (self): data = self.recv(512) if not data: ...
false
true
7905a3b0bc4c122e96bdc46836294cf150d4da7d
4,995
py
Python
var/spack/repos/builtin/packages/cbtf-argonavis/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-09-15T23:55:48.000Z
2019-09-15T23:55:48.000Z
var/spack/repos/builtin/packages/cbtf-argonavis/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/cbtf-argonavis/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2017-01-21T17:19:32.000Z
2017-01-21T17:19:32.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class CbtfArgonavis(CMakePackage): """CBTF Argo Navis project contains the CUDA collector and su...
41.280992
110
0.603003
from spack import * class CbtfArgonavis(CMakePackage): homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" git = "https://github.com/OpenSpeedShop/cbtf-argonavis.git" version('develop', branch='master') version('1.9.3', branch='1.9.3') version('1.9.2', branch='1.9.2') version('1.9...
true
true
7905a3ba74bd26df0decc455f3ac247fafe88384
1,551
py
Python
indico/core/settings/models/settings.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/core/settings/models/settings.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/core/settings/models/settings.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico...
29.826923
96
0.727917
from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico.core.db.sqlalchemy import db from indico.core.db.sqlalchemy.util.models import auto_table_args from indico.core.settings.models.base import JSONSettingsBase, PrincipalSettingsBase from indico.util.decorator...
true
true
7905a491fef8d48c70a33fdb2c698e4d60d37834
5,512
py
Python
tests/metrics/test_metrics.py
GueroudjiAmal/dask-ml
54a8913bfb22775c72ffd781bf29d6e53b5dd363
[ "BSD-3-Clause" ]
803
2017-06-16T02:08:30.000Z
2022-03-28T14:02:25.000Z
tests/metrics/test_metrics.py
GueroudjiAmal/dask-ml
54a8913bfb22775c72ffd781bf29d6e53b5dd363
[ "BSD-3-Clause" ]
748
2017-09-24T20:32:33.000Z
2022-03-28T18:49:27.000Z
tests/metrics/test_metrics.py
GueroudjiAmal/dask-ml
54a8913bfb22775c72ffd781bf29d6e53b5dd363
[ "BSD-3-Clause" ]
250
2017-06-15T15:57:18.000Z
2022-03-25T08:31:02.000Z
import dask import dask.array as da import numpy as np import numpy.testing as npt import pytest import sklearn import sklearn.linear_model import sklearn.metrics from dask.array.utils import assert_eq import dask_ml.metrics import dask_ml.wrappers def test_pairwise_distances(X_blobs): centers = X_blobs[::100].c...
31.141243
88
0.662917
import dask import dask.array as da import numpy as np import numpy.testing as npt import pytest import sklearn import sklearn.linear_model import sklearn.metrics from dask.array.utils import assert_eq import dask_ml.metrics import dask_ml.wrappers def test_pairwise_distances(X_blobs): centers = X_blobs[::100].c...
true
true
7905a5d753bcd672a340bd2a4c3eafdb6f4ef789
1,381
py
Python
setup.py
Roming22/python-k3x
ce127b22fd88f9edf98c0959ae5abfd579f8ce32
[ "MIT" ]
null
null
null
setup.py
Roming22/python-k3x
ce127b22fd88f9edf98c0959ae5abfd579f8ce32
[ "MIT" ]
null
null
null
setup.py
Roming22/python-k3x
ce127b22fd88f9edf98c0959ae5abfd579f8ce32
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="pyk3x", author="Roming22", author_email="roming22@gmail.com", description="API to simplify k3d deployments", keywords="kuberbetes, k3s, k3d, k3x, cluster", long_descr...
35.410256
66
0.6126
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="pyk3x", author="Roming22", author_email="roming22@gmail.com", description="API to simplify k3d deployments", keywords="kuberbetes, k3s, k3d, k3x, cluster", long_descr...
true
true
7905a6207f544c242111412b4bbc16073524ac14
12,391
py
Python
multigrid/patch1d.py
python-hydro/hydro_examples
55b7750a7644f3e2187f7fe338b6bc1d6fb9c139
[ "BSD-3-Clause" ]
66
2018-09-01T10:44:07.000Z
2022-03-26T23:50:57.000Z
multigrid/patch1d.py
python-hydro/hydro_examples
55b7750a7644f3e2187f7fe338b6bc1d6fb9c139
[ "BSD-3-Clause" ]
null
null
null
multigrid/patch1d.py
python-hydro/hydro_examples
55b7750a7644f3e2187f7fe338b6bc1d6fb9c139
[ "BSD-3-Clause" ]
39
2018-09-06T20:02:14.000Z
2022-02-27T17:05:24.000Z
""" The patch module allows for a grid to be created and for data to be defined on that grid. Typical usage: -- create the grid grid = Grid1d(nx) -- create the data that lives on that grid data = CellCenterData1d(grid) bcObj = bcObject(xlb="reflect", xrb="reflect"_ data.registerVar("densi...
28.161364
84
0.548463
from __future__ import print_function import sys import numpy valid = ["outflow", "periodic", "reflect", "reflect-even", "reflect-odd", "dirichlet", "neumann"] class BCObject(object): def __init__(self, xlb="outflow", xrb="outflow", odd_reflect_dir=""): ...
true
true
7905a7207409a36e542edd41a689eb3240d45b7e
432
py
Python
kyu_7/fun_with_lists_length/length.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
1
2022-02-12T05:56:04.000Z
2022-02-12T05:56:04.000Z
kyu_7/fun_with_lists_length/length.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
182
2020-04-30T00:51:36.000Z
2021-09-07T04:15:05.000Z
kyu_7/fun_with_lists_length/length.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
4
2020-04-29T22:04:20.000Z
2021-07-13T20:04:14.000Z
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ def length(head) -> int: """ The method length, which accepts a linked list (head), and returns the length of the list. :param head: :return: """ i = 0 if head is Non...
18.782609
53
0.581019
def length(head) -> int: i = 0 if head is None: return 0 while head.next is not None: head = head.next i += 1 return i + 1
true
true
7905a72b145a810969c9606e314671b690aa0c55
1,741
py
Python
mf_localization_mapping/script/check_topic_size.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
14
2020-12-05T17:15:57.000Z
2022-02-09T05:51:09.000Z
mf_localization_mapping/script/check_topic_size.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
22
2021-02-25T06:56:23.000Z
2022-03-16T13:15:45.000Z
mf_localization_mapping/script/check_topic_size.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
7
2021-01-05T16:07:59.000Z
2022-03-24T02:48:14.000Z
#!/usr/bin/env python # Copyright (c) 2021 IBM Corporation # # 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, mod...
37.847826
80
0.746123
import sys import argparse import rosbag def main(): parser = argparse.ArgumentParser() parser.add_argument("-i","--input_bag", required=True) args = parser.parse_args() input_bag = args.input_bag topic_size_dict = {} for topic, msg, time in rosbag.Bag(input_bag, 'r').read_messages(...
true
true
7905a8b87ee2f87d608a2f25985e31a7375aa98a
10,501
py
Python
baselines/deepq/simple.py
hyperdo/python2-baselines
ef2319bb18fa694ff8db34b667fb3702acebe608
[ "MIT" ]
1
2018-04-02T12:48:29.000Z
2018-04-02T12:48:29.000Z
baselines/deepq/simple.py
hyperdo/python2-baselines
ef2319bb18fa694ff8db34b667fb3702acebe608
[ "MIT" ]
null
null
null
baselines/deepq/simple.py
hyperdo/python2-baselines
ef2319bb18fa694ff8db34b667fb3702acebe608
[ "MIT" ]
null
null
null
from backports import tempfile import numpy as np import os import dill import tensorflow as tf import zipfile import baselines.common.tf_util as U from build_graph import build_act, build_train from baselines import logger from baselines.common.schedules import LinearSchedule from baselines.deepq.replay_buffer impor...
39.182836
100
0.622322
from backports import tempfile import numpy as np import os import dill import tensorflow as tf import zipfile import baselines.common.tf_util as U from build_graph import build_act, build_train from baselines import logger from baselines.common.schedules import LinearSchedule from baselines.deepq.replay_buffer impor...
true
true
7905a92b2cab45b06ea81128cfdb3ad4bc8d66c9
1,740
py
Python
jhu2json.py
florath/jhu2db
a20b75fff505cde3d2c3364943f7a535c962029f
[ "MIT" ]
1
2020-03-21T12:34:18.000Z
2020-03-21T12:34:18.000Z
jhu2json.py
florath/jhu2db
a20b75fff505cde3d2c3364943f7a535c962029f
[ "MIT" ]
null
null
null
jhu2json.py
florath/jhu2db
a20b75fff505cde3d2c3364943f7a535c962029f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import csv import os import argparse import dateutil.parser import json def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("-d", "--dir", type=str, required=True, help="name of the data directory") args = parser.parse_args() return ar...
27.619048
71
0.486782
import csv import os import argparse import dateutil.parser import json def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("-d", "--dir", type=str, required=True, help="name of the data directory") args = parser.parse_args() return args.dir def convert_t...
true
true
7905a96a80489b073db37932d98171c80d9ae352
9,983
py
Python
.env/lib/python2.7/site-packages/skimage/segmentation/boundaries.py
ViduraPrasangana/faster-rcnn-caffe
af6f5ee89c6e82d295bddd192d9dfcebd60d7c52
[ "MIT" ]
1
2019-05-24T00:46:48.000Z
2019-05-24T00:46:48.000Z
.env/lib/python2.7/site-packages/skimage/segmentation/boundaries.py
ViduraPrasangana/faster-rcnn-caffe
af6f5ee89c6e82d295bddd192d9dfcebd60d7c52
[ "MIT" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
.env/lib/python2.7/site-packages/skimage/segmentation/boundaries.py
ViduraPrasangana/faster-rcnn-caffe
af6f5ee89c6e82d295bddd192d9dfcebd60d7c52
[ "MIT" ]
2
2020-03-12T23:20:22.000Z
2021-02-15T21:54:02.000Z
from __future__ import division import numpy as np from scipy import ndimage as ndi from ..morphology import dilation, erosion, square from ..util import img_as_float, view_as_windows from ..color import gray2rgb def _find_boundaries_subpixel(label_img): """See ``find_boundaries(..., mode='subpixel')``. Not...
43.030172
83
0.54102
from __future__ import division import numpy as np from scipy import ndimage as ndi from ..morphology import dilation, erosion, square from ..util import img_as_float, view_as_windows from ..color import gray2rgb def _find_boundaries_subpixel(label_img): ndim = label_img.ndim max_label = np.iinfo(label_img.d...
true
true
7905a9f05612e87150b5fddeb7b0bb5e45bc8397
1,882
py
Python
network/r2unet.py
nitsaick/pytorch-kit
ebbbc228e2dbae37a055de0d40580140d5a51613
[ "MIT" ]
null
null
null
network/r2unet.py
nitsaick/pytorch-kit
ebbbc228e2dbae37a055de0d40580140d5a51613
[ "MIT" ]
null
null
null
network/r2unet.py
nitsaick/pytorch-kit
ebbbc228e2dbae37a055de0d40580140d5a51613
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from .subnet import DoubleConv, UpConv, RRCU class R2UNet(nn.Module): def __init__(self, in_ch, out_ch, base_ch=64): super(R2UNet, self).__init__() self.inc = DoubleConv(in_ch, base_ch) self.down = nn.MaxPool2d(kernel_size=2, stride=2) self.down1...
31.898305
82
0.529756
import torch import torch.nn as nn from .subnet import DoubleConv, UpConv, RRCU class R2UNet(nn.Module): def __init__(self, in_ch, out_ch, base_ch=64): super(R2UNet, self).__init__() self.inc = DoubleConv(in_ch, base_ch) self.down = nn.MaxPool2d(kernel_size=2, stride=2) self.down1...
true
true
7905aabd38f2235115baeb561706b6e995761b90
350
py
Python
tests/RST304/sphinx-roles.py
xmo-odoo/flake8-rst-docstrings
1a6296bbd384584a013e1782ccdc7b260ff9f392
[ "MIT" ]
39
2017-06-16T16:16:51.000Z
2022-03-24T09:12:18.000Z
tests/RST304/sphinx-roles.py
xmo-odoo/flake8-rst-docstrings
1a6296bbd384584a013e1782ccdc7b260ff9f392
[ "MIT" ]
47
2017-08-07T13:40:15.000Z
2021-12-09T15:43:49.000Z
tests/RST304/sphinx-roles.py
xmo-odoo/flake8-rst-docstrings
1a6296bbd384584a013e1782ccdc7b260ff9f392
[ "MIT" ]
7
2019-04-22T21:06:02.000Z
2021-08-29T02:52:43.000Z
"""Example reStructuredText from Sphinx-Needs project. From http://sphinxcontrib-needs.readthedocs.io/en/latest/ but will not work in isolation - cut down just to trigger RST304. **Some text** Wohooo, we have created :need:`req_001`, which is linked by :need_incoming:`req_001`. """ print("sphinx-needs defines its ...
23.333333
61
0.76
print("sphinx-needs defines its own reStructuredText roles.")
true
true
7905ab6d01b3adadea9b58403c0e70acfcba205c
15,704
py
Python
src/mtl_trainer.py
Daupler/CA-MTL
d417b039dee973e32f42ba5c1c346738cd29ab3c
[ "MIT" ]
null
null
null
src/mtl_trainer.py
Daupler/CA-MTL
d417b039dee973e32f42ba5c1c346738cd29ab3c
[ "MIT" ]
1
2021-04-21T14:40:27.000Z
2021-04-21T14:40:27.000Z
src/mtl_trainer.py
Daupler/CA-MTL
d417b039dee973e32f42ba5c1c346738cd29ab3c
[ "MIT" ]
null
null
null
import os import json import logging from dataclasses import dataclass, field from typing import Dict, Optional, Callable import torch import wandb import numpy as np from tqdm.auto import tqdm from torch.utils.data.dataloader import DataLoader from torch.utils.data.dataset import Dataset from torch.utils.data.distrib...
38.967742
118
0.550369
import os import json import logging from dataclasses import dataclass, field from typing import Dict, Optional, Callable import torch import wandb import numpy as np from tqdm.auto import tqdm from torch.utils.data.dataloader import DataLoader from torch.utils.data.dataset import Dataset from torch.utils.data.distrib...
true
true
7905abd81c34c0bde58188ec1e551bd22db1d430
4,454
py
Python
indicator/config.py
amitkumarj441/Cryptocoin-Price-Indicator
01ee6d91eb49537aca06f16cc5faad755947332d
[ "Apache-2.0" ]
null
null
null
indicator/config.py
amitkumarj441/Cryptocoin-Price-Indicator
01ee6d91eb49537aca06f16cc5faad755947332d
[ "Apache-2.0" ]
null
null
null
indicator/config.py
amitkumarj441/Cryptocoin-Price-Indicator
01ee6d91eb49537aca06f16cc5faad755947332d
[ "Apache-2.0" ]
null
null
null
import os import json CONFIG_FILE_PATH = os.path.expanduser("~/.coinbase-indicator") GENERAL_OPTION_KEY = 'general' OPTION_KEY_LARGE_LABEL = 'show_crypto_currency_in_the_label' OPTION_KEY_NOTIFICATION = 'show_notifications' OPTION_KEY_THEME_MONOCHROME = 'theme_monochrome' CRYPTO_CURRENCY_OPTION_KEY = 'crypto_currenc...
39.415929
186
0.705658
import os import json CONFIG_FILE_PATH = os.path.expanduser("~/.coinbase-indicator") GENERAL_OPTION_KEY = 'general' OPTION_KEY_LARGE_LABEL = 'show_crypto_currency_in_the_label' OPTION_KEY_NOTIFICATION = 'show_notifications' OPTION_KEY_THEME_MONOCHROME = 'theme_monochrome' CRYPTO_CURRENCY_OPTION_KEY = 'crypto_currenc...
true
true
7905abd893d642df6c3947ec6a8c17887dc7f6bc
3,080
py
Python
data/p2DJ/New/program/qiskit/class/startQiskit_Class137.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/class/startQiskit_Class137.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/class/startQiskit_Class137.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=8 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as...
28.256881
80
0.620779
import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as nx def b...
true
true
7905ac76dfee129f62d3deb642e572b410d1f67a
1,518
py
Python
uni_ticket/migrations/0031_auto_20190521_1229.py
mspasiano/uniTicket
1e8e4c2274293e751deea5b8b1fb4116136c5641
[ "Apache-2.0" ]
null
null
null
uni_ticket/migrations/0031_auto_20190521_1229.py
mspasiano/uniTicket
1e8e4c2274293e751deea5b8b1fb4116136c5641
[ "Apache-2.0" ]
null
null
null
uni_ticket/migrations/0031_auto_20190521_1229.py
mspasiano/uniTicket
1e8e4c2274293e751deea5b8b1fb4116136c5641
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.1 on 2019-05-21 10:29 from django.db import migrations, models import uni_ticket.models class Migration(migrations.Migration): dependencies = [ ('uni_ticket', '0030_auto_20190520_1532'), ] operations = [ migrations.AlterField( model_name='ticketcate...
60.72
895
0.690382
from django.db import migrations, models import uni_ticket.models class Migration(migrations.Migration): dependencies = [ ('uni_ticket', '0030_auto_20190520_1532'), ] operations = [ migrations.AlterField( model_name='ticketcategoryinputlist', name='input_type', ...
true
true
7905ae4352442629717b7290801d8937671ce02e
19,189
py
Python
breaker_audio/component_cmn/synthesizer/hparams.py
kozzion/breaker_audio
0f27b3ae581fbeb8f79d0b8755a139f7438ca02b
[ "MIT", "BSD-3-Clause" ]
null
null
null
breaker_audio/component_cmn/synthesizer/hparams.py
kozzion/breaker_audio
0f27b3ae581fbeb8f79d0b8755a139f7438ca02b
[ "MIT", "BSD-3-Clause" ]
null
null
null
breaker_audio/component_cmn/synthesizer/hparams.py
kozzion/breaker_audio
0f27b3ae581fbeb8f79d0b8755a139f7438ca02b
[ "MIT", "BSD-3-Clause" ]
null
null
null
# from tensorflow.contrib.training import HParams # from aukit.audio_io import Dict2Obj from dotmap import DotMap import json class Dict2Obj(DotMap): """ 修正DotMap的get方法生成DotMap对象的bug。 Dict2Obj的get方法和dict的get功能相同。 """ def __getitem__(self, k): if k not in self._map: return None...
53.901685
143
0.691594
from dotmap import DotMap import json class Dict2Obj(DotMap): def __getitem__(self, k): if k not in self._map: return None else: return self._map[k] def parse(self, json_string): if json_string.strip(): _hp = json.loads(json_string) f...
true
true
7905afac64760f89be7efd42c89d662fe8709fed
1,633
py
Python
examples/example-hpmc.py
glotzerlab/garne
f9cb7bad391299e28feb4010eb77447fdc4512cb
[ "BSD-3-Clause" ]
4
2019-07-30T00:12:44.000Z
2020-03-03T19:58:34.000Z
examples/example-hpmc.py
glotzerlab/garne
f9cb7bad391299e28feb4010eb77447fdc4512cb
[ "BSD-3-Clause" ]
62
2019-07-29T20:05:46.000Z
2022-02-16T15:22:01.000Z
examples/example-hpmc.py
glotzerlab/garne
f9cb7bad391299e28feb4010eb77447fdc4512cb
[ "BSD-3-Clause" ]
2
2020-03-03T19:59:09.000Z
2021-03-22T14:48:56.000Z
# Copyright (c) 2020 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import garnett import hoomd import hoomd.hpmc # Vertices of a cube cube_verts = [[-1, -1, -1], [-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [1, -1, -1], [1, -1, 1], ...
34.020833
77
0.644825
import garnett import hoomd import hoomd.hpmc cube_verts = [[-1, -1, -1], [-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [1, -1, -1], [1, -1, 1], [1, 1, 1], [1, 1, -1]] with hoomd.context.SimulationContext(): box = hoomd.data.boxdim(L=10, dimensions=3) snapshot = hoomd.data.make_snapshot(N=4, box=bo...
true
true
7905aff6a945c8869807ad92a59d9cfa69b6e527
968
py
Python
powernad/Object/Ad/sub/AdFieldObject.py
devkingsejong/python---PowerNad
c308bba4cb31126ccd318e4574071f4057f5d23f
[ "CNRI-Python" ]
34
2017-03-16T14:32:49.000Z
2022-03-18T09:23:05.000Z
powernad/Object/Ad/sub/AdFieldObject.py
devkingsejong/python---PowerNad
c308bba4cb31126ccd318e4574071f4057f5d23f
[ "CNRI-Python" ]
16
2018-02-08T02:37:56.000Z
2022-03-15T13:45:34.000Z
powernad/Object/Ad/sub/AdFieldObject.py
devkingsejong/python---PowerNad
c308bba4cb31126ccd318e4574071f4057f5d23f
[ "CNRI-Python" ]
19
2017-03-28T21:48:18.000Z
2021-11-30T05:13:43.000Z
import json class AdFieldObject: def __init__(self, json_def = None): if type(json_def) is str: json_def = json.loads(json_def) s = json_def self.pc_display = None if 'pc' not in s else self.pc_display_easy(s['pc']) self.pc_final = None if 'pc' not in s else self...
35.851852
99
0.639463
import json class AdFieldObject: def __init__(self, json_def = None): if type(json_def) is str: json_def = json.loads(json_def) s = json_def self.pc_display = None if 'pc' not in s else self.pc_display_easy(s['pc']) self.pc_final = None if 'pc' not in s else self...
true
true
7905b0f232e10628c0a9a48e27924a106d398bd1
1,936
py
Python
lintcode/724.1.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
1
2021-01-08T06:57:49.000Z
2021-01-08T06:57:49.000Z
lintcode/724.1.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
null
null
null
lintcode/724.1.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
1
2021-01-08T06:57:52.000Z
2021-01-08T06:57:52.000Z
""" 724. Minimum Partition https://www.lintcode.com/problem/minimum-partition/description 01背包 算法班2020 C27 01背包变形 第1种dp定义 dp[i][j]: considering previous i items to fill <=j, what the maximum value dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - nums[i - 1]] + nums[i - 1]) dp[0][0] = 0 dp[i][0] = 0 answer max(dp[n]) 2d...
37.230769
823
0.61312
class Solution: def findMin(self, nums): if not nums: return 0 n = len(nums) total_sum = sum(nums) target = total_sum // 2 dp = [[0] * (target + 1) for _ in range(2)] now, old = 0, 0 for i in range(1, n + 1): old = now ...
true
true
7905b13417d53c5592a60a952e999d5d06d815d0
19,024
py
Python
cnn_phi_psi.py
Graveheart/ProteinSSPrediction
21bada89a592ff77e0d12063b7225b4f3da4fb1f
[ "MIT" ]
null
null
null
cnn_phi_psi.py
Graveheart/ProteinSSPrediction
21bada89a592ff77e0d12063b7225b4f3da4fb1f
[ "MIT" ]
null
null
null
cnn_phi_psi.py
Graveheart/ProteinSSPrediction
21bada89a592ff77e0d12063b7225b4f3da4fb1f
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import os import os.path import math import tensorflow as tf from sklearn.model_selection import KFold import matplotlib.pyplot as plt from sklearn.metrics import mean_absolute_error LOGDIR...
46.062954
199
0.568545
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import os import os.path import math import tensorflow as tf from sklearn.model_selection import KFold import matplotlib.pyplot as plt from sklearn.metrics import mean_absolute_error LOGDIR...
true
true
7905b1451ce0807588a7e88fb4ac003ba7e67b26
2,802
py
Python
extra_code/transformers-gpt2-finetune.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
4
2019-04-18T20:34:53.000Z
2022-01-18T10:09:55.000Z
extra_code/transformers-gpt2-finetune.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
11
2020-01-28T22:09:12.000Z
2021-04-01T19:57:29.000Z
extra_code/transformers-gpt2-finetune.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
null
null
null
import os os.environ["CUDA_VISIBLE_DEVICES"] = "1" # import deepspeed # import mpi4py # import pandas import torch import transformers import wandb #%env WANDB_PROJECT=wine_gpt2_Trainer_42 MODEL_NAME = "gpt2-medium" # wandb.login(anonymous='never', key="222a37baaf0c1b0d1499ec003e5c2fe49f97b107") wandb.init() # wan...
26.433962
98
0.732691
import os os.environ["CUDA_VISIBLE_DEVICES"] = "1" import torch import transformers import wandb MODEL_NAME = "gpt2-medium" wandb.init() print(torch.cuda.is_available()) print(f"transformers version: {transformers.__version__}") print(f"PyTorch version: {torch.__version__}") tokenizer = transformers.AutoT...
true
true
7905b1f1ad67b3664126b65439ec381c3749ddb9
438
py
Python
insta/admin.py
MachariaMark/fakeinsta
df997f5bb9e6ba4e5573d132bd260bba1046cdbd
[ "MIT" ]
null
null
null
insta/admin.py
MachariaMark/fakeinsta
df997f5bb9e6ba4e5573d132bd260bba1046cdbd
[ "MIT" ]
null
null
null
insta/admin.py
MachariaMark/fakeinsta
df997f5bb9e6ba4e5573d132bd260bba1046cdbd
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * from django.contrib.auth.models import User class ImageAdmin(admin.ModelAdmin): fields = ( 'image','name','caption','profile','post_date', 'user', ) readonly_fields = ('profile', 'post_date', 'user',) #registering the models # admin.site.register(Image, Image...
29.2
70
0.755708
from django.contrib import admin from .models import * from django.contrib.auth.models import User class ImageAdmin(admin.ModelAdmin): fields = ( 'image','name','caption','profile','post_date', 'user', ) readonly_fields = ('profile', 'post_date', 'user',) admin.site.register(Profile) admin.site.register(Image) ...
true
true
7905b27af6d2ff50a968e6c1314399485b1e289d
4,387
py
Python
test/test_tree.py
virtualms/DomainTree
07921b8894b87fd26928cad4ddd30c31be8a5101
[ "BSD-3-Clause" ]
null
null
null
test/test_tree.py
virtualms/DomainTree
07921b8894b87fd26928cad4ddd30c31be8a5101
[ "BSD-3-Clause" ]
null
null
null
test/test_tree.py
virtualms/DomainTree
07921b8894b87fd26928cad4ddd30c31be8a5101
[ "BSD-3-Clause" ]
null
null
null
import random import unittest from domain_tree.tree import DomainTree, DomainNode, NodeNotFoundException from domain_tree.domain import RealDomain, RealInterval class TestDomainTree(unittest.TestCase): @classmethod def setUpClass(cls) -> None: pass @classmethod def tearDownClass...
33.48855
111
0.57488
import random import unittest from domain_tree.tree import DomainTree, DomainNode, NodeNotFoundException from domain_tree.domain import RealDomain, RealInterval class TestDomainTree(unittest.TestCase): @classmethod def setUpClass(cls) -> None: pass @classmethod def tearDownClass...
true
true
7905b2b53e838ed24998c54cecb9396767c49bf0
14,062
py
Python
utils/train_eval_test.py
IronOnet/tensor2robot
351cecbf76b71d09b56a766b981e1a15f85d9528
[ "Apache-2.0" ]
2
2021-10-31T01:06:00.000Z
2021-11-08T09:43:25.000Z
utils/train_eval_test.py
IronOnet/tensor2robot
351cecbf76b71d09b56a766b981e1a15f85d9528
[ "Apache-2.0" ]
null
null
null
utils/train_eval_test.py
IronOnet/tensor2robot
351cecbf76b71d09b56a766b981e1a15f85d9528
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Tensor2Robot Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
39.611268
80
0.732399
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import os from absl import flags import gin import mock import numpy as np from six.moves import zip from tensor2robot.hooks import hook_builder from tensor2robot.models impor...
true
true
7905b2c7a8fd6c7658c3edec7d5b982f80dcb577
698
py
Python
selenium/filling form/form-2.py
araj29011998/Complete-Selenium-Automation
62da634fcf53028f820fcf8b6ec8cfe1fd29851c
[ "MIT" ]
null
null
null
selenium/filling form/form-2.py
araj29011998/Complete-Selenium-Automation
62da634fcf53028f820fcf8b6ec8cfe1fd29851c
[ "MIT" ]
null
null
null
selenium/filling form/form-2.py
araj29011998/Complete-Selenium-Automation
62da634fcf53028f820fcf8b6ec8cfe1fd29851c
[ "MIT" ]
null
null
null
#filling 2nd form and validating ans import time from selenium import webdriver from selenium.webdriver.common.by import By driver=webdriver.Chrome("../chromedriver.exe") driver.get("https://www.seleniumeasy.com/test/basic-first-form-demo.html") num1=2 num2=3 element1=driver.find_element(By.ID,"sum1").s...
23.266667
102
0.7149
import time from selenium import webdriver from selenium.webdriver.common.by import By driver=webdriver.Chrome("../chromedriver.exe") driver.get("https://www.seleniumeasy.com/test/basic-first-form-demo.html") num1=2 num2=3 element1=driver.find_element(By.ID,"sum1").send_keys(num1) element2=driver.find_...
true
true
7905b3003ddac0cedd33e02ab11c07e836d1fc0e
6,582
py
Python
train_cifar.py
diceroll/metric_learning
272c7ba13208e14b91d294456d1f7fe762fe80d5
[ "MIT" ]
1
2019-04-21T14:41:07.000Z
2019-04-21T14:41:07.000Z
train_cifar.py
diceroll/metric_learning
272c7ba13208e14b91d294456d1f7fe762fe80d5
[ "MIT" ]
null
null
null
train_cifar.py
diceroll/metric_learning
272c7ba13208e14b91d294456d1f7fe762fe80d5
[ "MIT" ]
null
null
null
import argparse import multiprocessing import random import shutil from datetime import datetime from functools import partial from pathlib import Path import chainer import chainer.functions as F import chainer.links as L import cupy import numpy as np from chainer import iterators, optimizers, serializers from chain...
43.589404
112
0.648891
import argparse import multiprocessing import random import shutil from datetime import datetime from functools import partial from pathlib import Path import chainer import chainer.functions as F import chainer.links as L import cupy import numpy as np from chainer import iterators, optimizers, serializers from chain...
true
true
7905b45415505e4df0c245fcd752d849b93e1a4f
673
py
Python
indigo-web/archive/tests.py
pericles-project/ERMR
99e19c476c813632d0508cdef65b4683e36f8e43
[ "Apache-2.0" ]
null
null
null
indigo-web/archive/tests.py
pericles-project/ERMR
99e19c476c813632d0508cdef65b4683e36f8e43
[ "Apache-2.0" ]
null
null
null
indigo-web/archive/tests.py
pericles-project/ERMR
99e19c476c813632d0508cdef65b4683e36f8e43
[ "Apache-2.0" ]
null
null
null
"""Archive Tests Copyright 2015 Archive Analytics Solutions - University of Liverpool 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...
32.047619
72
0.793462
from django.test import TestCase
true
true
7905b57f028b3f1ab6052b8fb9970a2c88f4f26c
403
py
Python
fme/tests/test_deltree_copy.py
artemkin/sandbox
0287e95d81c070f1399c5b0ceacdc37867075aec
[ "BSD-2-Clause" ]
null
null
null
fme/tests/test_deltree_copy.py
artemkin/sandbox
0287e95d81c070f1399c5b0ceacdc37867075aec
[ "BSD-2-Clause" ]
null
null
null
fme/tests/test_deltree_copy.py
artemkin/sandbox
0287e95d81c070f1399c5b0ceacdc37867075aec
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python script = r""" MD Dir1 MD Dir1\Dir2 CD Dir1\Dir2 MF file2.dat MD Dir3 CD Dir3 MF file3.dat MD Dir4 CD Dir4 MF file4.dat MD Dir5 CD Dir5 MF file5.dat CD C: DELTREE Dir1 MD Dir2 CD Dir2 MF a.txt MF b.txt CD C: MD Dir3 COPY Dir2 Dir3 """ expected = r""" C: |_DIR2 | |_a.txt | |_b.txt | |_DIR3 |_...
8.955556
26
0.635236
script = r""" MD Dir1 MD Dir1\Dir2 CD Dir1\Dir2 MF file2.dat MD Dir3 CD Dir3 MF file3.dat MD Dir4 CD Dir4 MF file4.dat MD Dir5 CD Dir5 MF file5.dat CD C: DELTREE Dir1 MD Dir2 CD Dir2 MF a.txt MF b.txt CD C: MD Dir3 COPY Dir2 Dir3 """ expected = r""" C: |_DIR2 | |_a.txt | |_b.txt | |_DIR3 |_DIR2 |_a....
true
true
7905b5d4d13729de04fb57050314dad2dd488470
115
py
Python
bridge/bridge/deploy/registry.py
jfdesroches/domino-research
a67b22f1aaff70e82bdb4a966b7fa960ae8843b2
[ "Apache-2.0" ]
null
null
null
bridge/bridge/deploy/registry.py
jfdesroches/domino-research
a67b22f1aaff70e82bdb4a966b7fa960ae8843b2
[ "Apache-2.0" ]
null
null
null
bridge/bridge/deploy/registry.py
jfdesroches/domino-research
a67b22f1aaff70e82bdb4a966b7fa960ae8843b2
[ "Apache-2.0" ]
null
null
null
from bridge.deploy.sagemaker import SageMakerDeployTarget DEPLOY_REGISTRY = {"sagemaker": SageMakerDeployTarget}
23
57
0.843478
from bridge.deploy.sagemaker import SageMakerDeployTarget DEPLOY_REGISTRY = {"sagemaker": SageMakerDeployTarget}
true
true
7905b88a2f1d5904a06f7aaf99c619e3a743a4dc
8,108
py
Python
console_gateway_sdk/model/tuna_service/requirement_instance_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
console_gateway_sdk/model/tuna_service/requirement_instance_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
console_gateway_sdk/model/tuna_service/requirement_instance_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: requirement_instance.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google...
50.360248
812
0.75555
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) 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 ...
true
true
7905b8ca2d4609edd3f15b2822a370b7b0c89611
9,525
py
Python
timed_structures.py
gavalle94/pyQueue
7d5ae9d732883a200e1a79dcf0330142ed112cd4
[ "MIT" ]
1
2018-09-19T11:43:16.000Z
2018-09-19T11:43:16.000Z
timed_structures.py
gavalle94/P2P-Sim
f6ed633ca1cfec51bd8f8e7b9f042cdd55472648
[ "MIT" ]
null
null
null
timed_structures.py
gavalle94/P2P-Sim
f6ed633ca1cfec51bd8f8e7b9f042cdd55472648
[ "MIT" ]
null
null
null
class TimedData(object): """ Struttura dati per eventi accompagnati da un informazione temporale discreta (timestamp o intervallo) """ def __init__(self, data, time, timestamp=True): """ I parametri di input sono - "data": il dato che si vuole memorizzare (di qualsiasi natura) ...
35.541045
111
0.586247
class TimedData(object): def __init__(self, data, time, timestamp=True): try: time = int(time) except: raise TypeError('"time" parameter is invalid. It must be an integer number') # Creo la struttura dati self.data = data self.time = time ...
true
true
7905bb6532dc2a7620792f0293357acdc78323ad
2,684
py
Python
search_script.py
collabnix/openusm
73c0fea36b1fa5f469380b8b8cf79f393613e335
[ "MIT" ]
4
2019-08-04T05:50:46.000Z
2020-04-16T19:24:11.000Z
search_script.py
collabnix/openusm
73c0fea36b1fa5f469380b8b8cf79f393613e335
[ "MIT" ]
null
null
null
search_script.py
collabnix/openusm
73c0fea36b1fa5f469380b8b8cf79f393613e335
[ "MIT" ]
6
2019-08-03T12:57:47.000Z
2020-06-08T01:50:43.000Z
from __future__ import division import requests import json import sys import os from elasticsearch import Elasticsearch from elasticsearch import exceptions try: # idrac_ip = os.environ['IDRAC_IP'] # idrac_username = os.environ['IDRAC_USERNAME'] # idrac_password = os.environ['IDRAC_PASSWORD'] # elastic_i...
28.252632
103
0.564083
from __future__ import division import requests import json import sys import os from elasticsearch import Elasticsearch from elasticsearch import exceptions try: idrac_ip="100.98.26.49" idrac_username="root" idrac_password="calvin" elastic_ip="100.98.26.172" elastic_username="elastic" e...
false
true
7905bc2147b61285b910192e1759b412fc9029ee
67
py
Python
webpie/Version.py
webpie/webpie
c7f1bc29a63c0be683c60756165a6c65260211f9
[ "BSD-3-Clause" ]
2
2021-12-10T16:12:51.000Z
2022-01-06T17:29:12.000Z
webpie/Version.py
webpie/webpie
c7f1bc29a63c0be683c60756165a6c65260211f9
[ "BSD-3-Clause" ]
null
null
null
webpie/Version.py
webpie/webpie
c7f1bc29a63c0be683c60756165a6c65260211f9
[ "BSD-3-Clause" ]
null
null
null
Version = "5.6.5" if __name__ == "__main__": print (Version)
11.166667
26
0.597015
Version = "5.6.5" if __name__ == "__main__": print (Version)
true
true
7905bd612c27e69fb9a7c4aa6088735210d22dfe
26,362
py
Python
venv/lib/python3.8/site-packages/statsmodels/genmod/families/links.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
6,931
2015-01-01T11:41:55.000Z
2022-03-31T17:03:24.000Z
venv/lib/python3.8/site-packages/statsmodels/genmod/families/links.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
6,137
2015-01-01T00:33:45.000Z
2022-03-31T22:53:17.000Z
venv/lib/python3.8/site-packages/statsmodels/genmod/families/links.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
2,608
2015-01-02T21:32:31.000Z
2022-03-31T07:38:30.000Z
''' Defines the link functions to be used with GLM and GEE families. ''' import numpy as np import scipy.stats FLOAT_EPS = np.finfo(float).eps class Link(object): """ A generic link function for one-parameter exponential family. `Link` does nothing, but lays out the methods expected of any subclass. ...
21.986656
79
0.49082
import numpy as np import scipy.stats FLOAT_EPS = np.finfo(float).eps class Link(object): def __call__(self, p): return NotImplementedError def inverse(self, z): return NotImplementedError def deriv(self, p): return NotImplementedError def deriv2(self, p): from sta...
true
true
7905bd74cc44f2f5e0994d8ff553011e5f60c970
1,145
py
Python
sprog/namecheap_ftp_upload.py
PaulKlinger/Sprog-Backend
fd238ee092f20caf8a3f0e4529f0d200ef71c6c0
[ "MIT", "BSD-3-Clause" ]
4
2017-08-20T13:23:02.000Z
2020-07-30T13:28:38.000Z
sprog/namecheap_ftp_upload.py
PaulKlinger/Sprog-Backend
fd238ee092f20caf8a3f0e4529f0d200ef71c6c0
[ "MIT", "BSD-3-Clause" ]
3
2018-03-09T16:46:33.000Z
2019-04-08T16:52:31.000Z
sprog/namecheap_ftp_upload.py
PaulKlinger/Sprog-Backend
fd238ee092f20caf8a3f0e4529f0d200ef71c6c0
[ "MIT", "BSD-3-Clause" ]
1
2020-03-25T22:33:55.000Z
2020-03-25T22:33:55.000Z
import pysftp import os.path def upload_sprog_to_namecheap(tmpdir, passwords): with pysftp.Connection(passwords["NAMECHEAP_SERVER"], username=passwords["NAMECHEAP_USERNAME"], password=passwords["NAMECHEAP_PASSWORD"], port=passwords["NAMECHEAP_PORT"]) as sftp: with sftp.cd('publi...
45.8
111
0.611354
import pysftp import os.path def upload_sprog_to_namecheap(tmpdir, passwords): with pysftp.Connection(passwords["NAMECHEAP_SERVER"], username=passwords["NAMECHEAP_USERNAME"], password=passwords["NAMECHEAP_PASSWORD"], port=passwords["NAMECHEAP_PORT"]) as sftp: with sftp.cd('publi...
true
true
7905bdaaf9f244f30b7bccf94b468705056a3804
6,839
py
Python
tests/rbac/common/addresser/user_test.py
kthblmfld/sawtooth-next-directory
57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707
[ "Apache-2.0" ]
null
null
null
tests/rbac/common/addresser/user_test.py
kthblmfld/sawtooth-next-directory
57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707
[ "Apache-2.0" ]
null
null
null
tests/rbac/common/addresser/user_test.py
kthblmfld/sawtooth-next-directory
57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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 ...
44.993421
88
0.702588
import logging import pytest from rbac.common import addresser from tests.rbac.common.assertions import TestAssertions LOGGER = logging.getLogger(__name__) @pytest.mark.addressing @pytest.mark.library class TestUserAddresser(TestAssertions): def test_address(self): user_id = addresser.use...
true
true
7905be5e4117cc2590adadd9807b99f46123e674
111
py
Python
elif_bayindir/phase_1/python_basic_1/day_6/q9.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
elif_bayindir/phase_1/python_basic_1/day_6/q9.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
elif_bayindir/phase_1/python_basic_1/day_6/q9.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
# Question 9 # List all files in a directory. from os import listdir print(listdir('/home/elif/Desktop'))
11.1
36
0.711712
from os import listdir print(listdir('/home/elif/Desktop'))
true
true
7905be6861631a348a42f4712e9ed70f6221bcd9
1,781
py
Python
check/core/migrations/0010_auto_20171126_1351.py
gabrielnaoto/man_check_control
ab594d2059460820aeacc84062444f1720ed52f9
[ "MIT" ]
null
null
null
check/core/migrations/0010_auto_20171126_1351.py
gabrielnaoto/man_check_control
ab594d2059460820aeacc84062444f1720ed52f9
[ "MIT" ]
3
2020-02-12T00:23:10.000Z
2021-06-10T20:03:03.000Z
check/core/migrations/0010_auto_20171126_1351.py
gabrielnaoto/checkapp
ab594d2059460820aeacc84062444f1720ed52f9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-26 15:51 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0009_auto_20171126_1058'), ...
32.381818
108
0.585065
from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0009_auto_20171126_1058'), ] operations = [ migrations.RemoveField( mode...
true
true
7905bea2d4224c9ea43049d060ab1cb20d4d6352
3,032
py
Python
gammagl/utils/coalesce.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
gammagl/utils/coalesce.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
gammagl/utils/coalesce.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorlayerx as tlx import gammagl.mpops as mpops from .num_nodes import maybe_num_nodes from .check import check_is_numpy def coalesce(edge_index, edge_attr=None, num_nodes=None, reduce="add", is_sorted=False, sort_by_row=True): """Row-wise sorts :obj:`edge_index` and removes its duplic...
42.704225
106
0.649406
import numpy as np import tensorlayerx as tlx import gammagl.mpops as mpops from .num_nodes import maybe_num_nodes from .check import check_is_numpy def coalesce(edge_index, edge_attr=None, num_nodes=None, reduce="add", is_sorted=False, sort_by_row=True): if tlx.is_tensor(edge_index): edge_index = tlx.con...
true
true
7905becbdd748bab5a5e7c8f61d79f8832a5890c
11,014
py
Python
troposphere/validators.py
boostchicken/troposphere
5b80ec654f6f2b3bfac10fb70b528741c3d79138
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators.py
boostchicken/troposphere
5b80ec654f6f2b3bfac10fb70b528741c3d79138
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators.py
boostchicken/troposphere
5b80ec654f6f2b3bfac10fb70b528741c3d79138
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import json from re import compile def boolean(x): if x in [True, 1, '1', 'true', 'True']: return "true" if x in [False, 0, '0', 'false', 'False']: return "false" raise Value...
27.813131
89
0.580897
import json from re import compile def boolean(x): if x in [True, 1, '1', 'true', 'True']: return "true" if x in [False, 0, '0', 'false', 'False']: return "false" raise ValueError def integer(x): try: int(x) except (ValueError, TypeError): raise ValueError("%...
true
true
7905bfc14ae33a328707eb1744213addf99c65ca
405
py
Python
timecat/apps/course/migrations/0005_video_url.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
timecat/apps/course/migrations/0005_video_url.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
timecat/apps/course/migrations/0005_video_url.py
LinXueyuanStdio/memp
c6f6609cec7c54ec23881838dacb5f4ffba2e68c
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.2 on 2018-03-25 23:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0004_course_tag'), ] operations = [ migrations.AddField( model_name='video', name='url', field...
21.315789
84
0.592593
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0004_course_tag'), ] operations = [ migrations.AddField( model_name='video', name='url', field=models.CharField(default='', max_length=200, v...
true
true
7905c2a58d5806248e42f39d1e66c108cb0f711c
360
py
Python
espionage/constants.py
iAbdullahMughal/espionage
b223d82700fcdb27f4e4eae632466c53de061717
[ "MIT" ]
7
2021-12-20T12:49:30.000Z
2022-02-24T13:37:28.000Z
espionage/constants.py
iAbdullahMughal/espionage
b223d82700fcdb27f4e4eae632466c53de061717
[ "MIT" ]
1
2021-12-27T15:02:53.000Z
2021-12-27T15:02:53.000Z
espionage/constants.py
iAbdullahMughal/espionage
b223d82700fcdb27f4e4eae632466c53de061717
[ "MIT" ]
3
2021-12-27T14:58:46.000Z
2022-01-03T08:19:41.000Z
class Constants: """Storing all constants of the project.""" _author = "muhammad abdullah" _email = "iamabdullahmughal@gmail.com" _version = "0.0.4" @property def author(self): return self._author @property def email(self): return self._email @property def vers...
20
47
0.622222
class Constants: _author = "muhammad abdullah" _email = "iamabdullahmughal@gmail.com" _version = "0.0.4" @property def author(self): return self._author @property def email(self): return self._email @property def version(self): return self._version
true
true
7905c338b5080fd58898d58f8668c2eb8d8fb653
2,812
py
Python
sdk/python/pulumi_aws/ec2/proxy_protocol_policy.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/proxy_protocol_policy.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/proxy_protocol_policy.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class ProxyProtocolPolicy(pulumi.Cust...
40.753623
124
0.68101
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class ProxyProtocolPolicy(pulumi.CustomResource): instance_ports: pulumi.Output[list] load_balancer: pulumi.Output[str] def __init__(__self__, resource_name, opts=None, instance_ports=None, load_balancer=No...
true
true
7905c367ba9dd24464c18809c87a146873ee5ba7
26,545
py
Python
mac/v3.6.4/lib/python3.6/test/test_fractions.py
evanmoran/python3-bazel
e6c5238e7c2bf290ae469ee1287de7af1dc4509a
[ "MIT" ]
120
2019-11-12T19:22:44.000Z
2020-05-17T12:17:25.000Z
mac/v3.6.4/lib/python3.6/test/test_fractions.py
evanmoran/python3-bazel
e6c5238e7c2bf290ae469ee1287de7af1dc4509a
[ "MIT" ]
49
2016-02-29T17:59:52.000Z
2019-05-05T04:59:26.000Z
mac/v3.6.4/lib/python3.6/test/test_fractions.py
evanmoran/python3-bazel
e6c5238e7c2bf290ae469ee1287de7af1dc4509a
[ "MIT" ]
28
2019-06-27T04:11:27.000Z
2022-03-11T06:27:44.000Z
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import requires_IEEE_754 import math import numbers import operator import fractions import sys import unittest import warnings from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd cla...
41.737421
78
0.573102
from decimal import Decimal from test.support import requires_IEEE_754 import math import numbers import operator import fractions import sys import unittest import warnings from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd class DummyFloat(object): def __...
true
true
7905c3d866881e59dd31d04a242799ad65275156
17,963
py
Python
tests/garage/tf/models/test_gru.py
thanhkaist/garage
1d840df357282a675b8fce839bb0e5f72a8abba9
[ "MIT" ]
7
2022-02-01T03:02:24.000Z
2022-02-10T12:54:05.000Z
tests/garage/tf/models/test_gru.py
thanhkaist/garage
1d840df357282a675b8fce839bb0e5f72a8abba9
[ "MIT" ]
null
null
null
tests/garage/tf/models/test_gru.py
thanhkaist/garage
1d840df357282a675b8fce839bb0e5f72a8abba9
[ "MIT" ]
2
2022-02-03T03:33:25.000Z
2022-02-10T12:54:07.000Z
import numpy as np import pytest import tensorflow as tf from garage.tf.models.gru import gru from tests.fixtures import TfGraphTestCase from tests.helpers import recurrent_step_gru class TestGRU(TfGraphTestCase): def setup_method(self): super().setup_method() self.batch_size = 2 self.hi...
43.812195
79
0.490675
import numpy as np import pytest import tensorflow as tf from garage.tf.models.gru import gru from tests.fixtures import TfGraphTestCase from tests.helpers import recurrent_step_gru class TestGRU(TfGraphTestCase): def setup_method(self): super().setup_method() self.batch_size = 2 self.hi...
true
true
7905c49276db4f81c3c41db3e11535a22c230170
4,951
py
Python
examples/projector_order_test.py
KrisThielemans/parallelproj
b9e1cb27aaec9a1605e1842b7b3be8b6f32765d3
[ "MIT" ]
null
null
null
examples/projector_order_test.py
KrisThielemans/parallelproj
b9e1cb27aaec9a1605e1842b7b3be8b6f32765d3
[ "MIT" ]
null
null
null
examples/projector_order_test.py
KrisThielemans/parallelproj
b9e1cb27aaec9a1605e1842b7b3be8b6f32765d3
[ "MIT" ]
null
null
null
# small demo for listmode TOF MLEM without subsets import os import matplotlib.pyplot as py import pyparallelproj as ppp from pyparallelproj.wrapper import joseph3d_fwd, joseph3d_fwd_tof, joseph3d_back, joseph3d_back_tof import numpy as np import argparse import ctypes from time import time #------------------------...
38.379845
99
0.576247
import os import matplotlib.pyplot as py import pyparallelproj as ppp from pyparallelproj.wrapper import joseph3d_fwd, joseph3d_fwd_tof, joseph3d_back, joseph3d_back_tof import numpy as np import argparse import ctypes from time import time parser = argparse.ArgumentParser() parser.add_argument('--ngpus', hel...
true
true
7905c49e9cb3c3cb9f8e4211e5b09d739b4a9a5c
27
py
Python
src/partesanato/__init__.py
edgarbs1998/partesanato-server
1b01f75f94dca85ff5b963c49c237fb758b27b43
[ "MIT" ]
null
null
null
src/partesanato/__init__.py
edgarbs1998/partesanato-server
1b01f75f94dca85ff5b963c49c237fb758b27b43
[ "MIT" ]
1
2020-06-05T22:09:06.000Z
2020-06-05T22:09:06.000Z
src/partesanato/__init__.py
edgarbs1998/partesanato-server
1b01f75f94dca85ff5b963c49c237fb758b27b43
[ "MIT" ]
null
null
null
# partesanato/__init__.py
13.5
26
0.777778
true
true
7905c4a01eb4bf2cf8957f83608436d165621168
337
py
Python
noteandtag/__version__.py
Nauja/noteandtag
0a16228c7c71c056dfcf4e3d7ca30ad5ec5fc2bd
[ "MIT" ]
null
null
null
noteandtag/__version__.py
Nauja/noteandtag
0a16228c7c71c056dfcf4e3d7ca30ad5ec5fc2bd
[ "MIT" ]
null
null
null
noteandtag/__version__.py
Nauja/noteandtag
0a16228c7c71c056dfcf4e3d7ca30ad5ec5fc2bd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # nodeandtag's package version information __version_major__ = "0.2" __version__ = "{}a1".format(__version_major__) __version_long__ = "{}a1".format(__version_major__) __status__ = "Alpha" __author__ = "Jeremy Morosi" __author_email__ = "jeremymorosi@hotmail.com" __url__ = "https://github.com/N...
30.636364
51
0.750742
__version_major__ = "0.2" __version__ = "{}a1".format(__version_major__) __version_long__ = "{}a1".format(__version_major__) __status__ = "Alpha" __author__ = "Jeremy Morosi" __author_email__ = "jeremymorosi@hotmail.com" __url__ = "https://github.com/Nauja/nodeandtag"
true
true
7905c50545f5247bba21c5acca55ede55da38f5b
2,707
py
Python
Hemodynamic_Parameter_Analysis.py
TylerAdamMartinez/Minimally-Invasive-Monocusp-Valve
6876864b60a0a95f32abc7a15ef988214866f1be
[ "MIT" ]
1
2019-12-07T21:25:28.000Z
2019-12-07T21:25:28.000Z
Hemodynamic_Parameter_Analysis.py
TylerFonzie8507/Minimally-Invasive-Monocusp-Valve
6876864b60a0a95f32abc7a15ef988214866f1be
[ "MIT" ]
null
null
null
Hemodynamic_Parameter_Analysis.py
TylerFonzie8507/Minimally-Invasive-Monocusp-Valve
6876864b60a0a95f32abc7a15ef988214866f1be
[ "MIT" ]
null
null
null
""" This code was created by Tyler Adam Martinez for the BMEN3310 Final #This are the varibles and what they stand for. Hemodynamic Parameter Analysis CS // Cross-Sectional Area of the heart valve vR // Radius of Valve DR // Disk Radius TiA // Area of the Titanium wire TiV // Volume of the Titanium wire...
32.614458
87
0.655707
import math pi = 3.14159265359; area of the valve: "); CS = int(CS); vR = math.sqrt(CS/pi); height = 5.0; thinkness = 1.5; DR = vR - (2*thinkness); Diskheight = 1.5; TiA = 0.1024 * pi; TiV = 2*vR *TiA; IRV = pi * pow((DR + thinkness), 2) - (pi * pow(DR, 2)) * height; ORV = pi * pow((DR + (2*thinkness))...
true
true
7905c553202de651223d53c0dd5e6502dc2b3f0a
2,348
py
Python
anyway/widgets/suburban_widgets/injured_count_by_accident_year_widget.py
shaniwein/anyway
dcd13bf7dc4a120f4d697ab0c08b906f43eea52e
[ "MIT" ]
1
2022-01-19T18:23:03.000Z
2022-01-19T18:23:03.000Z
anyway/widgets/suburban_widgets/injured_count_by_accident_year_widget.py
shaniwein/anyway
dcd13bf7dc4a120f4d697ab0c08b906f43eea52e
[ "MIT" ]
2
2021-11-02T13:37:23.000Z
2021-11-23T15:51:06.000Z
anyway/widgets/suburban_widgets/injured_count_by_accident_year_widget.py
shaniwein/anyway
dcd13bf7dc4a120f4d697ab0c08b906f43eea52e
[ "MIT" ]
null
null
null
from typing import Dict from flask_babel import _ from anyway.backend_constants import InjurySeverity from anyway.infographics_dictionaries import segment_dictionary from anyway.models import InvolvedMarkerView from anyway.request_params import RequestParams from anyway.widgets.suburban_widgets.sub_urban_widg...
37.870968
101
0.677172
from typing import Dict from flask_babel import _ from anyway.backend_constants import InjurySeverity from anyway.infographics_dictionaries import segment_dictionary from anyway.models import InvolvedMarkerView from anyway.request_params import RequestParams from anyway.widgets.suburban_widgets.sub_urban_widg...
true
true
7905c61340e209311a6142b0fb8d22cf5fd8af3a
1,690
py
Python
Model/imagescrape.py
danscime/Tip-Of-My-Shoe
0e6bdeb0bf161f51fd0ec4728c5f7e6f4d1d6128
[ "MIT" ]
4
2019-10-04T21:16:07.000Z
2019-10-06T18:08:20.000Z
Model/imagescrape.py
danscime/Tip-Of-My-Shoe
0e6bdeb0bf161f51fd0ec4728c5f7e6f4d1d6128
[ "MIT" ]
2
2021-05-11T10:27:27.000Z
2022-02-19T00:36:26.000Z
Model/imagescrape.py
danscime/Tip-Of-My-Shoe
0e6bdeb0bf161f51fd0ec4728c5f7e6f4d1d6128
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.keys import Keys import json import os import urllib2 import argparse import sys searchterm = str(sys.argv[1]) # will also be the name of the folder url = "https://www.google.co.in/search?q="+searchterm+"&source=lnms&tbm=isch" browser = webdriver.Chrome() b...
39.302326
225
0.671006
from selenium import webdriver from selenium.webdriver.common.keys import Keys import json import os import urllib2 import argparse import sys searchterm = str(sys.argv[1]) url = "https://www.google.co.in/search?q="+searchterm+"&source=lnms&tbm=isch" browser = webdriver.Chrome() browser.get(url) header={'User-Agent':...
false
true
7905c70f99c164f6b3dd1cb3a5b80c7d6698f988
1,339
py
Python
src/doghouse/models.py
JuniorGunner/ConcilBackendTest
5ff07de350783e6168f01acd9a2fba0f9e81f66c
[ "MIT" ]
null
null
null
src/doghouse/models.py
JuniorGunner/ConcilBackendTest
5ff07de350783e6168f01acd9a2fba0f9e81f66c
[ "MIT" ]
null
null
null
src/doghouse/models.py
JuniorGunner/ConcilBackendTest
5ff07de350783e6168f01acd9a2fba0f9e81f66c
[ "MIT" ]
null
null
null
from django.db import models import os def get_image_path(instance, filename): return os.path.join('pics', str(instance.id), filename) # Create your models here. class Pets(models.Model): pet_foto = models.ImageField(upload_to=get_image_path, blank=True, null=True) DOG = 'C' CAT = 'G' ...
30.431818
101
0.605676
from django.db import models import os def get_image_path(instance, filename): return os.path.join('pics', str(instance.id), filename) class Pets(models.Model): pet_foto = models.ImageField(upload_to=get_image_path, blank=True, null=True) DOG = 'C' CAT = 'G' ESPECIE_CHOICES = ( ...
true
true
7905c777b4c3b65f95f666f2c5676e7321beb303
2,772
py
Python
xclim/indices/__init__.py
gacou54/xclim
1fd3ef228ee48f547167bc43afa89615bdafb30b
[ "Apache-2.0" ]
null
null
null
xclim/indices/__init__.py
gacou54/xclim
1fd3ef228ee48f547167bc43afa89615bdafb30b
[ "Apache-2.0" ]
null
null
null
xclim/indices/__init__.py
gacou54/xclim
1fd3ef228ee48f547167bc43afa89615bdafb30b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Indices library =============== This module describes climate indicator functions. Functions are listed in alphabetical order and describe the raw computation performed over xarray.DataArrays. DataArrays should carry unit information to allow for any needed unit conversions. The output's a...
35.088608
117
0.712843
from ._simple import * from ._threshold import * from ._multivariate import * # E.g. http://vocab.nerc.ac.uk/collection/P07/current/BHMHISG2/
true
true
7905cae74c5d3b189f133d7c429d3cf6564cedf5
2,215
py
Python
ecom/paquetes/view_paquete.py
Gustolidel/Ikergust
7f20d917895dce4a3b65a8283be3f10141e53b11
[ "MIT" ]
null
null
null
ecom/paquetes/view_paquete.py
Gustolidel/Ikergust
7f20d917895dce4a3b65a8283be3f10141e53b11
[ "MIT" ]
null
null
null
ecom/paquetes/view_paquete.py
Gustolidel/Ikergust
7f20d917895dce4a3b65a8283be3f10141e53b11
[ "MIT" ]
null
null
null
from django.http import HttpResponseRedirect from django.views.generic import ListView,CreateView,UpdateView,DetailView,View from django.shortcuts import render, redirect from ecom import forms, models from django.utils.decorators import method_decorator def admin_required(function): def wrap(request, *args, **k...
36.916667
128
0.715576
from django.http import HttpResponseRedirect from django.views.generic import ListView,CreateView,UpdateView,DetailView,View from django.shortcuts import render, redirect from ecom import forms, models from django.utils.decorators import method_decorator def admin_required(function): def wrap(request, *args, **k...
true
true
7905cb3aa60e8f9fa2a288064c25b63345eb6706
140,061
py
Python
tests/lax_numpy_test.py
vballoli/jax
bbf7a432e86053024419ec8adb90aae3d06afb18
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
vballoli/jax
bbf7a432e86053024419ec8adb90aae3d06afb18
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
vballoli/jax
bbf7a432e86053024419ec8adb90aae3d06afb18
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
45.622476
131
0.64307
import collections import functools from functools import partial import itertools import operator from typing import cast, Optional import unittest from unittest import SkipTest import warnings from absl.testing import absltest from absl.testing import parameterized import numpy as onp import jax imp...
true
true
7905cc126bfce14e1c236fb532e87a55bc65f722
906
py
Python
pycounter/test/test_db_common.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
null
null
null
pycounter/test/test_db_common.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
2
2020-08-27T14:12:44.000Z
2020-08-27T14:16:18.000Z
pycounter/test/test_db_common.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
null
null
null
"""Common DB report tests.""" import datetime from pycounter.constants import METRICS def test_version(db_report): assert db_report.report_version == 4 def test_year(db_report): assert db_report.year == 2012 def test_publisher(db_report): for publication in db_report: assert publication.publi...
22.65
86
0.737307
import datetime from pycounter.constants import METRICS def test_version(db_report): assert db_report.report_version == 4 def test_year(db_report): assert db_report.year == 2012 def test_publisher(db_report): for publication in db_report: assert publication.publisher == u"Megadodo Publication...
true
true
7905cc3fc390402329e2b7318d745e309b05f5f7
7,144
py
Python
controlpyweb/reader_writer.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
null
null
null
controlpyweb/reader_writer.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
3
2020-03-31T04:56:27.000Z
2021-06-01T23:56:16.000Z
controlpyweb/reader_writer.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
1
2021-02-23T02:05:15.000Z
2021-02-23T02:05:15.000Z
""" Module Reader Writer This module provide the ReaderWriter class as a concrete implemenation of the AbstractReaderWriter. It handles the implementation details of interfacing with the hardware. """ from controlpyweb.abstract_reader_writer import AbstractReaderWriter import requests import json from typing import Un...
38
114
0.613522
from controlpyweb.abstract_reader_writer import AbstractReaderWriter import requests import json from typing import Union, Optional, List import time import threading from controlpyweb.errors import ControlPyWebAddressNotFoundError, WebIOConnectionError lock = threading.Lock() class ReaderWriter(AbstractReaderWrit...
true
true
7905ceba182a6a5b754db003e43fdf42d6548217
3,876
py
Python
tests/unit/bokeh/application/handlers/test_notebook__handlers.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/application/handlers/test_notebook__handlers.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/application/handlers/test_notebook__handlers.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
36.914286
79
0.440402
from __future__ import annotations import pytest ; pytest import nbconvert import nbformat from packaging import version from bokeh._testing.util.filesystem import with_temporary_file from bokeh.document import Document import bokeh.application.handlers.notebook as bahn def with_scri...
true
true
7905cf5018ca6a1aa4b55ea08316f727e216c71c
39,816
py
Python
test/functional/p2p_compactblocks.py
thinkgandhi/bitcoin
a5623ba89f050182ce9b1f570f3736b272b544b2
[ "MIT" ]
114
2020-07-15T08:54:36.000Z
2022-02-06T07:57:06.000Z
test/functional/p2p_compactblocks.py
XSWLO/bitcoin
b931f61b9ab098ea4ea8fbe4cbf0b03c566c3f63
[ "MIT" ]
13
2019-11-12T15:06:08.000Z
2021-09-27T08:10:40.000Z
test/functional/p2p_compactblocks.py
XSWLO/bitcoin
b931f61b9ab098ea4ea8fbe4cbf0b03c566c3f63
[ "MIT" ]
43
2019-08-31T10:39:01.000Z
2022-02-04T13:11:46.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test compact blocks (BIP 152). Version 1 compact blocks are pre-segwit (txids) Version 2 compact block...
46.568421
500
0.672092
import random from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment from test_framework.messages import BlockTransactions, BlockTransactionsRequest, calculate_shortid, CBlock, CBlockHeader, CInv, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, FromHex, HeaderAndShortIDs,...
true
true
7905cf6747a6dad7faa66fb3e21b6a8f8787f32a
9,591
py
Python
pyBAScloudAPI/docs/conf.py
bascloud/BASCloudAPI
6a06d430720e99204f84f5362b4f22d7d4a72b76
[ "MIT" ]
3
2021-04-30T07:44:11.000Z
2021-05-03T06:35:01.000Z
pyBAScloudAPI/docs/conf.py
bascloud/BASCloudAPI
6a06d430720e99204f84f5362b4f22d7d4a72b76
[ "MIT" ]
9
2021-06-23T04:21:51.000Z
2022-01-17T04:15:06.000Z
pyBAScloudAPI/docs/conf.py
bascloud/BAScloudAPI
6a06d430720e99204f84f5362b4f22d7d4a72b76
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # python_exameple documentation build configuration file, created by # sphinx-quickstart on Fri Feb 26 00:29:33 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
32.511864
79
0.719737
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', ] autosummary_generate = True templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'pyBAScloudA...
true
true
7905d01ce3d05f9088ae98cc3cdcfc1316a720cc
753
py
Python
mod/models/user.py
HeraldStudio/herald_auth
f6aa59f830ce3c7edd6afabcdf8f583ffad52582
[ "MIT" ]
6
2015-09-10T06:44:25.000Z
2017-02-22T00:13:07.000Z
mod/models/user.py
HeraldStudio/herald_auth
f6aa59f830ce3c7edd6afabcdf8f583ffad52582
[ "MIT" ]
null
null
null
mod/models/user.py
HeraldStudio/herald_auth
f6aa59f830ce3c7edd6afabcdf8f583ffad52582
[ "MIT" ]
3
2017-03-22T07:50:31.000Z
2018-05-19T13:58:14.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2014-10-26 13:02:58 # @Author : yml_bright@163.com from sqlalchemy import Column, String, Integer from sqlalchemy.ext.declarative import declarative_base from db import dbengine, Base class User(Base): __tablename__ = 'user' cardnum = Column(String(1...
35.857143
56
0.713147
from sqlalchemy import Column, String, Integer from sqlalchemy.ext.declarative import declarative_base from db import dbengine, Base class User(Base): __tablename__ = 'user' cardnum = Column(String(10), primary_key=True) number = Column(String(50), nullable=True) password = Column(String(50), null...
true
true
7905d0bcd302b5858170c94d003ee28831928a26
2,464
py
Python
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/searx-master/searx/engines/duckduckgo_images.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
""" DuckDuckGo (Images) @website https://duckduckgo.com/ @provide-api yes (https://duckduckgo.com/api), but images are not supported @using-api no @results JSON (site requires js to get images) @stable no (JSON can change) @parse url, title, img_src @todo avoid extra...
27.076923
103
0.631088
from json import loads from searx.engines.xpath import extract_text from searx.engines.duckduckgo import ( _fetch_supported_languages, supported_languages_url, get_region_code, language_aliases ) from searx.poolrequests import get from searx.url_utils import urlencode categories = ['images'] paging = True la...
true
true
7905d121152c9a5dbbb1d610c539c4ff89d3458a
7,942
py
Python
config/settings/production.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
1
2019-02-15T09:05:35.000Z
2019-02-15T09:05:35.000Z
config/settings/production.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
null
null
null
config/settings/production.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env('DJANGO_SECRET_KEY') # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED...
39.316832
96
0.605515
from .base import * from .base import env = env('DJANGO_SECRET_KEY') = env.list('DJANGO_ALLOWED_HOSTS', default=['127.0.0.1']) DATABASES['default'] = env.db('DATABASE_URL') DATABASES['default']['ATOMIC_REQUESTS'] = True DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default=60) CACHES...
true
true
7905d1b96e157fc5ccef56121e70b3a3436ece19
51
py
Python
sync_lingq/_version.py
CiaranCurran/auto-sync-lingq
d501a1faebf216114126936df1aa33b2facc9109
[ "MIT" ]
6
2021-03-03T16:12:42.000Z
2022-02-09T23:05:10.000Z
sync_lingq/_version.py
CiaranCurran/auto-sync-lingq
d501a1faebf216114126936df1aa33b2facc9109
[ "MIT" ]
3
2021-05-24T04:05:30.000Z
2021-10-31T19:59:29.000Z
sync_lingq/_version.py
CiaranCurran/auto-sync-lingq
d501a1faebf216114126936df1aa33b2facc9109
[ "MIT" ]
null
null
null
""" Version information """ __version__ = "1.0.0"
8.5
21
0.627451
__version__ = "1.0.0"
true
true
7905d37a3b847296ee879088d177e5c67cc3a518
1,357
py
Python
1101-1200/1189-Minesweeper/1189-Minesweeper.py
jiadaizhao/LintCode
a8aecc65c47a944e9debad1971a7bc6b8776e48b
[ "MIT" ]
77
2017-12-30T13:33:37.000Z
2022-01-16T23:47:08.000Z
1101-1200/1189-Minesweeper/1189-Minesweeper.py
jxhangithub/LintCode-1
a8aecc65c47a944e9debad1971a7bc6b8776e48b
[ "MIT" ]
1
2018-05-14T14:15:40.000Z
2018-05-14T14:15:40.000Z
1101-1200/1189-Minesweeper/1189-Minesweeper.py
jxhangithub/LintCode-1
a8aecc65c47a944e9debad1971a7bc6b8776e48b
[ "MIT" ]
39
2017-12-07T14:36:25.000Z
2022-03-10T23:05:37.000Z
import collections class Solution: """ @param board: a board @param click: the position @return: the new board """ def updateBoard(self, board, click): # Write your code here b = [] for s in board: temp = [] for c in s: temp.append(...
34.794872
121
0.342668
import collections class Solution: def updateBoard(self, board, click): b = [] for s in board: temp = [] for c in s: temp.append(c) b.append(temp) row, col = click if b[row][col] == 'M': b[row][col] = 'X' ...
true
true
7905d38cd81a9cd50dd87fd8ca7b86b6aa30c57b
59,333
py
Python
numpy/core/tests/test_regression.py
dlax/numpy
c869d124d08665b703539c9b2f14ec6ffbae0be0
[ "BSD-3-Clause" ]
null
null
null
numpy/core/tests/test_regression.py
dlax/numpy
c869d124d08665b703539c9b2f14ec6ffbae0be0
[ "BSD-3-Clause" ]
null
null
null
numpy/core/tests/test_regression.py
dlax/numpy
c869d124d08665b703539c9b2f14ec6ffbae0be0
[ "BSD-3-Clause" ]
null
null
null
import pickle import sys import platform import gc import copy import warnings import tempfile from StringIO import StringIO from os import path import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_...
34.860752
92
0.541992
import pickle import sys import platform import gc import copy import warnings import tempfile from StringIO import StringIO from os import path import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_...
false
true
7905d3a0eb0c4fe5190482b197166a5b7c5bae75
10,823
py
Python
tests/test_expval.py
wongwsvincent/pennylane-cirq
14f421a31016949ec6f3172f90e7f06a6674e913
[ "Apache-2.0" ]
null
null
null
tests/test_expval.py
wongwsvincent/pennylane-cirq
14f421a31016949ec6f3172f90e7f06a6674e913
[ "Apache-2.0" ]
null
null
null
tests/test_expval.py
wongwsvincent/pennylane-cirq
14f421a31016949ec6f3172f90e7f06a6674e913
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
32.896657
100
0.530537
import pytest import numpy as np import pennylane as qml from contextlib import contextmanager from conftest import U, U2, A, B np.random.seed(42) @contextmanager def mimic_execution_for_expval(device): device.reset() with device.execution_context(): yield if not device.shot...
true
true
7905d411f3a76d40986783aa30859dda3aa9cae8
1,044
py
Python
dashboard/stashboard/content/database_clusters/panel.py
rmyers/clouddb-rpc
fba67c7cb20d93bfc6ebb10976b407e4121b30e4
[ "Apache-2.0" ]
null
null
null
dashboard/stashboard/content/database_clusters/panel.py
rmyers/clouddb-rpc
fba67c7cb20d93bfc6ebb10976b407e4121b30e4
[ "Apache-2.0" ]
null
null
null
dashboard/stashboard/content/database_clusters/panel.py
rmyers/clouddb-rpc
fba67c7cb20d93bfc6ebb10976b407e4121b30e4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 eBay Software Foundation # Copyright 2015 HP Software, LLC # 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.o...
33.677419
78
0.733716
from django.utils.translation import ugettext_lazy as _ import horizon from openstack_dashboard.dashboards.project import dashboard class Clusters(horizon.Panel): name = _("Clusters") slug = 'database_clusters' permissions = ('openstack.services.database', 'openstack.se...
true
true
7905d4a8cd64f015208d8cb6b5586e8898cfba3a
6,846
py
Python
src/conda_package_handling/api.py
katietz/conda-package-handling
e1347ffd31a69c9278885151c70f50e0abb65b67
[ "BSD-3-Clause" ]
null
null
null
src/conda_package_handling/api.py
katietz/conda-package-handling
e1347ffd31a69c9278885151c70f50e0abb65b67
[ "BSD-3-Clause" ]
null
null
null
src/conda_package_handling/api.py
katietz/conda-package-handling
e1347ffd31a69c9278885151c70f50e0abb65b67
[ "BSD-3-Clause" ]
null
null
null
import os as _os from glob import glob as _glob import functools as _functools from concurrent.futures import ProcessPoolExecutor as _Executor import tempfile as _tempfile from six import string_types as _string_types import tqdm as _tqdm # expose these two exceptions as part of the API. Everything else should feed ...
40.508876
99
0.631171
import os as _os from glob import glob as _glob import functools as _functools from concurrent.futures import ProcessPoolExecutor as _Executor import tempfile as _tempfile from six import string_types as _string_types import tqdm as _tqdm from .exceptions import ConversionError, InvalidArchiveError from .tarball i...
true
true
7905d5bc39ac0185a8b575225ed8ad192aa5acc0
68,865
py
Python
python/jsbeautifier/__init__.py
fedmich/js-beautify
3d611fc0b2fcb81ca0019f82499dc19709178255
[ "MIT" ]
1
2019-07-18T12:00:30.000Z
2019-07-18T12:00:30.000Z
python/jsbeautifier/__init__.py
fedmich/js-beautify
3d611fc0b2fcb81ca0019f82499dc19709178255
[ "MIT" ]
null
null
null
python/jsbeautifier/__init__.py
fedmich/js-beautify
3d611fc0b2fcb81ca0019f82499dc19709178255
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import os import getopt import re import string import errno import six from jsbeautifier.__version__ import __version__ # # The MIT License (MIT) # Copyright (c) 2007-2013 Einar Lielmanis and contributors. # Permission is hereby granted, free of charge, to any person...
44.059501
4,249
0.583228
from __future__ import print_function import sys import os import getopt import re import string import errno import six from jsbeautifier.__version__ import __version__ class BeautifierOptions: def __init__(self): self.indent_size = 4 self.indent_...
true
true
7905d6456da47510edf5e40dc15e2a37bf7dd362
4,448
py
Python
scripts/csv_xml.py
markendr/RAJAPerf
265ad5b98c0ca5a7f0ba996f90220d0b232d1bac
[ "BSD-3-Clause" ]
69
2017-09-25T20:23:16.000Z
2022-03-05T09:04:15.000Z
scripts/csv_xml.py
markendr/RAJAPerf
265ad5b98c0ca5a7f0ba996f90220d0b232d1bac
[ "BSD-3-Clause" ]
148
2017-09-27T21:41:16.000Z
2022-03-31T20:27:36.000Z
scripts/csv_xml.py
markendr/RAJAPerf
265ad5b98c0ca5a7f0ba996f90220d0b232d1bac
[ "BSD-3-Clause" ]
31
2017-11-22T08:23:32.000Z
2022-02-10T03:03:56.000Z
#!/bin/env python import csv from datetime import datetime import os import xml.etree.ElementTree as ET import xml # https://stackabuse.com/reading-and-writing-xml-files-in-python/ # xmlformatter: # https://www.freeformatter.com/xml-formatter.html#ad-output infile = "./RAJAPerf-timing.csv" def read_infile(infile)...
25.563218
78
0.678507
import csv from datetime import datetime import os import xml.etree.ElementTree as ET import xml = "./RAJAPerf-timing.csv" def read_infile(infile): with open(infile) as csvfile: rps_reader = csv.reader(csvfile, delimiter=',') def get_date(): date = datetime.now().strftime("%-Y-%m-%dT%H:%M:%S")...
true
true
7905d6df40815cc1d1694afa95957d417f187151
2,044
py
Python
eva_storage/jvc/jvc_runner_v2.py
jaehobang/cs7643_project
7ec3d1934fc462ba230bd0615c939e7de00dc10c
[ "Apache-2.0" ]
null
null
null
eva_storage/jvc/jvc_runner_v2.py
jaehobang/cs7643_project
7ec3d1934fc462ba230bd0615c939e7de00dc10c
[ "Apache-2.0" ]
null
null
null
eva_storage/jvc/jvc_runner_v2.py
jaehobang/cs7643_project
7ec3d1934fc462ba230bd0615c939e7de00dc10c
[ "Apache-2.0" ]
null
null
null
""" This is the runner of the entire eva.jvc system. Version 1, the steps for the entire pipeline are as follows: 1. preprocessor -- get rep indices, save children metadata 2. encoder -- encode video by forcing i-frames (also modify the i-frame skip rate) 3. decoder -- using metadata, select the i-frames you want to ...
31.9375
122
0.716732
import os from eva_storage.jvc.preprocessor import * from eva_storage.jvc.encoder import * from eva_storage.jvc.decoder import * from loaders.seattle_loader import SeattleLoader from timer import Timer class JVCRunner_v2: def __init__(self): self.preprocessor = Preprocessor() self.compressor =...
true
true
7905d726f2f8b79ec4d8395beedb4cad2e0e70eb
2,580
py
Python
01_profiling/memory_profiler/julia1_memoryprofiler2.py
siddheshmhatre/high_performance_python
4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d
[ "RSA-MD" ]
698
2015-01-06T14:10:26.000Z
2022-03-29T03:05:09.000Z
01_profiling/memory_profiler/julia1_memoryprofiler2.py
siddheshmhatre/high_performance_python
4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d
[ "RSA-MD" ]
6
2015-01-12T18:03:24.000Z
2021-06-02T13:05:20.000Z
01_profiling/memory_profiler/julia1_memoryprofiler2.py
siddheshmhatre/high_performance_python
4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d
[ "RSA-MD" ]
260
2015-01-16T13:58:57.000Z
2022-03-28T16:49:34.000Z
"""Julia set generator without optional PIL-based image drawing""" import time #from memory_profiler import profile # area of complex space to investigate x1, x2, y1, y2 = -1.8, 1.8, -1.8, 1.8 c_real, c_imag = -0.62772, -.42193 @profile def calculate_z_serial_purepython(maxiter, zs, cs): """Calculate output list...
34.4
109
0.642248
"""Julia set generator without optional PIL-based image drawing""" import time x1, x2, y1, y2 = -1.8, 1.8, -1.8, 1.8 c_real, c_imag = -0.62772, -.42193 @profile def calculate_z_serial_purepython(maxiter, zs, cs): """Calculate output list using Julia update rule""" with profile.timestamp("create_output_list...
false
true
7905d75a01200606d03c1c0b340145adee5d236d
15,669
py
Python
reading_comprehension/reading_comprehension_run.py
Atul-Anand-Jha/reading_comprehension_tf
9d45ff62aa4004c466e4fe6b6639cec754199b2b
[ "Apache-2.0" ]
1
2019-05-15T09:13:50.000Z
2019-05-15T09:13:50.000Z
reading_comprehension/reading_comprehension_run.py
Atul-Anand-Jha/reading_comprehension_tf
9d45ff62aa4004c466e4fe6b6639cec754199b2b
[ "Apache-2.0" ]
null
null
null
reading_comprehension/reading_comprehension_run.py
Atul-Anand-Jha/reading_comprehension_tf
9d45ff62aa4004c466e4fe6b6639cec754199b2b
[ "Apache-2.0" ]
null
null
null
import argparse import os.path import time import numpy as np import tensorflow as tf from tensorflow.python import debug as tf_debug from util.default_util import * from util.param_util import * from util.model_util import * from util.eval_util import * from util.debug_logger import * from util.train_logger import ...
45.682216
130
0.689195
import argparse import os.path import time import numpy as np import tensorflow as tf from tensorflow.python import debug as tf_debug from util.default_util import * from util.param_util import * from util.model_util import * from util.eval_util import * from util.debug_logger import * from util.train_logger import ...
true
true
7905d8dd0669aab54f98840fa2a5ea2f478d2399
9,566
py
Python
povary/apps/cakegallery/migrations/0014_auto__add_field_cakegallery_created__add_field_cakegallery_updated.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/cakegallery/migrations/0014_auto__add_field_cakegallery_created__add_field_cakegallery_updated.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/cakegallery/migrations/0014_auto__add_field_cakegallery_created__add_field_cakegallery_updated.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CakeGallery.created' db.add_column(u'cakegallery_cakegallery', 'created', ...
75.920635
188
0.57234
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'cakegallery_cakegallery', 'created', self.gf('django.db.models.fields.DateTimeField')(auto_n...
true
true
7905d8eee1cbd95cf50bad5ab70f5594720e29e3
3,889
py
Python
performance.py
olejak/cpme2
d4b6361bae24a1f5f47875850379cabe9755d654
[ "Apache-2.0" ]
null
null
null
performance.py
olejak/cpme2
d4b6361bae24a1f5f47875850379cabe9755d654
[ "Apache-2.0" ]
null
null
null
performance.py
olejak/cpme2
d4b6361bae24a1f5f47875850379cabe9755d654
[ "Apache-2.0" ]
null
null
null
# # Copyright 2020 by 0x7c2, Simon Brecht. # All rights reserved. # This file is part of the Report/Analytic Tool - CPme, # and is released under the "Apache License 2.0". Please see the LICENSE # file that should have been included as part of this package. # from templates import check import func class check_perfor...
28.386861
113
0.61404
from templates import check import func class check_performance_ispredundancy(check): page = "Health.Firewall" category = "Information" title = "ISP Redundancy" isFirewall = True isManagement = False minVersion = 8020 command = "cpstat fw | grep -A5 'ISP link table' | grep '|...
true
true
7905da66c1e619153c75d7e05cad748710d63849
2,090
py
Python
tensorflow/python/keras/_impl/keras/datasets/cifar10.py
harunpehlivan/tensorflow
376e2cfdab31f4da251ea2e50992a9bf97fd171b
[ "Apache-2.0" ]
22
2018-01-13T14:52:47.000Z
2018-07-05T01:00:28.000Z
tensorflow/python/keras/_impl/keras/datasets/cifar10.py
hamzabekkouri/tensorflow
d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f
[ "Apache-2.0" ]
3
2018-05-09T11:31:58.000Z
2021-01-27T12:26:21.000Z
tensorflow/python/keras/_impl/keras/datasets/cifar10.py
hamzabekkouri/tensorflow
d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f
[ "Apache-2.0" ]
13
2018-02-22T21:04:13.000Z
2020-11-17T11:38:36.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...
34.262295
80
0.691388
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from tensorflow.python.keras._impl.keras import backend as K from tensorflow.python.keras._impl.keras.datasets.cifar import load_batch from tensorflow.python.keras._...
true
true
7905dc4bc915252ba607c44bd188b2cc732b9fb9
15,732
py
Python
test/sql/test_insert_exec.py
lxl0928/timi_sqlalchemy
ebd3abc1e7bc23f211ef11ed05ef821233d066cc
[ "MIT" ]
1
2021-09-04T18:25:05.000Z
2021-09-04T18:25:05.000Z
test/sql/test_insert_exec.py
lxl0928/timi_sqlalchemy
ebd3abc1e7bc23f211ef11ed05ef821233d066cc
[ "MIT" ]
null
null
null
test/sql/test_insert_exec.py
lxl0928/timi_sqlalchemy
ebd3abc1e7bc23f211ef11ed05ef821233d066cc
[ "MIT" ]
21
2017-11-13T13:23:27.000Z
2019-10-07T02:00:52.000Z
from sqlalchemy import and_ from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import INT from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Sequence from sqlalchemy import sql from sqlalchemy import String from sqlalchemy import t...
30.968504
79
0.515446
from sqlalchemy import and_ from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import INT from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Sequence from sqlalchemy import sql from sqlalchemy import String from sqlalchemy import t...
true
true
7905dc86e6b2268b3729640356d766f5c8951bc3
712
py
Python
problem0021.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0021.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0021.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # # #21 Amicable numbers - Project Euler # https://projecteuler.net/problem=21 # # Code by Kevin Marciniak # ########################### def sumproperdivisors(num): sum = 0 for x in range(1, int((num / 2)) + 1): if num % x == 0: sum += x return sum amicabl...
20.941176
83
0.573034
true
true
7905de86b183dae3ebbca47c228963971c53ce7c
921
py
Python
var/spack/repos/builtin/packages/r-ica/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/r-ica/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/r-ica/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RIca(RPackage): """Independent Component Analysis (ICA) using various algorithms: FastICA,...
43.857143
95
0.763301
from spack import * class RIca(RPackage): homepage = "https://cloud.r-project.org/package=ica" url = "https://cloud.r-project.org/src/contrib/ica_1.0-1.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/ica" version('1.0-2', sha256='e721596fc6175d3270a60d5e0b5b98be103a8fd0...
true
true