hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c00a821838bfecc1fbd3a98470db4bea6308827
762
py
Python
exec.py
developerHaneum/averageScore
ba0a365c3b82ff1563b6e58eb8fd76b71c9eef1c
[ "MIT" ]
null
null
null
exec.py
developerHaneum/averageScore
ba0a365c3b82ff1563b6e58eb8fd76b71c9eef1c
[ "MIT" ]
null
null
null
exec.py
developerHaneum/averageScore
ba0a365c3b82ff1563b6e58eb8fd76b71c9eef1c
[ "MIT" ]
null
null
null
print("-- 시험 평균점수 프로그램 --") # 시험 과목 입력 amount = int(input("과목(0:quit): ")) if amount == 0: print("-- 종료 --") exit() # 과목 점수 입력 for i in range(1, amount+1): print("-- %d 번째 과목 -- "%i) score_all = int(input("문제: ")) score_true = int(input("맞춘 문제: ")) # 과목 평균점수 score_average = (score_all / sco...
21.166667
50
0.544619
print("-- 시험 평균점수 프로그램 --") amount = int(input("과목(0:quit): ")) if amount == 0: print("-- 종료 --") exit() for i in range(1, amount+1): print("-- %d 번째 과목 -- "%i) score_all = int(input("문제: ")) score_true = int(input("맞춘 문제: ")) score_average = (score_all / score_true) * 100 all_average = sc...
true
true
1c00a8bef5038a56a7a5bbe6c1036ac00101d115
42,430
py
Python
pygr/seqdb.py
ctb/pygr
a3a3e68073834c20ddbdb27ed746baf8c73fef0a
[ "BSD-3-Clause" ]
2
2015-03-07T13:20:50.000Z
2015-11-04T12:01:21.000Z
pygr/seqdb.py
ctb/pygr
a3a3e68073834c20ddbdb27ed746baf8c73fef0a
[ "BSD-3-Clause" ]
null
null
null
pygr/seqdb.py
ctb/pygr
a3a3e68073834c20ddbdb27ed746baf8c73fef0a
[ "BSD-3-Clause" ]
null
null
null
""" seqdb contains a set of classes for interacting with sequence databases. Primary sequence database classes: - SequenceDB - base class for sequence databases - SequenceFileDB - file-based sequence database - PrefixUnionDict - container to combine multiple sequence databases - XMLRPCSequenceD...
37.251975
86
0.629036
""" seqdb contains a set of classes for interacting with sequence databases. Primary sequence database classes: - SequenceDB - base class for sequence databases - SequenceFileDB - file-based sequence database - PrefixUnionDict - container to combine multiple sequence databases - XMLRPCSequenceD...
false
true
1c00aa4175789d7072e5f92589a4bbb8d6f6fad8
11,707
py
Python
smop/lexer.py
raymanP/matlab2python
93cc0737f631221112935a76d7cbc45480c31f6d
[ "MIT" ]
49
2019-12-15T23:52:53.000Z
2022-03-31T12:52:07.000Z
smop/lexer.py
raymanP/matlab2python
93cc0737f631221112935a76d7cbc45480c31f6d
[ "MIT" ]
5
2021-09-11T21:30:30.000Z
2021-12-01T01:07:51.000Z
smop/lexer.py
raymanP/matlab2python
93cc0737f631221112935a76d7cbc45480c31f6d
[ "MIT" ]
7
2020-12-10T16:30:19.000Z
2022-03-14T03:05:57.000Z
# SMOP -- Simple Matlab/Octave to Python compiler # Copyright 2011-2016 Victor Leikehman import sys import re import ply.lex as lex import warnings warnings.simplefilter(action='ignore',category=FutureWarning) from ply.lex import TOKEN from . import options tokens = [ "AND", "ANDAND", "ANDEQ", "BACKSLASH", "COLO...
32.250689
84
0.475869
import sys import re import ply.lex as lex import warnings warnings.simplefilter(action='ignore',category=FutureWarning) from ply.lex import TOKEN from . import options tokens = [ "AND", "ANDAND", "ANDEQ", "BACKSLASH", "COLON", "COMMA", "DIV", "DIVEQ", "DOT", "DOTDIV", "DOTDIVEQ", "DOTEXP", "DOTMUL", "DOTMUL...
true
true
1c00ab50464e8c4936fa4b9a0af16808e6cd06a8
10,236
py
Python
dqn_agent.py
otanet/RLAS2021_chatbot_DeepRL_20220111
96c6c15ebd0f0c30f6532c64212eca48d134ba6a
[ "MIT" ]
null
null
null
dqn_agent.py
otanet/RLAS2021_chatbot_DeepRL_20220111
96c6c15ebd0f0c30f6532c64212eca48d134ba6a
[ "MIT" ]
null
null
null
dqn_agent.py
otanet/RLAS2021_chatbot_DeepRL_20220111
96c6c15ebd0f0c30f6532c64212eca48d134ba6a
[ "MIT" ]
null
null
null
from keras.models import Sequential from keras.layers import Dense # from keras.optimizers import Adam from tensorflow.keras.optimizers import Adam import random, copy import numpy as np from dialogue_config import rule_requests, agent_actions import re # Some of the code based off of https://jaromiru.com/2016/09/27/...
33.89404
119
0.614205
from keras.models import Sequential from keras.layers import Dense from tensorflow.keras.optimizers import Adam import random, copy import numpy as np from dialogue_config import rule_requests, agent_actions import re class DQNAgent: def __init__(self, state_size, constants): self.C = constants['agent...
true
true
1c00aba7b6ce79ca0c4f0cf8d7e80fadc575d69c
3,678
py
Python
docs/conf.py
kmetallic04/api-client
6f2cc68169807b01b533aab4ec53ee464c6114e9
[ "MIT" ]
null
null
null
docs/conf.py
kmetallic04/api-client
6f2cc68169807b01b533aab4ec53ee464c6114e9
[ "MIT" ]
null
null
null
docs/conf.py
kmetallic04/api-client
6f2cc68169807b01b533aab4ec53ee464c6114e9
[ "MIT" ]
1
2021-08-24T11:36:03.000Z
2021-08-24T11:36:03.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
34.055556
99
0.676998
import os import sys sys.path.insert(0, os.path.abspath('..')) project = 'Gro API Client' html_logo = '_images/logo.jpg' copyright = '2017-2021, Gro Intelligence' author = 'Gro Intelligence' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', ...
true
true
1c00ac0ca544aa407a462988e85d6e839eda6d1c
5,386
py
Python
saleor/graphql/order/mutations/fulfillment_refund_products.py
moalazzam/saleor
19a70a04af45ab0c62dc2b476c7c37a6aed4327c
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/mutations/fulfillment_refund_products.py
moalazzam/saleor
19a70a04af45ab0c62dc2b476c7c37a6aed4327c
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/mutations/fulfillment_refund_products.py
moalazzam/saleor
19a70a04af45ab0c62dc2b476c7c37a6aed4327c
[ "CC-BY-4.0" ]
null
null
null
import graphene from ....core.permissions import OrderPermissions from ....order import FulfillmentStatus from ....order import models as order_models from ....order.actions import create_refund_fulfillment from ....payment import PaymentError from ...core.scalars import PositiveDecimal from ...core.types import NonNu...
35.668874
87
0.644263
import graphene from ....core.permissions import OrderPermissions from ....order import FulfillmentStatus from ....order import models as order_models from ....order.actions import create_refund_fulfillment from ....payment import PaymentError from ...core.scalars import PositiveDecimal from ...core.types import NonNu...
true
true
1c00ac44447e43fd6362e12de0c36e940d892777
1,923
py
Python
examples/href_scorer.py
redfungus/webtraversallibrary
d5013edc061deba40e859dcfcda314c7055ce82a
[ "Apache-2.0" ]
41
2020-08-31T11:08:29.000Z
2022-03-27T04:21:49.000Z
examples/href_scorer.py
redfungus/webtraversallibrary
d5013edc061deba40e859dcfcda314c7055ce82a
[ "Apache-2.0" ]
153
2020-08-31T11:07:34.000Z
2022-03-25T04:03:52.000Z
examples/href_scorer.py
redfungus/webtraversallibrary
d5013edc061deba40e859dcfcda314c7055ce82a
[ "Apache-2.0" ]
5
2020-09-25T09:26:24.000Z
2021-08-05T12:27:07.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.155172
120
0.728549
import webtraversallibrary as wtl from webtraversallibrary.actions import Wait from .util import parse_cli_args @wtl.single_tab def policy(_, __): return Wait(10) def url_length_classifier_func(elements, _): # Score all elements with an href attribute with a score of the length of the href attribut...
true
true
1c00ae5f3495e57b0f2b016b66f6dc886b5b3b77
482
py
Python
frappe/patches/v13_0/replace_old_data_import.py
aakvatech/aakvafrappe
5e52de2dd3fd7a21782d4740c2d95ab68f78e138
[ "MIT" ]
null
null
null
frappe/patches/v13_0/replace_old_data_import.py
aakvatech/aakvafrappe
5e52de2dd3fd7a21782d4740c2d95ab68f78e138
[ "MIT" ]
null
null
null
frappe/patches/v13_0/replace_old_data_import.py
aakvatech/aakvafrappe
5e52de2dd3fd7a21782d4740c2d95ab68f78e138
[ "MIT" ]
null
null
null
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.rename_doc('DocType', 'Data Import', 'Data Import Legacy') frappe.db.commit() frappe.db.sql("DROP TABLE IF EXISTS `tabData Import`") frap...
32.133333
68
0.751037
from __future__ import unicode_literals import frappe def execute(): frappe.rename_doc('DocType', 'Data Import', 'Data Import Legacy') frappe.db.commit() frappe.db.sql("DROP TABLE IF EXISTS `tabData Import`") frappe.reload_doc("core", "doctype", "data_import") frappe.get_doc("DocType", "Data Import").on_update(...
true
true
1c00afef4f46a39d27d2a0aaf8596b40b2da87b3
524
py
Python
xen/xen-4.2.2/tools/xm-test/tests/console/01_console_badopt_neg.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
1
2018-02-02T00:15:26.000Z
2018-02-02T00:15:26.000Z
xen/xen-4.2.2/tools/xm-test/tests/console/01_console_badopt_neg.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
null
null
null
xen/xen-4.2.2/tools/xm-test/tests/console/01_console_badopt_neg.py
zhiming-shen/Xen-Blanket-NG
47e59d9bb92e8fdc60942df526790ddb983a5496
[ "Apache-2.0" ]
1
2019-05-27T09:47:18.000Z
2019-05-27T09:47:18.000Z
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Li Ge <lge@us.ibm.com> # Test Description: # Negative Tests: # Test console command with non existent option in the command line. # Verify fail. import re from XmTestLib import * status, output = traceCommand("xm console -x")...
23.818182
68
0.708015
import re from XmTestLib import * status, output = traceCommand("xm console -x") eyecatcher = "Error" where = output.find(eyecatcher) if status == 0: FAIL("xm console returned invalid %i != 0" % status) elif where == -1: FAIL("xm console didn't report error on bad argument")
true
true
1c00b01651bfa2461c63dfb41d201fe55becb512
2,541
py
Python
codes/utils.py
ishine/AFILM
be8b13ed3f45f4f58cbd37a9fe079d786be398e8
[ "MIT" ]
12
2021-10-22T02:28:46.000Z
2022-03-25T05:11:54.000Z
codes/utils.py
ishine/AFILM
be8b13ed3f45f4f58cbd37a9fe079d786be398e8
[ "MIT" ]
4
2021-11-01T04:11:02.000Z
2022-02-09T01:03:54.000Z
codes/utils.py
ishine/AFILM
be8b13ed3f45f4f58cbd37a9fe079d786be398e8
[ "MIT" ]
4
2021-11-14T11:01:58.000Z
2022-02-22T20:12:10.000Z
import os import numpy as np import h5py import librosa import soundfile as sf from scipy import interpolate from scipy.signal import decimate from matplotlib import pyplot as plt def load_h5(h5_path): with h5py.File(h5_path, 'r') as hf: print('List of arrays in input file:', list(hf.keys())) X =...
28.875
116
0.632822
import os import numpy as np import h5py import librosa import soundfile as sf from scipy import interpolate from scipy.signal import decimate from matplotlib import pyplot as plt def load_h5(h5_path): with h5py.File(h5_path, 'r') as hf: print('List of arrays in input file:', list(hf.keys())) X =...
true
true
1c00b0c957c74a06c0b2fe6932929dcbaf48fcf6
1,477
py
Python
methodnumeric.py
Jodainc/Method-Numerics-24.9-Point
f99ebc3eae6ee5b2ef35219c3fc3aaf333a4572d
[ "MIT" ]
null
null
null
methodnumeric.py
Jodainc/Method-Numerics-24.9-Point
f99ebc3eae6ee5b2ef35219c3fc3aaf333a4572d
[ "MIT" ]
null
null
null
methodnumeric.py
Jodainc/Method-Numerics-24.9-Point
f99ebc3eae6ee5b2ef35219c3fc3aaf333a4572d
[ "MIT" ]
null
null
null
import numpy as npp from matplotlib import pyplot as plt from numpy import array x_data = npp.array([87.8, 96.6, 176, 263, 351, 571,834,1129,1624,2107,2678,3380,4258]) y_data = npp.array([153,204,255,306,357,408,459,510,561,612,663,714,765]) s=[87.8, 96.6, 176, 263, 351, 571,834,1129,1624,2107,2678,3380,4258] #s1= ...
20.513889
86
0.571429
import numpy as npp from matplotlib import pyplot as plt from numpy import array x_data = npp.array([87.8, 96.6, 176, 263, 351, 571,834,1129,1624,2107,2678,3380,4258]) y_data = npp.array([153,204,255,306,357,408,459,510,561,612,663,714,765]) s=[87.8, 96.6, 176, 263, 351, 571,834,1129,1624,2107,2678,3380,4258] e=[15...
true
true
1c00b16efd2b2dba23f4d7ac2d2f5ebac10a747b
4,699
py
Python
remediation_worker/jobs/aws_sqs_queue_publicly_accessible/aws_sqs_queue_publicly_accessible.py
sreedevikr/secure-state-remediation-jobs
84c9a512c19eba9994af51d78a3c1a92f83d596c
[ "Apache-2.0" ]
13
2020-08-07T17:48:19.000Z
2022-02-17T17:17:04.000Z
remediation_worker/jobs/aws_sqs_queue_publicly_accessible/aws_sqs_queue_publicly_accessible.py
sreedevikr/secure-state-remediation-jobs
84c9a512c19eba9994af51d78a3c1a92f83d596c
[ "Apache-2.0" ]
27
2020-08-19T18:42:44.000Z
2021-10-04T05:35:05.000Z
remediation_worker/jobs/aws_sqs_queue_publicly_accessible/aws_sqs_queue_publicly_accessible.py
sreedevikr/secure-state-remediation-jobs
84c9a512c19eba9994af51d78a3c1a92f83d596c
[ "Apache-2.0" ]
23
2020-08-12T13:09:08.000Z
2021-09-16T11:59:17.000Z
# Copyright (c) 2020 VMware 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 agreed to in writi...
37.592
94
0.638859
from __future__ import annotations import json import logging import sys import boto3 logging.basicConfig(level=logging.INFO) class SqsQueuePubliclyAccessible: def parse(self, payload): remediation_entry = json.loads(payload) notification_info = remediation_entry.get("notificationInfo", None) ...
true
true
1c00b200f4eda93018753cb89fee44976b1c38fe
1,021
py
Python
numpy/typing/_array_like.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
3
2021-02-06T06:47:30.000Z
2021-08-11T10:05:27.000Z
numpy/typing/_array_like.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
null
null
null
numpy/typing/_array_like.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
null
null
null
import sys from typing import Any, overload, Sequence, TYPE_CHECKING, Union from numpy import ndarray from ._scalars import _ScalarLike from ._dtype_like import DtypeLike if sys.version_info >= (3, 8): from typing import Protocol HAVE_PROTOCOL = True else: try: from typing_extensions import Protoc...
24.902439
74
0.6905
import sys from typing import Any, overload, Sequence, TYPE_CHECKING, Union from numpy import ndarray from ._scalars import _ScalarLike from ._dtype_like import DtypeLike if sys.version_info >= (3, 8): from typing import Protocol HAVE_PROTOCOL = True else: try: from typing_extensions import Protoc...
true
true
1c00b260b1e665d077bbe2f4f02d9137216ebaea
334
py
Python
config/factories.py
thenandan/clone_bms
209e39bf908678b659193b7dfa08cc573b4e1cea
[ "MIT" ]
null
null
null
config/factories.py
thenandan/clone_bms
209e39bf908678b659193b7dfa08cc573b4e1cea
[ "MIT" ]
null
null
null
config/factories.py
thenandan/clone_bms
209e39bf908678b659193b7dfa08cc573b4e1cea
[ "MIT" ]
null
null
null
from orator.orm import Factory from app.models.User import User factory = Factory() def users_factory(faker): return { 'name': faker.name(), 'email': faker.email(), 'password': '$2b$12$WMgb5Re1NqUr.uSRfQmPQeeGWudk/8/aNbVMpD1dR.Et83vfL8WAu', # == 'secret' } factory.register(User, u...
19.647059
98
0.661677
from orator.orm import Factory from app.models.User import User factory = Factory() def users_factory(faker): return { 'name': faker.name(), 'email': faker.email(), 'password': '$2b$12$WMgb5Re1NqUr.uSRfQmPQeeGWudk/8/aNbVMpD1dR.Et83vfL8WAu', } factory.register(User, users_factory)
true
true
1c00b389688b3868cd89fc4c3a32205d972f2e83
483
py
Python
sift_pyx12/map/dump.py
sifthealthcare/sift-pyx12
97b38fd8b681f149570ac9d5cae0fe868a7722f2
[ "BSD-3-Clause" ]
null
null
null
sift_pyx12/map/dump.py
sifthealthcare/sift-pyx12
97b38fd8b681f149570ac9d5cae0fe868a7722f2
[ "BSD-3-Clause" ]
2
2021-11-12T18:35:11.000Z
2021-11-12T18:35:31.000Z
sift_pyx12/map/dump.py
sifthealthcare/sift-pyx12
97b38fd8b681f149570ac9d5cae0fe868a7722f2
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python import os.path import sys import sift_pyx12.error_handler import sift_pyx12.map_if from sift_pyx12.params import params import sift_pyx12.segment def donode(node): print((node.get_path())) for child in node.children: if child.is_loop() or child.is_segment(): donode...
21.954545
66
0.722567
import os.path import sys import sift_pyx12.error_handler import sift_pyx12.map_if from sift_pyx12.params import params import sift_pyx12.segment def donode(node): print((node.get_path())) for child in node.children: if child.is_loop() or child.is_segment(): donode(child) param = params...
true
true
1c00b51894ddc0c8e4321e86ba7715cff90a5381
8,124
py
Python
kubernetes_asyncio/client/models/v1_limit_range_item.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_limit_range_item.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_limit_range_item.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1LimitRan...
31.858824
260
0.612506
import pprint import re import six class V1LimitRangeItem(object): openapi_types = { 'default': 'dict(str, str)', 'default_request': 'dict(str, str)', 'max': 'dict(str, str)', 'max_limit_request_ratio': 'dict(str, str)', 'min': 'dict(str, str)', 'type': 'str' ...
true
true
1c00b5a13d23afe3c5e3c74a6b398a4661e27294
865
py
Python
server/auvsi_suas/migrations/0002_suas2020_rules.py
RMMichael/interop
b68a1b0b2324b5a1d9b2683b97299cb6f214cdb9
[ "Apache-2.0" ]
175
2015-09-15T15:37:06.000Z
2022-02-14T23:21:48.000Z
server/auvsi_suas/migrations/0002_suas2020_rules.py
RMMichael/interop
b68a1b0b2324b5a1d9b2683b97299cb6f214cdb9
[ "Apache-2.0" ]
376
2015-09-16T19:34:15.000Z
2022-02-19T12:55:55.000Z
server/auvsi_suas/migrations/0002_suas2020_rules.py
RMMichael/interop
b68a1b0b2324b5a1d9b2683b97299cb6f214cdb9
[ "Apache-2.0" ]
109
2015-09-16T17:05:14.000Z
2022-01-26T12:49:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-10-03 13:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auvsi_suas', '0001_initial'), ] operations = [ migrations.RemoveField( ...
27.03125
72
0.547977
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auvsi_suas', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='missionjudgefeedback', name='waypoints_ca...
true
true
1c00b77161cac89577f52a3d3713dcb56c6c1565
916
py
Python
python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
import json from dagster_slack import slack_resource from mock import patch from dagster import ModeDefinition, execute_solid, solid @patch("slack_sdk.WebClient.api_call") def test_slack_resource(mock_api_call): @solid(required_resource_keys={"slack"}) def slack_solid(context): assert context.resour...
27.757576
96
0.644105
import json from dagster_slack import slack_resource from mock import patch from dagster import ModeDefinition, execute_solid, solid @patch("slack_sdk.WebClient.api_call") def test_slack_resource(mock_api_call): @solid(required_resource_keys={"slack"}) def slack_solid(context): assert context.resour...
true
true
1c00b81c9cae1e166e6cba41a3dc735fc353121b
205,321
py
Python
tensorflow/python/ops/array_ops.py
Niram7777/tensorflow
0e40b3e0c30caff9427c1da54c40b6236608ec15
[ "Apache-2.0" ]
78
2020-08-04T12:36:25.000Z
2022-03-25T04:23:40.000Z
tensorflow/python/ops/array_ops.py
Niram7777/tensorflow
0e40b3e0c30caff9427c1da54c40b6236608ec15
[ "Apache-2.0" ]
1
2020-08-12T09:47:19.000Z
2020-08-12T09:47:19.000Z
tensorflow/python/ops/array_ops.py
Niram7777/tensorflow
0e40b3e0c30caff9427c1da54c40b6236608ec15
[ "Apache-2.0" ]
25
2020-08-31T12:21:19.000Z
2022-03-20T05:16:32.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.522664
129
0.629697
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numbers import numpy as np from tensorflow.python.eager import context from tensorflow.python.framework import common_shapes from tensorflow.python.framework import composite_tensor from tensorflow.pyt...
true
true
1c00b914456d0449e42a7f75ab43afedaad9b564
345
py
Python
django-rgd-imagery/rgd_imagery/migrations/0006_remove_imagemeta_number_of_bands.py
ResonantGeoData/ResonantGeoData
72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a
[ "Apache-2.0" ]
40
2020-05-07T17:15:26.000Z
2022-02-27T14:45:04.000Z
django-rgd-imagery/rgd_imagery/migrations/0006_remove_imagemeta_number_of_bands.py
ResonantGeoData/ResonantGeoData
72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a
[ "Apache-2.0" ]
408
2020-05-07T15:10:35.000Z
2022-03-30T03:08:47.000Z
django-rgd-imagery/rgd_imagery/migrations/0006_remove_imagemeta_number_of_bands.py
ResonantGeoData/ResonantGeoData
72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a
[ "Apache-2.0" ]
3
2021-04-12T20:16:22.000Z
2021-06-22T14:03:46.000Z
# Generated by Django 3.2.7 on 2021-09-12 22:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('rgd_imagery', '0005_raster_extra_fields'), ] operations = [ migrations.RemoveField( model_name='imagemeta', name='number_of_...
19.166667
52
0.611594
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('rgd_imagery', '0005_raster_extra_fields'), ] operations = [ migrations.RemoveField( model_name='imagemeta', name='number_of_bands', ), ]
true
true
1c00b95b97cbec3176d7b9bba8cd6ce2a94da11c
29,934
py
Python
grako/bootstrap.py
apalala/grako
efb373d89e6805930e661758c2cff2b26da4658a
[ "BSD-2-Clause" ]
21
2015-04-09T01:13:10.000Z
2021-04-05T09:31:39.000Z
grako/bootstrap.py
apalala/grako
efb373d89e6805930e661758c2cff2b26da4658a
[ "BSD-2-Clause" ]
2
2017-04-11T20:08:15.000Z
2017-04-11T22:05:09.000Z
grako/bootstrap.py
apalala/grako
efb373d89e6805930e661758c2cff2b26da4658a
[ "BSD-2-Clause" ]
3
2018-02-20T22:26:38.000Z
2020-02-25T14:19:45.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # CAVEAT UTILITOR # # This file was automatically generated by Grako. # # https://pypi.python.org/pypi/grako/ # # Any changes you make to it will be overwritten the next time # the file is generated. from __future__ import print_function, division, absolute_import, un...
26.327177
106
0.461649
from __future__ import print_function, division, absolute_import, unicode_literals from grako.buffering import Buffer from grako.parsing import graken, Parser from grako.util import re, RE_FLAGS, generic_main KEYWORDS = {} class EBNFBootstrapBuffer(Buffer): def __init__( self, text, ...
true
true
1c00b99b88b895ed4bd96814237fee548e21148d
956
py
Python
mmdet/datasets/pipelines/__init__.py
fengyouliang/wheat_detection
d056123426a1260c29b486cbb8e44a88a0a3c5bc
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/__init__.py
fengyouliang/wheat_detection
d056123426a1260c29b486cbb8e44a88a0a3c5bc
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/__init__.py
fengyouliang/wheat_detection
d056123426a1260c29b486cbb8e44a88a0a3c5bc
[ "Apache-2.0" ]
null
null
null
from .compose import Compose from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, Transpose, to_tensor) from .instaboost import InstaBoost from .loading import (LoadAnnotations, LoadImageFromFile, LoadMultiChannelImageFromFiles, LoadProposals) fr...
50.315789
80
0.683054
from .compose import Compose from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, Transpose, to_tensor) from .instaboost import InstaBoost from .loading import (LoadAnnotations, LoadImageFromFile, LoadMultiChannelImageFromFiles, LoadProposals) fr...
true
true
1c00b9a6e3c9c88bf5f74638943c345383c03f4c
293
py
Python
events/admin.py
CBR0MS/cmu-events
ad2910a556258af96c16b0b9db4817ba301222f1
[ "MIT" ]
null
null
null
events/admin.py
CBR0MS/cmu-events
ad2910a556258af96c16b0b9db4817ba301222f1
[ "MIT" ]
null
null
null
events/admin.py
CBR0MS/cmu-events
ad2910a556258af96c16b0b9db4817ba301222f1
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Topic, Organization, Event class EventAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} admin.site.register(Topic) admin.site.register(Organization) admin.site.register(Event, EventAdmin) # Register your models here.
26.636364
46
0.778157
from django.contrib import admin from .models import Topic, Organization, Event class EventAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} admin.site.register(Topic) admin.site.register(Organization) admin.site.register(Event, EventAdmin)
true
true
1c00ba727a3f5f568133a0c1e0be27f1b0bc2529
886
py
Python
tests/test_fields.py
HolisticCoders/metanode
5e63fadc74eeb634722e12c2bcdc45ca0688087e
[ "MIT" ]
null
null
null
tests/test_fields.py
HolisticCoders/metanode
5e63fadc74eeb634722e12c2bcdc45ca0688087e
[ "MIT" ]
null
null
null
tests/test_fields.py
HolisticCoders/metanode
5e63fadc74eeb634722e12c2bcdc45ca0688087e
[ "MIT" ]
null
null
null
from __future__ import absolute_import, with_statement import unittest import maya.cmds as cmds from hcmetanode.fields import Accessibility from hcmetanode.metanode import MetaNode from hcmetanode.validators import IntValidator class TestMetaNode(unittest.TestCase): def setUp(self): cmds.file(new=True,...
30.551724
81
0.752822
from __future__ import absolute_import, with_statement import unittest import maya.cmds as cmds from hcmetanode.fields import Accessibility from hcmetanode.metanode import MetaNode from hcmetanode.validators import IntValidator class TestMetaNode(unittest.TestCase): def setUp(self): cmds.file(new=True,...
true
true
1c00bac5517a7868b082c74cdb5ef8946883d9f3
1,344
py
Python
keyboard/layout.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
218
2016-03-19T20:59:17.000Z
2022-03-31T03:35:32.000Z
keyboard/layout.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
132
2016-02-23T06:16:32.000Z
2022-02-17T05:16:43.000Z
keyboard/layout.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
62
2016-03-19T20:59:26.000Z
2022-03-01T11:34:48.000Z
## -*- coding: utf-8 -*- # (C) 2013 Muthiah Annamalai # class borrowed from Ezhil language library class Keymap(dict): """ dictionary structure with a set like mathematical structure. that way when you insert functions for keymap library, we don't trample on each other by accidentally overwriting s...
33.6
117
0.573661
class Keymap(dict): def __init__(self): dict.__init__(self) def __setitem__(self, key, val): if (self.has_key(key)): raise KeyError(u"Dictionary is getting clobbered; key " + key + " already present") dict.__setitem__(self, key, val) class Layout: def __init__(self)...
true
true
1c00bbefcfe07acb4326f8c87e5d8d41ac233f86
1,139
py
Python
python_state_machine/models/__init__.py
girante/basic_state_machine
9f629b0e15f906655a64bce049088eb9e34f8b57
[ "MIT" ]
null
null
null
python_state_machine/models/__init__.py
girante/basic_state_machine
9f629b0e15f906655a64bce049088eb9e34f8b57
[ "MIT" ]
null
null
null
python_state_machine/models/__init__.py
girante/basic_state_machine
9f629b0e15f906655a64bce049088eb9e34f8b57
[ "MIT" ]
1
2020-07-28T08:37:16.000Z
2020-07-28T08:37:16.000Z
try: string_type = basestring except NameError: string_type = str class InvalidStateTransition(Exception): def __init__(self, current, unreachable): super().__init__("Invalid state transition from", current, "to", unreachable) class AbortStateTransition(Exception): def __init__(self, message):...
28.475
85
0.647059
try: string_type = basestring except NameError: string_type = str class InvalidStateTransition(Exception): def __init__(self, current, unreachable): super().__init__("Invalid state transition from", current, "to", unreachable) class AbortStateTransition(Exception): def __init__(self, message):...
true
true
1c00bde220e751655ba6c75bc9661d56550bc795
15,099
py
Python
Lib/wsgiref/validate.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
Lib/wsgiref/validate.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
Lib/wsgiref/validate.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php # Licensed to PSF under a Contributor Agreement """ Middlew...
34.160633
125
0.635671
__all__ = ['validator'] import re import sys import warnings header_re = re.compile(r'^[a-zA-Z][a-zA-Z0-9\-_]*$') bad_header_value_re = re.compile(r'[\000-\037]') class WSGIWarning(Warning): def assert_(cond, *args): if not cond: raise AssertionError(*args) def check_string_type(value, title): if ...
true
true
1c00be39e45dca9b3a69cef131d462ce3811b490
5,725
py
Python
blitzmanager/template_parser/blitz_parser.py
Hussam-Turjman/blitzmanager
e3d400358ac1196ba12afd8f9f3bc97a0e7bc7e5
[ "BSD-3-Clause" ]
null
null
null
blitzmanager/template_parser/blitz_parser.py
Hussam-Turjman/blitzmanager
e3d400358ac1196ba12afd8f9f3bc97a0e7bc7e5
[ "BSD-3-Clause" ]
null
null
null
blitzmanager/template_parser/blitz_parser.py
Hussam-Turjman/blitzmanager
e3d400358ac1196ba12afd8f9f3bc97a0e7bc7e5
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021-2022 The BlitzManager project Authors. All rights reserved. Use of this # source code is governed by a BSD-style license that can be found in the LICENSE file. import os import re from ..logger import reformat_comment, logger from ..path import Path def make_cmake_comment(comment: str): """...
31.11413
111
0.555459
import os import re from ..logger import reformat_comment, logger from ..path import Path def make_cmake_comment(comment: str): comment = reformat_comment(comment) res = [] for line in comment.split(os.linesep): res.append("# {}".format(line)) comment = "{}".format(os.linesep).join(res) ...
true
true
1c00bee5306e58fc03dda0cac1aab823f57be04f
1,215
py
Python
script popolamento DB/env/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
1
2020-10-21T04:51:46.000Z
2020-10-21T04:51:46.000Z
script popolamento DB/env/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
2
2020-10-23T06:51:04.000Z
2020-11-12T07:03:37.000Z
script popolamento DB/env/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
1
2019-05-29T15:24:24.000Z
2019-05-29T15:24:24.000Z
from __future__ import absolute_import, division, unicode_literals import re from . import base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(base.Filter): """Collapses whitespace except in p...
30.375
90
0.614815
from __future__ import absolute_import, division, unicode_literals import re from . import base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(base.Filter): spacePreserveElements = frozenset([...
true
true
1c00c147cd49a5bd708b37433a87e028fc9e75ae
11,341
py
Python
openquake/hazardlib/gsim/dowrickrhoades_2005.py
gfzriesgos/shakyground-lfs
2caf67cc32e6800286eded2df1efb05973ccf41b
[ "BSD-3-Clause" ]
1
2019-08-01T00:28:24.000Z
2019-08-01T00:28:24.000Z
openquake/hazardlib/gsim/dowrickrhoades_2005.py
gfzriesgos/shakyground-lfs
2caf67cc32e6800286eded2df1efb05973ccf41b
[ "BSD-3-Clause" ]
4
2018-08-31T14:14:35.000Z
2021-10-11T12:53:13.000Z
openquake/hazardlib/gsim/dowrickrhoades_2005.py
gfzriesgos/shakyground-lfs
2caf67cc32e6800286eded2df1efb05973ccf41b
[ "BSD-3-Clause" ]
3
2018-08-31T14:11:00.000Z
2019-07-17T10:06:02.000Z
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
35.330218
79
0.612468
import numpy as np from openquake.hazardlib.gsim.base import IPE, CoeffsTable from openquake.hazardlib import const from openquake.hazardlib.imt import MMI class DowrickRhoades2005Asc(IPE): DEFINED_FOR_TECTONIC_REGION_TYPE = const.TRT.ACTIVE_SHALLOW_CRUST DEFINED_FOR_INTENSITY_MEASURE_TYPES = set([...
true
true
1c00c15e9506f21c400c39a1f590d562dc250ac4
400
py
Python
setup.py
jayvdb/wmctrl
f87c99e8aa6108f4ad3deba9f6afeb52a12fc519
[ "MIT" ]
null
null
null
setup.py
jayvdb/wmctrl
f87c99e8aa6108f4ad3deba9f6afeb52a12fc519
[ "MIT" ]
null
null
null
setup.py
jayvdb/wmctrl
f87c99e8aa6108f4ad3deba9f6afeb52a12fc519
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='wmctrl', version='0.3', author='Antonio Cuni', author_email='anto.cuni@gmail.com', py_modules=['wmctrl'], url='http://bitbucket.org/antocuni/wmctrl', license='MIT', description='A tool to programmatically control windows inside X...
26.666667
74
0.7025
from setuptools import setup, find_packages setup( name='wmctrl', version='0.3', author='Antonio Cuni', author_email='anto.cuni@gmail.com', py_modules=['wmctrl'], url='http://bitbucket.org/antocuni/wmctrl', license='MIT', description='A tool to programmatically control windows inside X...
true
true
1c00c2cc463f8dd3a4e4e698ca256f92509a615c
2,405
py
Python
serverless/books/app.py
stivenramireza/bookstore
09ddec96a02746a91b63630ce5ed8feb62d6f02a
[ "MIT" ]
null
null
null
serverless/books/app.py
stivenramireza/bookstore
09ddec96a02746a91b63630ce5ed8feb62d6f02a
[ "MIT" ]
null
null
null
serverless/books/app.py
stivenramireza/bookstore
09ddec96a02746a91b63630ce5ed8feb62d6f02a
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, make_response,request from flask_cors import CORS from pymongo import MongoClient from bson import ObjectId import json import os import sys import pymongo class JSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, ObjectId): return str(o) ...
27.329545
254
0.649064
from flask import Flask, jsonify, make_response,request from flask_cors import CORS from pymongo import MongoClient from bson import ObjectId import json import os import sys import pymongo class JSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, ObjectId): return str(o) ...
true
true
1c00c492ec75f9358f086932329dc023b9fc92b9
10,308
py
Python
src/frr/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
zhouhaifeng/vpe
9c644ffd561988e5740021ed26e0f7739844353d
[ "Apache-2.0" ]
null
null
null
src/frr/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
zhouhaifeng/vpe
9c644ffd561988e5740021ed26e0f7739844353d
[ "Apache-2.0" ]
null
null
null
src/frr/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
zhouhaifeng/vpe
9c644ffd561988e5740021ed26e0f7739844353d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # test_bgp_update_delay.py # Part of NetDEF Topology Tests # # Copyright (c) 2019 by # Don Slice <dslice@nvidia.com> # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above copyright notice and this ...
33.359223
93
0.688106
import os import sys import json import pytest import functools CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen pytestmark = [pytest.mark.bgpd] CWD = os.path.dirname(os.path.realpath(__f...
true
true
1c00c51dbbd7d3ac777974eea9dbea63a30953c4
1,921
py
Python
backend/users/views.py
jochanmin/Blog
465dcb951ebe2e2fabcd81d0c4e0221decc66ccc
[ "MIT" ]
11
2020-04-26T13:55:08.000Z
2022-01-27T08:30:03.000Z
backend/users/views.py
jochanmin/Blog
465dcb951ebe2e2fabcd81d0c4e0221decc66ccc
[ "MIT" ]
26
2020-09-27T16:14:36.000Z
2022-01-08T13:29:14.000Z
backend/users/views.py
jochanmin/Blog
465dcb951ebe2e2fabcd81d0c4e0221decc66ccc
[ "MIT" ]
3
2020-05-22T20:01:56.000Z
2022-01-08T08:40:37.000Z
from django.shortcuts import render from django.core import serializers from .models import User from django.forms.models import model_to_dict from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions...
36.942308
100
0.668922
from django.shortcuts import render from django.core import serializers from .models import User from django.forms.models import model_to_dict from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions...
true
true
1c00c5822020bd05c2456d0e071aeb5b32a83198
1,989
py
Python
pploss.py
starxchina/Patch-Diffusion
97f4881ae04c335fc1a13ded432d8e10a47df5f0
[ "MIT" ]
null
null
null
pploss.py
starxchina/Patch-Diffusion
97f4881ae04c335fc1a13ded432d8e10a47df5f0
[ "MIT" ]
null
null
null
pploss.py
starxchina/Patch-Diffusion
97f4881ae04c335fc1a13ded432d8e10a47df5f0
[ "MIT" ]
null
null
null
import torch import torch.nn as nn class PPLoss(nn.Module): def __init__(self, dist_bg_fake=15.0, dist_bg_real=2.0, dist_fake_real=17.0): """pairwise patch loss Args: dist_bg_fake (float, optional): distance between background patch and fake patch. Defaults to 15.0. dist_bg...
47.357143
141
0.629965
import torch import torch.nn as nn class PPLoss(nn.Module): def __init__(self, dist_bg_fake=15.0, dist_bg_real=2.0, dist_fake_real=17.0): super(PPLoss, self).__init__() self.dist_bg_fake = dist_bg_fake self.dist_bg_real = dist_bg_real self.dist_fake_real = dist_fake_real sel...
true
true
1c00c5de81895c4c5d29f56a1b189c98f4c90c30
8,045
py
Python
nicos_mlz/kws1/gui/cmdlets.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/kws1/gui/cmdlets.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
4
2019-11-08T10:18:16.000Z
2021-01-13T13:07:29.000Z
nicos_mlz/kws1/gui/cmdlets.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
36.90367
86
0.586078
from nicos.clients.gui.cmdlets import Cmdlet, register from nicos.guisupport.qt import QDialog, QIcon, QMessageBox, QSize, \ QTableWidgetItem, QToolButton, pyqtSlot from nicos.utils import findResource, formatDuration from nicos_mlz.kws1.gui.measdialogs import LOOPS, DetsetDialog, \ DevicesDialog, MeasDef, R...
true
true
1c00c60f1d9a869bfe154d720eb0531294bf2239
10,132
py
Python
bittrex.py
Dexter-Maine/Eeveaem
ba9b551971d64274a7e5dd5ac87f820a96ab5060
[ "MIT" ]
null
null
null
bittrex.py
Dexter-Maine/Eeveaem
ba9b551971d64274a7e5dd5ac87f820a96ab5060
[ "MIT" ]
null
null
null
bittrex.py
Dexter-Maine/Eeveaem
ba9b551971d64274a7e5dd5ac87f820a96ab5060
[ "MIT" ]
null
null
null
""" See https://bittrex.com/Home/Api """ import time import hmac import hashlib try: from urllib import urlencode from urlparse import urljoin except ImportError: from urllib.parse import urlencode from urllib.parse import urljoin import requests BUY_ORDERBOOK = 'buy' SELL_ORDERBOOK = 'sell' BOTH_O...
29.453488
118
0.608567
import time import hmac import hashlib try: from urllib import urlencode from urlparse import urljoin except ImportError: from urllib.parse import urlencode from urllib.parse import urljoin import requests BUY_ORDERBOOK = 'buy' SELL_ORDERBOOK = 'sell' BOTH_ORDERBOOK = 'both' BASE_URL = 'https://bittr...
true
true
1c00c685b236873173d11ac9b88a539b43b7105f
2,668
py
Python
play/flaskSecurityServer2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
null
null
null
play/flaskSecurityServer2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
2
2021-02-08T20:23:17.000Z
2021-04-30T20:42:00.000Z
play/flaskSecurityServer2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
2
2016-05-26T20:24:00.000Z
2019-08-01T03:11:49.000Z
from flask import Flask, render_template from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, \ UserMixin, RoleMixin, login_required # At top of file #from flask_mail import Mail # Create app app = Flask(__name__) app.config['DEBUG'] = True app.config['SEC...
30.318182
87
0.687781
from flask import Flask, render_template from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, \ UserMixin, RoleMixin, login_required app = Flask(__name__) app.config['DEBUG'] = True app.config['SECRET_KEY'] = 'super-secret' app.config['SQLALCHEMY_DATABASE_...
false
true
1c00c78eab8d8a294f799428ced1211673ac13f9
1,739
py
Python
clock.py
kevkong/KevRaspClock
f37b9a20dfe9f5bea04eb4bc67e0abc152ff8ce1
[ "MIT" ]
null
null
null
clock.py
kevkong/KevRaspClock
f37b9a20dfe9f5bea04eb4bc67e0abc152ff8ce1
[ "MIT" ]
null
null
null
clock.py
kevkong/KevRaspClock
f37b9a20dfe9f5bea04eb4bc67e0abc152ff8ce1
[ "MIT" ]
null
null
null
from datetime import datetime as dt import time class CLOCK(object): def __init__(self, alarms): print ("Starting Clock") self.dateFormat = "%d-%b-%Y" self.timeFormat = "%H:%M:%S" self.dayFormat = "%A" self.datetime = dt.today() self.date = self.datetime.strftime(sel...
36.229167
83
0.523289
from datetime import datetime as dt import time class CLOCK(object): def __init__(self, alarms): print ("Starting Clock") self.dateFormat = "%d-%b-%Y" self.timeFormat = "%H:%M:%S" self.dayFormat = "%A" self.datetime = dt.today() self.date = self.datetime.strftime(sel...
true
true
1c00c82f9887063c42c9de948883ba7c6e388ccd
12,916
py
Python
pyleecan/Classes/LamSlotMag.py
stephane-eisen/pyleecan
8444b8131c9eff11a616da8277fb1f280c8f70e5
[ "Apache-2.0" ]
1
2021-07-08T01:27:24.000Z
2021-07-08T01:27:24.000Z
pyleecan/Classes/LamSlotMag.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/LamSlotMag.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/LamSlotMag.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/LamSlotMag """ from os import linesep from sys import getsizeof fro...
33.635417
109
0.600108
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import im...
true
true
1c00c90decdbc520b3c8b8dba9f8c28b67c0f196
4,847
py
Python
experiments/ashvin/vae/reacher2d/test_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/vae/reacher2d/test_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/vae/reacher2d/test_vae2.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
from rlkit.envs.multitask.multitask_env import MultitaskToFlatEnv from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv from rlkit.envs.mujoco.pusher2d import Pusher2DEnv from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.exploration_strategies.base import ( PolicyWrappedWithExplorationStrategy...
33.19863
96
0.660615
from rlkit.envs.multitask.multitask_env import MultitaskToFlatEnv from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv from rlkit.envs.mujoco.pusher2d import Pusher2DEnv from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.exploration_strategies.base import ( PolicyWrappedWithExplorationStrategy...
true
true
1c00c92e42656c8671a75222fd79189bab06f870
9,248
py
Python
extraPackages/matplotlib-3.0.3/examples/misc/demo_agg_filter.py
dolboBobo/python3_ios
877f8c2c5890f26292ddd14909bea62a04fe2889
[ "BSD-3-Clause" ]
130
2018-02-03T10:25:54.000Z
2022-03-25T22:27:22.000Z
extraPackages/matplotlib-3.0.2/examples/misc/demo_agg_filter.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
9
2018-12-14T07:31:42.000Z
2020-12-09T20:29:28.000Z
extraPackages/matplotlib-3.0.2/examples/misc/demo_agg_filter.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
""" =============== Demo Agg Filter =============== """ import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import matplotlib.transforms as mtransforms from matplotlib.colors import LightSource from matplotlib.artist import Artist def smooth1d(x, window_len): # copied from http://www.s...
28.024242
77
0.582612
import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import matplotlib.transforms as mtransforms from matplotlib.colors import LightSource from matplotlib.artist import Artist def smooth1d(x, window_len): s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]] ...
true
true
1c00ca1f5f2b0c4ed905fa09ca45b811f658dd6f
204,306
bzl
Python
repos.bzl
Traiana/test-infra
104a16299b25146f368e4797ab1a28307ba6d25d
[ "Apache-2.0" ]
1
2021-11-09T10:21:14.000Z
2021-11-09T10:21:14.000Z
repos.bzl
rocha-bruno/test-infra
f5d97fb113464252fc6bc7e3977356b7a8bb2ba1
[ "Apache-2.0" ]
1
2021-01-20T02:14:56.000Z
2021-01-20T02:14:56.000Z
repos.bzl
rifelpet/test-infra
0ac0e5347b38bd455eb33d5be68d46042cc6a31f
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
38.166636
81
0.637593
load("@bazel_gazelle//:deps.bzl", "go_repository") def go_repositories(): go_repository( name = "cc_mvdan_xurls_v2", build_file_generation = "on", build_file_proto_mode = "disable", importpath = "mvdan.cc/xurls/v2", sum = "h1:r1zSOSNS/kqtpmATyMMMvaZ4/djsesbYz5kr0+qMRWc=", ...
true
true
1c00ca90abf1d22b9b1d3de2d7a35d364fd42327
1,390
py
Python
fsl_sub/tests/test_projects.py
mcraig-ibme/fsl_sub
6db9b70e90579c6fc6965c5a4eeeb8206267011c
[ "FTL", "CNRI-Python", "RSA-MD", "Linux-OpenIB" ]
null
null
null
fsl_sub/tests/test_projects.py
mcraig-ibme/fsl_sub
6db9b70e90579c6fc6965c5a4eeeb8206267011c
[ "FTL", "CNRI-Python", "RSA-MD", "Linux-OpenIB" ]
null
null
null
fsl_sub/tests/test_projects.py
mcraig-ibme/fsl_sub
6db9b70e90579c6fc6965c5a4eeeb8206267011c
[ "FTL", "CNRI-Python", "RSA-MD", "Linux-OpenIB" ]
null
null
null
#!/usr/bin/env python import unittest import fsl_sub.projects from unittest.mock import patch class TestConfig(unittest.TestCase): @patch('fsl_sub.projects.project_list', autospec=True) def test_project_exists(self, mock_project_list): mock_project_list.return_value = ['aproject', 'bproject', ] ...
42.121212
78
0.648921
import unittest import fsl_sub.projects from unittest.mock import patch class TestConfig(unittest.TestCase): @patch('fsl_sub.projects.project_list', autospec=True) def test_project_exists(self, mock_project_list): mock_project_list.return_value = ['aproject', 'bproject', ] self.assertTrue(fs...
true
true
1c00cb6216f0a59dc8c1aa41d6bb47b04fc91469
8,997
py
Python
wiki/MoinMoin/security/textcha.py
simtk/src
52086415ef60527e6556698c6e216e4217961d53
[ "BSD-2-Clause", "MIT" ]
null
null
null
wiki/MoinMoin/security/textcha.py
simtk/src
52086415ef60527e6556698c6e216e4217961d53
[ "BSD-2-Clause", "MIT" ]
3
2020-06-26T21:21:32.000Z
2020-06-26T21:21:36.000Z
wiki/MoinMoin/security/textcha.py
simtk/src
52086415ef60527e6556698c6e216e4217961d53
[ "BSD-2-Clause", "MIT" ]
2
2017-01-25T20:06:44.000Z
2021-03-25T18:39:55.000Z
# -*- coding: iso-8859-1 -*- """ MoinMoin - Text CAPTCHAs This is just asking some (admin configured) questions and checking if the answer is as expected. It is up to the wiki admin to setup questions that a bot can not easily answer, but humans can. It is recommended to setup SITE SPECIFIC questio...
39.634361
141
0.575859
""" MoinMoin - Text CAPTCHAs This is just asking some (admin configured) questions and checking if the answer is as expected. It is up to the wiki admin to setup questions that a bot can not easily answer, but humans can. It is recommended to setup SITE SPECIFIC questions and not to share the q...
false
true
1c00cbada1e6779f721f887e63efa9ecfe91a228
3,317
py
Python
mapss/static/packages/arches/arches/management/commands/fn.py
MPI-MAPSS/MAPSS
3a5c0109758801717aaa8de1125ca5e98f83d3b4
[ "CC0-1.0" ]
null
null
null
mapss/static/packages/arches/arches/management/commands/fn.py
MPI-MAPSS/MAPSS
3a5c0109758801717aaa8de1125ca5e98f83d3b4
[ "CC0-1.0" ]
null
null
null
mapss/static/packages/arches/arches/management/commands/fn.py
MPI-MAPSS/MAPSS
3a5c0109758801717aaa8de1125ca5e98f83d3b4
[ "CC0-1.0" ]
null
null
null
""" ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Founda...
29.096491
134
0.624661
import os import uuid from arches.management.commands import utils from arches.app.models import models from django.core.management.base import BaseCommand, CommandError from django.db.utils import IntegrityError class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument("operation...
true
true
1c00cc11b185c5e101f587383cbbc3a22798e1d0
7,929
py
Python
greenweb/settings/common.py
thegreenwebfoundation/admin-portal
65882871bd8c7a088127dcaf25aa534753cf51fa
[ "Apache-2.0" ]
10
2020-11-23T22:47:26.000Z
2022-01-28T16:26:50.000Z
greenweb/settings/common.py
thegreenwebfoundation/admin-portal
65882871bd8c7a088127dcaf25aa534753cf51fa
[ "Apache-2.0" ]
83
2020-05-17T20:25:50.000Z
2022-03-29T18:11:50.000Z
greenweb/settings/common.py
thegreenwebfoundation/admin-portal
65882871bd8c7a088127dcaf25aa534753cf51fa
[ "Apache-2.0" ]
3
2020-11-30T00:13:45.000Z
2021-06-11T13:42:04.000Z
""" Django settings for Greenweb foundation project. Generated by 'django-admin startproject' using Django. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import...
29.258303
99
0.698575
import os import environ ROOT = environ.Path(__file__) - 3 env = environ.Env( DEBUG=(bool, False), SECRET_KEY=(str, os.getenv("SECRET_KEY")), DATABASE_URL=(str, os.getenv("DATABASE_URL")), DOMAIN_SNAPSHOT_BUCKET=(str, os.getenv("DOMAIN_SNAPSHOT_BUCKET")), OBJECT_STORAGE_ENDPOINT=(str, os.geten...
true
true
1c00cc891e6e06d5d6e4fb9f88b7a07fffd8298d
1,743
py
Python
tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py
Andrka/wemake-python-styleguide
0c55d4134ee0e236d5dd1b2b5ef1c74def0e804c
[ "MIT" ]
1
2020-05-21T17:58:52.000Z
2020-05-21T17:58:52.000Z
tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py
RJ722/wemake-python-styleguide
bca3c673cf6802bb1ed53b1c547924a601c0bbc5
[ "MIT" ]
null
null
null
tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py
RJ722/wemake-python-styleguide
bca3c673cf6802bb1ed53b1c547924a601c0bbc5
[ "MIT" ]
1
2020-05-21T17:59:46.000Z
2020-05-21T17:59:46.000Z
import pytest from wemake_python_styleguide.violations.naming import ( TooShortNameViolation, TrailingUnderscoreViolation, ) from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor @pytest.mark.parametrize('short_name', [ 'y', '_y', ]) def test_short_variable_name( assert_errors...
23.554054
73
0.722892
import pytest from wemake_python_styleguide.violations.naming import ( TooShortNameViolation, TrailingUnderscoreViolation, ) from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor @pytest.mark.parametrize('short_name', [ 'y', '_y', ]) def test_short_variable_name( assert_errors...
true
true
1c00ccb1c7f53c5e6351b20ac1eb6b8f2bcd1caf
3,798
py
Python
django_mobile/__init__.py
yamnikov-oleg/django-mobile
323f11eb2d92b629f844b5b4b8d84ba3a4b3a8b2
[ "BSD-3-Clause" ]
null
null
null
django_mobile/__init__.py
yamnikov-oleg/django-mobile
323f11eb2d92b629f844b5b4b8d84ba3a4b3a8b2
[ "BSD-3-Clause" ]
null
null
null
django_mobile/__init__.py
yamnikov-oleg/django-mobile
323f11eb2d92b629f844b5b4b8d84ba3a4b3a8b2
[ "BSD-3-Clause" ]
3
2019-07-02T11:41:55.000Z
2022-01-31T14:03:50.000Z
# vim:fileencoding=utf-8 __author__ = u'Gregor Müllegger' __version__ = '0.8.0+whyfly.4' import threading from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import smart_str from django_mobile.conf import settings _local = threading.local() class SessionBackend(object): def ge...
30.878049
75
0.673512
__author__ = u'Gregor Müllegger' __version__ = '0.8.0+whyfly.4' import threading from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import smart_str from django_mobile.conf import settings _local = threading.local() class SessionBackend(object): def get(self, request, default=...
true
true
1c00cf0bc886d39fccde5cf1f8464400a328a484
13,283
py
Python
solver_classification.py
shaominghe/stargan_adience
7b59cae38acd0f32bf63695280b833ba7366e804
[ "MIT" ]
null
null
null
solver_classification.py
shaominghe/stargan_adience
7b59cae38acd0f32bf63695280b833ba7366e804
[ "MIT" ]
null
null
null
solver_classification.py
shaominghe/stargan_adience
7b59cae38acd0f32bf63695280b833ba7366e804
[ "MIT" ]
null
null
null
from model import Generator from model import Discriminator from torch.autograd import Variable from torchvision.utils import save_image import torch import torch.nn.functional as F import numpy as np from model_agecomparison import Classificationmodel, getCossloss, getKLloss import os import time import datetime from ...
40.996914
146
0.530904
from model import Generator from model import Discriminator from torch.autograd import Variable from torchvision.utils import save_image import torch import torch.nn.functional as F import numpy as np from model_agecomparison import Classificationmodel, getCossloss, getKLloss import os import time import datetime from ...
true
true
1c00d0243d3a0a2eac30e963234a2a1836a79dd4
2,974
py
Python
vivisect/analysis/elf/libc_start_main.py
rnui2k/vivisect
b7b00f2d03defef28b4b8c912e3a8016e956c5f7
[ "ECL-2.0", "Apache-2.0" ]
16
2015-12-10T06:18:16.000Z
2021-09-11T21:42:16.000Z
vivisect/analysis/elf/libc_start_main.py
rnui2k/vivisect
b7b00f2d03defef28b4b8c912e3a8016e956c5f7
[ "ECL-2.0", "Apache-2.0" ]
5
2018-10-12T21:07:24.000Z
2018-10-12T21:08:49.000Z
vivisect/analysis/elf/libc_start_main.py
rnui2k/vivisect
b7b00f2d03defef28b4b8c912e3a8016e956c5f7
[ "ECL-2.0", "Apache-2.0" ]
6
2016-03-20T11:15:51.000Z
2021-08-06T07:32:42.000Z
import sys import logging import envi import vivisect.const as v_const import vivisect.impemu.monitor as viv_imp_monitor logger = logging.getLogger(__name__) def getMainVas(vw): ret = [] for va, name in vw.getNames(): lcsm = '__libc_start_main_%.8x' % va if name in (lcsm, "*."+lcsm): ...
30.040404
87
0.586416
import sys import logging import envi import vivisect.const as v_const import vivisect.impemu.monitor as viv_imp_monitor logger = logging.getLogger(__name__) def getMainVas(vw): ret = [] for va, name in vw.getNames(): lcsm = '__libc_start_main_%.8x' % va if name in (lcsm, "*."+lcsm): ...
true
true
1c00d0931a38b9179841f46d0187894182a475c8
1,219
py
Python
pedigree/urls.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
5
2021-01-14T03:34:42.000Z
2022-03-07T15:34:18.000Z
pedigree/urls.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
551
2020-10-19T00:02:38.000Z
2022-03-30T02:18:22.000Z
pedigree/urls.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
null
null
null
from library.django_utils.jqgrid_view import JQGridView from pedigree import views, views_autocomplete from pedigree.grids import PedFilesGrid, PedigreeGrid from variantgrid.perm_path import perm_path urlpatterns = [ perm_path('pedigrees', views.pedigrees, name='pedigrees'), perm_path('view_pedigree/<int:pedi...
60.95
217
0.798195
from library.django_utils.jqgrid_view import JQGridView from pedigree import views, views_autocomplete from pedigree.grids import PedFilesGrid, PedigreeGrid from variantgrid.perm_path import perm_path urlpatterns = [ perm_path('pedigrees', views.pedigrees, name='pedigrees'), perm_path('view_pedigree/<int:pedi...
true
true
1c00d15c3c85f420b433a593d2c1916a575552da
2,927
py
Python
day05/login_app/migrations/0001_initial.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
day05/login_app/migrations/0001_initial.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
1
2020-12-09T18:26:36.000Z
2020-12-09T18:26:36.000Z
day05/login_app/migrations/0001_initial.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-10-26 21:31 from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True ...
63.630435
329
0.668261
from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'...
true
true
1c00d211cd5f38e7447226464beff214e9a19ee7
79,196
py
Python
moto/iam/responses.py
csmurton/moto
b433399cb582cb5084c88e8d70ba08e9395c1d07
[ "Apache-2.0" ]
null
null
null
moto/iam/responses.py
csmurton/moto
b433399cb582cb5084c88e8d70ba08e9395c1d07
[ "Apache-2.0" ]
null
null
null
moto/iam/responses.py
csmurton/moto
b433399cb582cb5084c88e8d70ba08e9395c1d07
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from moto.core.responses import BaseResponse from .models import iam_backend, User class IamResponse(BaseResponse): def attach_role_policy(self): policy_arn = self._get_param('PolicyArn') role_name = self._get_param('RoleName') iam_backend.attach_...
38.388754
138
0.681146
from __future__ import unicode_literals from moto.core.responses import BaseResponse from .models import iam_backend, User class IamResponse(BaseResponse): def attach_role_policy(self): policy_arn = self._get_param('PolicyArn') role_name = self._get_param('RoleName') iam_backend.attach_...
true
true
1c00d2920523a0d1adcbd258ae7d726b45a0919d
13,216
py
Python
archive/nucleus_encoder/results/11/conv_sup_regression_baseline.py
peterdonnelly1/u24_lymphocyte
dff7ceed404c38582feb81aa9b8a55d80ada0f77
[ "BSD-3-Clause" ]
23
2018-08-23T03:58:37.000Z
2022-02-23T05:04:54.000Z
archive/nucleus_encoder/results/11/conv_sup_regression_baseline.py
peterdonnelly1/u24_lymphocyte
dff7ceed404c38582feb81aa9b8a55d80ada0f77
[ "BSD-3-Clause" ]
8
2018-07-20T20:54:51.000Z
2020-06-12T05:36:04.000Z
archive/nucleus_encoder/results/11/conv_sup_regression_baseline.py
peterdonnelly1/u24_lymphocyte
dff7ceed404c38582feb81aa9b8a55d80ada0f77
[ "BSD-3-Clause" ]
22
2018-05-21T23:57:20.000Z
2022-02-21T00:48:32.000Z
import pickle import sys import os import urllib import gzip import cPickle import time import lasagne import theano import numpy as np import theano.tensor as T import matplotlib.pyplot as plt from lasagne import layers from lasagne import regularization from lasagne.updates import nesterov_momentum from nolearn.lasag...
40.415902
146
0.650272
import pickle import sys import os import urllib import gzip import cPickle import time import lasagne import theano import numpy as np import theano.tensor as T import matplotlib.pyplot as plt from lasagne import layers from lasagne import regularization from lasagne.updates import nesterov_momentum from nolearn.lasag...
false
true
1c00d62e18b34f23f832b0ea85ea86d9b8a20ef9
6,753
py
Python
insights/client/insights_spec.py
huali027/insights-core
1dd715c1206d634eee91b16e8e715c72fe660cbd
[ "Apache-2.0" ]
null
null
null
insights/client/insights_spec.py
huali027/insights-core
1dd715c1206d634eee91b16e8e715c72fe660cbd
[ "Apache-2.0" ]
10
2018-04-16T15:38:04.000Z
2018-05-15T18:43:02.000Z
insights/client/insights_spec.py
eduardocerqueira/insights-core
265b2cecee00399f21df762fff0a992fc3b5bb25
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import os import errno import shlex import logging import six from subprocess import Popen, PIPE, STDOUT from tempfile import NamedTemporaryFile from insights.util import mangle from .constants import InsightsConstants as constants from .utilities import determine_hostname logge...
34.630769
87
0.579742
from __future__ import absolute_import import os import errno import shlex import logging import six from subprocess import Popen, PIPE, STDOUT from tempfile import NamedTemporaryFile from insights.util import mangle from .constants import InsightsConstants as constants from .utilities import determine_hostname logge...
true
true
1c00d7ebc798cfdd232becbf8d04bf216d71be4b
445
py
Python
socket_test/tcp_server.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
socket_test/tcp_server.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
socket_test/tcp_server.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- from socketserver import ThreadingTCPServer, StreamRequestHandler class EchoHandler(StreamRequestHandler): def handle(self): print('连接来自:', self.client_address) self.data = self.request.recv(1024).strip() print(self.data) self.wfile.wr...
26.176471
66
0.674157
from socketserver import ThreadingTCPServer, StreamRequestHandler class EchoHandler(StreamRequestHandler): def handle(self): print('连接来自:', self.client_address) self.data = self.request.recv(1024).strip() print(self.data) self.wfile.write(b'200 OK') if __name__ == '__main__': ...
true
true
1c00d9a18ab4da6dfa7afa241fbb8a683fd39a36
3,758
py
Python
test/net/integration/dhcpd_dhclient_linux/test.py
KristianJerpetjon/IncludeOS
367a1dcefafd6f9618e5373c9133839f9ee2d675
[ "Apache-2.0" ]
1
2019-09-14T09:58:20.000Z
2019-09-14T09:58:20.000Z
test/net/integration/dhcpd_dhclient_linux/test.py
KristianJerpetjon/IncludeOS
367a1dcefafd6f9618e5373c9133839f9ee2d675
[ "Apache-2.0" ]
1
2016-06-28T13:30:26.000Z
2016-06-28T13:30:26.000Z
test/net/integration/dhcpd_dhclient_linux/test.py
KristianJerpetjon/IncludeOS
367a1dcefafd6f9618e5373c9133839f9ee2d675
[ "Apache-2.0" ]
1
2019-09-14T09:58:31.000Z
2019-09-14T09:58:31.000Z
#! /usr/bin/env python import sys import os import time import subprocess from threading import Timer includeos_src = os.environ.get('INCLUDEOS_SRC', os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0]) sys.path.insert(0,includeos_src) from vmrunne...
28.469697
120
0.663651
import sys import os import time import subprocess from threading import Timer includeos_src = os.environ.get('INCLUDEOS_SRC', os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0]) sys.path.insert(0,includeos_src) from vmrunner import vmrunner impor...
false
true
1c00daafd5fdeeddf048e46127e6f8c667f53a96
4,224
py
Python
test/functional/interface_zmq.py
pocketnetapp/pocketnet.core
2bdcd58bd8a4210d1117c06d52295c0b62c4061d
[ "Apache-2.0" ]
1
2022-02-07T14:19:54.000Z
2022-02-07T14:19:54.000Z
test/functional/interface_zmq.py
pocketnetapp/pocketnet.core
2bdcd58bd8a4210d1117c06d52295c0b62c4061d
[ "Apache-2.0" ]
null
null
null
test/functional/interface_zmq.py
pocketnetapp/pocketnet.core
2bdcd58bd8a4210d1117c06d52295c0b62c4061d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2022 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 the ZMQ notification interface.""" import struct from test_framework.test_framework import Pocket...
34.622951
129
0.639678
import struct from test_framework.test_framework import PocketcoinTestFramework from test_framework.messages import CTransaction from test_framework.util import ( assert_equal, bytes_to_hex_str, hash256, ) from io import BytesIO class ZMQSubscriber: def __init__(self, socket, topic): self.seq...
true
true
1c00db57df4447650f17900b0d5af0c16ea89f04
132
py
Python
experiment/decision_tree/mdp/__init__.py
junkilee/stable-baselines3
e191f08673afb8c432a73469a837b060d71e2d1f
[ "MIT" ]
null
null
null
experiment/decision_tree/mdp/__init__.py
junkilee/stable-baselines3
e191f08673afb8c432a73469a837b060d71e2d1f
[ "MIT" ]
null
null
null
experiment/decision_tree/mdp/__init__.py
junkilee/stable-baselines3
e191f08673afb8c432a73469a837b060d71e2d1f
[ "MIT" ]
null
null
null
"""__init__.py file for the mdp subpackage.""" from experiment.decision_tree.mdp.core import MDP, State __all__ = ["MDP", "State"]
26.4
56
0.727273
from experiment.decision_tree.mdp.core import MDP, State __all__ = ["MDP", "State"]
true
true
1c00dca2226613dfdc0229bde140196ffedec5a3
661
py
Python
setup.py
eaybek/utilio
5299558adce907ac40ef46da3e2ce8d4b5e16324
[ "MIT" ]
null
null
null
setup.py
eaybek/utilio
5299558adce907ac40ef46da3e2ce8d4b5e16324
[ "MIT" ]
null
null
null
setup.py
eaybek/utilio
5299558adce907ac40ef46da3e2ce8d4b5e16324
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="utilio", version="0.0.1", author="Erdem Aybek", author_email="eaybek@gmail.com", description=" ".join([""]), long_description=long_description, long_description_content_type="text/...
27.541667
50
0.630862
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="utilio", version="0.0.1", author="Erdem Aybek", author_email="eaybek@gmail.com", description=" ".join([""]), long_description=long_description, long_description_content_type="text/...
true
true
1c00debb9fb1773ad7ecf4d724d47869819a0121
16,078
py
Python
log_mito/model_323.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito/model_323.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito/model_323.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) M...
87.857923
710
0.803458
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'Xiap']) M...
true
true
1c00dee908d453c7ff7ade0bd074ba219cf8c278
7,117
py
Python
demos/test_hden.py
prerakgarg07/cloudyfsps
4a6a185343ed1e09b9f201a465c37e377ef42101
[ "BSD-3-Clause" ]
null
null
null
demos/test_hden.py
prerakgarg07/cloudyfsps
4a6a185343ed1e09b9f201a465c37e377ef42101
[ "BSD-3-Clause" ]
null
null
null
demos/test_hden.py
prerakgarg07/cloudyfsps
4a6a185343ed1e09b9f201a465c37e377ef42101
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) import os import sys import numpy as np import fsps from past.utils import old_div from cloudyfsps.ASCIItools import (writeASCII, compileASCII, checkCompiled, compi...
35.585
91
0.581284
from __future__ import (division, print_function, absolute_import, unicode_literals) import os import sys import numpy as np import fsps from past.utils import old_div from cloudyfsps.ASCIItools import (writeASCII, compileASCII, checkCompiled, compiledExists) from cloudyfsps.cloudyInputTools im...
true
true
1c00def697a0d02c3fd22934242def6b10995f57
1,792
py
Python
bin/write_wm_recipe.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
9
2019-05-01T13:12:17.000Z
2021-11-23T10:34:56.000Z
bin/write_wm_recipe.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
2
2022-02-03T13:56:22.000Z
2022-02-04T07:16:37.000Z
bin/write_wm_recipe.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
1
2022-02-03T12:05:12.000Z
2022-02-03T12:05:12.000Z
#!/usr/bin/env python from white_matter.wm_recipe.layer_profiles import LayerProfiles, ProfileMixer from white_matter.wm_recipe.p_types import TreeInnervationModelCollection from white_matter.wm_recipe.projection_mapping import ProjectionMapper from white_matter.wm_recipe.projection_strength import ProjectionStrength f...
36.571429
83
0.732701
from white_matter.wm_recipe.layer_profiles import LayerProfiles, ProfileMixer from white_matter.wm_recipe.p_types import TreeInnervationModelCollection from white_matter.wm_recipe.projection_mapping import ProjectionMapper from white_matter.wm_recipe.projection_strength import ProjectionStrength from white_matter.wm_re...
true
true
1c00dfa4e8771c1707da2c37ddf2a1edfb1856ed
42,493
py
Python
ax/service/tests/test_ax_client.py
mengwa41/Ax
fe20381214fd287a2088b0ccdd8c67337aaccf22
[ "MIT" ]
1
2021-01-11T18:16:28.000Z
2021-01-11T18:16:28.000Z
ax/service/tests/test_ax_client.py
mengwa41/Ax
fe20381214fd287a2088b0ccdd8c67337aaccf22
[ "MIT" ]
null
null
null
ax/service/tests/test_ax_client.py
mengwa41/Ax
fe20381214fd287a2088b0ccdd8c67337aaccf22
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import sys import time from math import ceil from typing import List, Tuple from unittest.mock import patch...
41.906312
88
0.567741
import math import sys import time from math import ceil from typing import List, Tuple from unittest.mock import patch import numpy as np from ax.core.arm import Arm from ax.core.base_trial import TrialStatus from ax.core.generator_run import GeneratorRun from ax.core.metric import Metric from ax.core.outcome_constr...
true
true
1c00dfb2f5067a1b0a5f285e4349290d347a73aa
4,298
py
Python
sdks/python/apache_beam/testing/datatype_inference.py
eyal0/beam
9c6922976cc2a5c6a2ef836c1986ff769cda99a5
[ "Apache-2.0" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
sdks/python/apache_beam/testing/datatype_inference.py
eyal0/beam
9c6922976cc2a5c6a2ef836c1986ff769cda99a5
[ "Apache-2.0" ]
80
2020-01-16T09:55:09.000Z
2020-10-03T13:43:07.000Z
sdks/python/apache_beam/testing/datatype_inference.py
eyal0/beam
9c6922976cc2a5c6a2ef836c1986ff769cda99a5
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
28.463576
80
0.716845
from __future__ import absolute_import import array import json from collections import OrderedDict import numpy as np from past.builtins import unicode from apache_beam.typehints import trivial_inference from apache_beam.typehints import typehints try: from avro.schema import Parse except ImportError: from a...
true
true
1c00dfb5634e14af6a1be14bdc2c0883a22a0de2
16,183
py
Python
brutespray.py
hanshaze/brutespray
cff4c12aa32e0c317a193ae9987408f1f699dcbb
[ "MIT" ]
11
2018-08-15T23:07:10.000Z
2021-11-22T04:43:47.000Z
brutespray.py
hanshaze/brutespray
cff4c12aa32e0c317a193ae9987408f1f699dcbb
[ "MIT" ]
null
null
null
brutespray.py
hanshaze/brutespray
cff4c12aa32e0c317a193ae9987408f1f699dcbb
[ "MIT" ]
6
2018-07-29T22:16:04.000Z
2021-11-22T04:43:48.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from argparse import RawTextHelpFormatter import readline, glob import sys, time, os import subprocess import xml.dom.minidom import re import argparse import argcomplete import threading import itertools import tempfile import shutil from multiprocessing import Process servic...
41.92487
226
0.456158
from argparse import RawTextHelpFormatter import readline, glob import sys, time, os import subprocess import xml.dom.minidom import re import argparse import argcomplete import threading import itertools import tempfile import shutil from multiprocessing import Process services = {} loading = False class colors: ...
false
true
1c00dfce1852f77b106bed394d632a829e1dd5e4
554
py
Python
plotly/validators/layout/_selectdirection.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/layout/_selectdirection.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/layout/_selectdirection.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class SelectdirectionValidator( _plotly_utils.basevalidators.EnumeratedValidator ): def __init__( self, plotly_name='selectdirection', parent_name='layout', **kwargs ): super(SelectdirectionValidator, self).__init__( plotly_name=plotly_name,...
29.157895
75
0.617329
import _plotly_utils.basevalidators class SelectdirectionValidator( _plotly_utils.basevalidators.EnumeratedValidator ): def __init__( self, plotly_name='selectdirection', parent_name='layout', **kwargs ): super(SelectdirectionValidator, self).__init__( plotly_name=plotly_name,...
true
true
1c00dfe3a1ed05fd32eb14ae969325372db1130b
13,568
py
Python
torch_mimicry/training/trainer.py
alexmlamb/mimicry
be030fb24a79c9bd50843d188d930c01e2260f45
[ "MIT" ]
1
2021-05-24T02:48:33.000Z
2021-05-24T02:48:33.000Z
torch_mimicry/training/trainer.py
Gyanachand1/mimicry
4e0fd46c2c5e97c319273a03374bbfa730071711
[ "MIT" ]
null
null
null
torch_mimicry/training/trainer.py
Gyanachand1/mimicry
4e0fd46c2c5e97c319273a03374bbfa730071711
[ "MIT" ]
1
2021-05-24T02:48:34.000Z
2021-05-24T02:48:34.000Z
""" Implementation of Trainer object for training GANs. """ import os import re import time import torch from torch_mimicry.training import scheduler, logger, metric_log from torch_mimicry.utils import common class Trainer: """ Trainer object for constructing the GAN training pipeline. Attributes: ...
40.380952
93
0.514814
import os import re import time import torch from torch_mimicry.training import scheduler, logger, metric_log from torch_mimicry.utils import common class Trainer: def __init__(self, netD, netG, optD, optG, dataloader, ...
true
true
1c00dffd83258dc7a0d1d89e9c56b5cdf66ed2e2
405
py
Python
arrow/commands/organisms/delete_features.py
trstickland/python-apollo
04cccf2923e6977b2cfb6ebb2ff7e5227b740bcb
[ "MIT" ]
5
2017-06-27T19:41:57.000Z
2021-06-05T13:36:11.000Z
arrow/commands/organisms/delete_features.py
trstickland/python-apollo
04cccf2923e6977b2cfb6ebb2ff7e5227b740bcb
[ "MIT" ]
28
2017-07-24T15:10:37.000Z
2021-09-03T11:56:35.000Z
arrow/commands/organisms/delete_features.py
trstickland/python-apollo
04cccf2923e6977b2cfb6ebb2ff7e5227b740bcb
[ "MIT" ]
10
2017-05-10T19:13:44.000Z
2021-08-09T04:52:33.000Z
import click from arrow.cli import pass_context, json_loads from arrow.decorators import custom_exception, dict_output @click.command('delete_features') @click.argument("organism_id", type=str) @pass_context @custom_exception @dict_output def cli(ctx, organism_id): """Remove features of an organism Output: ...
21.315789
58
0.777778
import click from arrow.cli import pass_context, json_loads from arrow.decorators import custom_exception, dict_output @click.command('delete_features') @click.argument("organism_id", type=str) @pass_context @custom_exception @dict_output def cli(ctx, organism_id): return ctx.gi.organisms.delete_features(organism...
true
true
1c00e10b29cce0de8eca47846c2c603fbcd88ea2
1,584
py
Python
Student-Management-System-Project/code.py
iamritatete/greyatom-python-for-data-science
1a1004d8554106c843cbbaf73f202e464efdc7c1
[ "MIT" ]
null
null
null
Student-Management-System-Project/code.py
iamritatete/greyatom-python-for-data-science
1a1004d8554106c843cbbaf73f202e464efdc7c1
[ "MIT" ]
null
null
null
Student-Management-System-Project/code.py
iamritatete/greyatom-python-for-data-science
1a1004d8554106c843cbbaf73f202e464efdc7c1
[ "MIT" ]
null
null
null
# -------------- # Code starts here # Create the lists class_1 = ['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio'] class_2 = ['Hilary Mason','Carla Gentry','Corinna Cortes'] # Concatenate both the strings new_class = class_1 + class_2 print(new_class) # Append the list new_class.append('Pet...
24.369231
163
0.701389
class_1 = ['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio'] class_2 = ['Hilary Mason','Carla Gentry','Corinna Cortes'] new_class = class_1 + class_2 print(new_class) new_class.append('Peter Warden') print(new_class) new_class.remove('Carla Gentry') print(new_class) courses = {'Math':65...
true
true
1c00e47cfef173e906d8e28dc8d5621e684917dc
202
py
Python
Task/Euler-method/Python/euler-method.py
LaudateCorpus1/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Euler-method/Python/euler-method.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Euler-method/Python/euler-method.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
def euler(f,y0,a,b,h): t,y = a,y0 while t <= b: print "%6.3f %6.3f" % (t,y) t += h y += h * f(t,y) def newtoncooling(time, temp): return -0.07 * (temp - 20) euler(newtoncooling,100,0,100,10)
16.833333
33
0.554455
def euler(f,y0,a,b,h): t,y = a,y0 while t <= b: print "%6.3f %6.3f" % (t,y) t += h y += h * f(t,y) def newtoncooling(time, temp): return -0.07 * (temp - 20) euler(newtoncooling,100,0,100,10)
false
true
1c00e4c128a365529289973580dd79e35cc9432c
4,134
py
Python
src/test/test_Location.py
MrRollyPanda/astral
5a1b013c945fa902b475ff0fa6769f0d43fe2999
[ "Apache-2.0" ]
null
null
null
src/test/test_Location.py
MrRollyPanda/astral
5a1b013c945fa902b475ff0fa6769f0d43fe2999
[ "Apache-2.0" ]
null
null
null
src/test/test_Location.py
MrRollyPanda/astral
5a1b013c945fa902b475ff0fa6769f0d43fe2999
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from pytest import raises from astral import Astral, AstralError, Location import datetime import pytz def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds def test_Location_N...
20.984772
75
0.630866
from pytest import raises from astral import Astral, AstralError, Location import datetime import pytz def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds def test_Location_Name(): c = Location(...
true
true
1c00e4c377ced2123928b402d7109afdbd38c9bc
42,689
py
Python
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
2
2016-04-05T10:32:52.000Z
2020-11-13T06:26:26.000Z
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
null
null
null
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
3
2015-10-18T23:59:41.000Z
2018-07-08T04:49:31.000Z
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Measles in Small Populations # <markdowncell> # Based on *Finkenstadt and Grenfell (2002), Applied Statistics*, the paper introducing the TSIR model. The model relates $S_t$, the number of susceptibles at time $t$, to the number of infecte...
33.988057
802
0.640469
import numpy as np from sklearn import linear_model from scipy.optimize import curve_fit import scipy.stats as st import scipy.interpolate as interp import pymc import lmfit import matplotlib from prettyplotlib import plt import brewer2mpl matplotlib.rcParams['savefig.dpi'] = 1.8 * matplotlib.rcParams['savefig...
false
true
1c00e4c6a3f76b8d2a39064c7a7c8e24bcbbaa89
547
py
Python
es_implement/scripts/articles2es.py
nicolaseberle/publifactory-reviewer-matcher
a26ccff7fd4a16f822a7694dcb12f30f421714c6
[ "MIT" ]
null
null
null
es_implement/scripts/articles2es.py
nicolaseberle/publifactory-reviewer-matcher
a26ccff7fd4a16f822a7694dcb12f30f421714c6
[ "MIT" ]
null
null
null
es_implement/scripts/articles2es.py
nicolaseberle/publifactory-reviewer-matcher
a26ccff7fd4a16f822a7694dcb12f30f421714c6
[ "MIT" ]
null
null
null
def articles2es_file(es, path_name, file_name, index_name, doc_type, iterid): fd = open(path_name + file_name + iterid, "r") k = 1 for line in fd: es.index(index=index_name, doc_type=doc_type, body=line, id=iterid + "-" + str(k)) k = k + 1 def articles2es_files(es, path_name, file_name, in...
32.176471
90
0.610603
def articles2es_file(es, path_name, file_name, index_name, doc_type, iterid): fd = open(path_name + file_name + iterid, "r") k = 1 for line in fd: es.index(index=index_name, doc_type=doc_type, body=line, id=iterid + "-" + str(k)) k = k + 1 def articles2es_files(es, path_name, file_name, in...
true
true
1c00e62c7c655951c58496fb208a0c6ea2e984e0
14,608
py
Python
tests/integration/popular_repos/popular_repos.py
tomlu/rules_go
28dd92b09c978ad09c74c18161a1da844235adfb
[ "Apache-2.0" ]
1
2020-12-02T20:04:26.000Z
2020-12-02T20:04:26.000Z
tests/integration/popular_repos/popular_repos.py
tomlu/rules_go
28dd92b09c978ad09c74c18161a1da844235adfb
[ "Apache-2.0" ]
null
null
null
tests/integration/popular_repos/popular_repos.py
tomlu/rules_go
28dd92b09c978ad09c74c18161a1da844235adfb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 The Bazel 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 req...
49.518644
127
0.658749
from subprocess import check_output, call from sys import exit POPULAR_REPOS = [ dict( name = "org_golang_x_crypto", importpath = "golang.org/x/crypto", urls = "https://codeload.github.com/golang/crypto/zip/de0752318171da717af4ce24d0a2e8626afaeb11", strip_prefix = "crypto-de0752318...
true
true
1c00e678d615e9acda4e6379b2e6f7121782af1a
3,131
py
Python
lab3/mnist-2.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
lab3/mnist-2.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
lab3/mnist-2.py
bolecodex/amazon-sagemaker-immersion-day
2894145bb0abd4961cb0e0b7c6d1e89264b76716
[ "MIT-0" ]
null
null
null
import tensorflow as tf import argparse import os import numpy as np import json def model(x_train, y_train, x_test, y_test): """Generate a simple model""" # Sequential: 创建顺序模型, 此模型为最简单的线性、从头到尾的结构顺序,不分叉,是多个网络层的线性堆叠。 参数:数组中的内容为模型中的层次结构 model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(),...
40.141026
133
0.696263
import tensorflow as tf import argparse import os import numpy as np import json def model(x_train, y_train, x_test, y_test): model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), tf.keras.layers.Dense(1024, activation=tf.nn.relu), tf....
true
true
1c00e8d10dba6fd09582e0ee736e250336250e82
826
py
Python
simple_train_image.py
Huage001/Artistic-Video-Partial-Conv-Depth-Loss
c990b8bcc88ce0655f3ac78b526324b1ff5deb41
[ "BSD-3-Clause" ]
9
2020-10-14T03:32:51.000Z
2022-01-14T20:38:05.000Z
simple_train_image.py
Huage001/Artistic-Video-Partial-Conv-Depth-Loss
c990b8bcc88ce0655f3ac78b526324b1ff5deb41
[ "BSD-3-Clause" ]
1
2021-03-03T20:15:42.000Z
2021-08-07T12:29:22.000Z
simple_train_image.py
Huage001/Artistic-Video-Partial-Conv-Depth-Loss
c990b8bcc88ce0655f3ac78b526324b1ff5deb41
[ "BSD-3-Clause" ]
2
2020-09-02T00:58:29.000Z
2020-11-25T16:41:51.000Z
import os dataroot = input('Please input your dataset root\n') name = input('Please input your experiment name\n') epoch = int(input('Please input total number of training epoch\n')) load_size_w = int(input('Please input width of image load size\n')) load_size_h = int(input('Please input height of image load size\n')...
55.066667
311
0.732446
import os dataroot = input('Please input your dataset root\n') name = input('Please input your experiment name\n') epoch = int(input('Please input total number of training epoch\n')) load_size_w = int(input('Please input width of image load size\n')) load_size_h = int(input('Please input height of image load size\n')...
true
true
1c00e8f502482a2817378d38f23d9d43e89d0e41
15,136
py
Python
holoviews/core/pprint.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
15
2018-04-06T19:13:26.000Z
2019-05-24T04:08:51.000Z
holoviews/core/pprint.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
71
2018-03-09T16:32:59.000Z
2019-07-09T19:45:36.000Z
holoviews/core/pprint.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
23
2019-12-13T17:38:46.000Z
2021-09-08T14:37:26.000Z
""" HoloViews can be used to build highly-nested data-structures containing large amounts of raw data. As a result, it is difficult to generate a readable representation that is both informative yet concise. As a result, HoloViews does not attempt to build representations that can be evaluated with eval; such represen...
39.010309
106
0.602207
import sys, re import param from param.ipython import ParamPager from holoviews.core.util import group_sanitizer, label_sanitizer class ParamFilter(param.ParameterizedFunction): def __call__(self, obj, filter_fn=None): if filter_fn is None: return obj name = obj.__name__ if isinsta...
true
true
1c00e9089c46995190af4b4f382ff69611340fac
3,304
py
Python
ubelt/util_arg.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
ubelt/util_arg.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
ubelt/util_arg.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
""" Simple ways to interact with the commandline without defining a full blown CLI.These are usually used for developer hacks. Any real interface should probably be defined using `argparse` or `click`. Be sure to ignore unknown arguments if you use them in conjuction with these functions. The `argflag` function checks ...
41.822785
82
0.625303
from __future__ import absolute_import, division, print_function, unicode_literals import six import sys from ubelt import util_const def argval(key, default=util_const.NoParam, argv=None): if argv is None: argv = sys.argv keys = [key] if isinstance(key, six.string_types) else key n_max = len(argv) - 1 for argx, ...
true
true
1c00e999c5c9dd4e7af53c186e8ccb6cf5b0c2b2
258
py
Python
duecredit/tests/mod/submod.py
sanjaymsh/duecredit
0f6cecc4cd811e3921f97af886f8a5246fe61867
[ "BSD-2-Clause-FreeBSD" ]
213
2015-06-22T09:23:32.000Z
2022-03-17T02:01:53.000Z
duecredit/tests/mod/submod.py
sanjaymsh/duecredit
0f6cecc4cd811e3921f97af886f8a5246fe61867
[ "BSD-2-Clause-FreeBSD" ]
165
2015-06-14T23:23:15.000Z
2021-09-30T20:06:15.000Z
duecredit/tests/mod/submod.py
sanjaymsh/duecredit
0f6cecc4cd811e3921f97af886f8a5246fe61867
[ "BSD-2-Clause-FreeBSD" ]
29
2015-06-12T20:37:43.000Z
2021-04-13T12:23:55.000Z
"""Some test submodule""" def testfunc(arg1, kwarg1=None): """testfunc docstring""" return "testfunc: %s, %s" % (arg1, kwarg1) class TestClass(object): def testmeth(self, arg1, kwarg1=None): return "testmeth: %s, %s" % (arg1, kwarg1)
21.5
50
0.620155
def testfunc(arg1, kwarg1=None): return "testfunc: %s, %s" % (arg1, kwarg1) class TestClass(object): def testmeth(self, arg1, kwarg1=None): return "testmeth: %s, %s" % (arg1, kwarg1)
true
true
1c00eb0e722b866d5b8b16d59f3a78e4d99d5ae2
19,999
py
Python
pdfminer/ccitt.py
josiahkhor/pdfminer.six
b555eaed50ee347f0944465f23bc3f4c7a560ea2
[ "MIT" ]
2
2021-06-19T01:46:19.000Z
2021-07-01T09:25:05.000Z
pdfminer/ccitt.py
josiahkhor/pdfminer.six
b555eaed50ee347f0944465f23bc3f4c7a560ea2
[ "MIT" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
pdfminer/ccitt.py
josiahkhor/pdfminer.six
b555eaed50ee347f0944465f23bc3f4c7a560ea2
[ "MIT" ]
2
2021-10-10T20:32:15.000Z
2021-12-02T12:22:25.000Z
# CCITT Fax decoder # # Bugs: uncompressed mode untested. # # cf. # ITU-T Recommendation T.4 # "Standardization of Group 3 facsimile terminals # for document transmission" # ITU-T Recommendation T.6 # "FACSIMILE CODING SCHEMES AND CODING CONTROL FUNCTIONS # FOR GROUP 4 FACSIMILE APPARATUS" import sys im...
33.66835
78
0.588329
# for document transmission" # FOR GROUP 4 FACSIMILE APPARATUS" import sys import array def get_bytes(data): yield from data class BitParser: def __init__(self): self._pos = 0 return @classmethod def add(cls, root, v, bits): p = root b = None for i in...
true
true
1c00ec43209751b34038bea3db4bab79504eed0b
1,053
py
Python
old/calculate-area.py
bwmichael/jccc-cis142-python
3dd9cd92a61124767176d0ff53b27bb2badd54c2
[ "Apache-2.0" ]
null
null
null
old/calculate-area.py
bwmichael/jccc-cis142-python
3dd9cd92a61124767176d0ff53b27bb2badd54c2
[ "Apache-2.0" ]
null
null
null
old/calculate-area.py
bwmichael/jccc-cis142-python
3dd9cd92a61124767176d0ff53b27bb2badd54c2
[ "Apache-2.0" ]
null
null
null
# Brandon Michael # CIS 142 # Get length and width input values, run some basic calculations, then display results ## import Math libraries import math ## Declare functions ## Calculate the Perimeter of a rectangle ## P = (2l) + (2w) def calcPerimeter(l, w): length = int(l) width = int(w) result = (2*length)...
23.931818
86
0.667616
import math def calcPerimeter(l, w): length = int(l) width = int(w) result = (2*length) + (2*width) return result def calcArea(l, w): length = int(l) width = int(w) result = width*length return result def calcLength(l, w): length = int(l) width = int(w) result = round(math...
true
true
1c00ec5c99b106829d2589b03568915042b5ac38
5,580
py
Python
esm2m/config_perturbations.py
gmacgilchrist/esm2m
9df56e084ad25530e55990340482f74279bc9646
[ "MIT" ]
null
null
null
esm2m/config_perturbations.py
gmacgilchrist/esm2m
9df56e084ad25530e55990340482f74279bc9646
[ "MIT" ]
null
null
null
esm2m/config_perturbations.py
gmacgilchrist/esm2m
9df56e084ad25530e55990340482f74279bc9646
[ "MIT" ]
null
null
null
import xarray as xr import os def get_path(variable=None,ppname=None,override=False,experiments=None,timespan=None): '''Returns a dictionary of paths relevant to the specified experiments, variables, and timespans.''' config = 'MOM5_SIS_BLING_CORE2-gat' if override: config = config+'-over...
37.959184
134
0.629749
import xarray as xr import os def get_path(variable=None,ppname=None,override=False,experiments=None,timespan=None): config = 'MOM5_SIS_BLING_CORE2-gat' if override: config = config+'-override-po4' pp = '/archive/Richard.Slater/Siena/siena_201308_rds-c3-gat-slurm/'+config+'/gfdl.ncrc3-intel16-...
true
true
1c00ec74d686513276a82274ab97a12b0faa1ded
4,302
py
Python
Janaagraha Bot/venv/Lib/site-packages/google/api/field_behavior_pb2.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
11
2021-09-19T06:32:44.000Z
2022-03-14T19:09:46.000Z
Janaagraha Bot/venv/Lib/site-packages/google/api/field_behavior_pb2.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
null
null
null
Janaagraha Bot/venv/Lib/site-packages/google/api/field_behavior_pb2.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
2
2020-09-22T06:01:26.000Z
2020-09-22T18:23:49.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.086207
599
0.752906
from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() f...
true
true
1c00ecaf327eb3f9d55039d9a6fe8afd37127f62
78
py
Python
configs/default.py
atuanpham/wacv-journal-version
29b2743e8a904ede4cde39aad43fdbed9d034608
[ "MIT" ]
null
null
null
configs/default.py
atuanpham/wacv-journal-version
29b2743e8a904ede4cde39aad43fdbed9d034608
[ "MIT" ]
null
null
null
configs/default.py
atuanpham/wacv-journal-version
29b2743e8a904ede4cde39aad43fdbed9d034608
[ "MIT" ]
null
null
null
from src.config import BaseConfig class DefaultConfig(BaseConfig): pass
13
33
0.782051
from src.config import BaseConfig class DefaultConfig(BaseConfig): pass
true
true
1c00ed441e6470c5cf60b20199a258c1d839f449
6,796
py
Python
sdk/python/pulumi_azure_nextgen/network/v20200401/get_network_profile.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200401/get_network_profile.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200401/get_network_profile.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
39.283237
215
0.680547
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetNetworkProfileResult', 'AwaitableGetNetworkProfileResult', 'get_network_profile', ] @pulumi.output_type class GetNetwork...
true
true
1c00ed4f75b76a97b8ea4fdc3a6c7d688da20ef3
10,709
py
Python
utils/utils.py
onboarding92/AutonomousDrive
80045ffd15ba9ee5b7c39ac7ffa9325616588cff
[ "MIT" ]
1
2020-04-30T15:04:58.000Z
2020-04-30T15:04:58.000Z
utils/utils.py
onboarding92/AutonomousDrive
80045ffd15ba9ee5b7c39ac7ffa9325616588cff
[ "MIT" ]
null
null
null
utils/utils.py
onboarding92/AutonomousDrive
80045ffd15ba9ee5b7c39ac7ffa9325616588cff
[ "MIT" ]
null
null
null
from __future__ import division import math import torch import torch.nn as nn import numpy as np def load_classes(path): """ Loads class labels at 'path' """ fp = open(path, "r") names = fp.read().split("\n")[:-1] return names def weights_init_normal(m): classname = m.__class__.__name__ ...
36.800687
114
0.567747
from __future__ import division import math import torch import torch.nn as nn import numpy as np def load_classes(path): fp = open(path, "r") names = fp.read().split("\n")[:-1] return names def weights_init_normal(m): classname = m.__class__.__name__ if classname.find("Conv") != -1: torc...
true
true
1c00ee66693c850dc41bb1d1a73050ba82c5e3f3
1,003
py
Python
Solutions/Problem_101.py
PraneethJain/Project-Euler-200
1770aefeb6acbf9c0d561c612971e1289fcee5a5
[ "MIT" ]
1
2022-03-29T09:00:17.000Z
2022-03-29T09:00:17.000Z
Solutions/Problem_101.py
PraneethJain/Project-Euler-200
1770aefeb6acbf9c0d561c612971e1289fcee5a5
[ "MIT" ]
null
null
null
Solutions/Problem_101.py
PraneethJain/Project-Euler-200
1770aefeb6acbf9c0d561c612971e1289fcee5a5
[ "MIT" ]
null
null
null
from time import perf_counter from rich import print def get_FIT(sequence: list): k = len(sequence) if k > 10: k = 10 differences = [sequence.copy()] done = False while not done: if all(sequence[i + 1] == sequence[i] for i in range(len(sequence) - 1)): done = True ...
20.895833
88
0.524427
from time import perf_counter from rich import print def get_FIT(sequence: list): k = len(sequence) if k > 10: k = 10 differences = [sequence.copy()] done = False while not done: if all(sequence[i + 1] == sequence[i] for i in range(len(sequence) - 1)): done = True ...
true
true
1c00effcdd96871b769340a83a6fe43372612290
1,293
py
Python
src/tests/unit/security/authorization/handlers/test_authorizer.py
wilsonGmn/pyrin
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
[ "BSD-3-Clause" ]
null
null
null
src/tests/unit/security/authorization/handlers/test_authorizer.py
wilsonGmn/pyrin
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
[ "BSD-3-Clause" ]
null
null
null
src/tests/unit/security/authorization/handlers/test_authorizer.py
wilsonGmn/pyrin
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ authorization test authorizers package. """ import pyrin.utils.misc as misc_utils from pyrin.security.authorization.decorators import authorizer from pyrin.security.authorization.handlers.base import AuthorizerBase from tests.unit.security.permissions import PERMISSION_TEST_ONE, PERMISSIO...
30.069767
94
0.702243
import pyrin.utils.misc as misc_utils from pyrin.security.authorization.decorators import authorizer from pyrin.security.authorization.handlers.base import AuthorizerBase from tests.unit.security.permissions import PERMISSION_TEST_ONE, PERMISSION_TEST_TWO, \ PERMISSION_TEST_THREE @authorizer() class TestAuthor...
true
true
1c00f1ccccaa6b24288083953122dff86cd8006c
731
py
Python
nlu/components/matchers/context_parser/context_parser.py
milyiyo/nlu
d209ed11c6a84639c268f08435552248391c5573
[ "Apache-2.0" ]
480
2020-08-24T02:36:40.000Z
2022-03-30T08:09:43.000Z
nlu/components/matchers/context_parser/context_parser.py
milyiyo/nlu
d209ed11c6a84639c268f08435552248391c5573
[ "Apache-2.0" ]
28
2020-09-26T18:55:43.000Z
2022-03-26T01:05:45.000Z
nlu/components/matchers/context_parser/context_parser.py
milyiyo/nlu
d209ed11c6a84639c268f08435552248391c5573
[ "Apache-2.0" ]
76
2020-09-25T22:55:12.000Z
2022-03-17T20:25:52.000Z
from sparknlp_jsl.annotator import ContextualParserApproach,ContextualParserModel class ContextParser: @staticmethod def get_default_model(): return ContextualParserApproach() \ .setInputCols(["sentence", "token"]) \ .setOutputCol("context_entity")\ .setCaseSensitive...
36.55
81
0.640219
from sparknlp_jsl.annotator import ContextualParserApproach,ContextualParserModel class ContextParser: @staticmethod def get_default_model(): return ContextualParserApproach() \ .setInputCols(["sentence", "token"]) \ .setOutputCol("context_entity")\ .setCaseSensitive...
true
true
1c00f3203588690fa2b636e88803818727aa107b
598
py
Python
network_selector/coherenceValues.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
4
2019-11-19T03:35:35.000Z
2020-12-07T18:43:11.000Z
network_selector/coherenceValues.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
3
2019-06-05T03:35:55.000Z
2020-04-09T14:16:08.000Z
network_selector/coherenceValues.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
6
2019-08-23T22:53:11.000Z
2021-11-06T15:15:30.000Z
#!/usr/bin/env python3 import json import os def getParameters(project): #Need to update values depending on runs if(project.lower().count('trigger')): name = 'coherenceParams_' + project.lower() + '.json' else: name = os.path.join(os.environ['ARIAMH_HOME'],'conf','coherenceParams_' + projec...
42.714286
108
0.66388
import json import os def getParameters(project): if(project.lower().count('trigger')): name = 'coherenceParams_' + project.lower() + '.json' else: name = os.path.join(os.environ['ARIAMH_HOME'],'conf','coherenceParams_' + project.lower() + '.json') if not os.path.exists(name): ...
true
true
1c00f324b3c2366a95999aa713ab2319b0541025
10,856
py
Python
pixelset.py
kdschlosser/micropython_fastled
d924784e9c2226382f0e1adf1aa985267d79d42e
[ "MIT" ]
10
2020-09-13T20:07:14.000Z
2022-03-18T14:39:20.000Z
pixelset.py
kdschlosser/micropython_fastled
d924784e9c2226382f0e1adf1aa985267d79d42e
[ "MIT" ]
1
2021-01-14T08:25:20.000Z
2021-01-14T17:49:56.000Z
pixelset.py
kdschlosser/micropython_fastled
d924784e9c2226382f0e1adf1aa985267d79d42e
[ "MIT" ]
null
null
null
from . import * from .colorutils import * # Represents a set of CRGB led objects. Provides the [] array operator, and works like a normal array in that case. # This should be kept in sync with the set of functions provided by CRGB as well as functions in colorutils. Note # that a pixel set is a window into anot...
28.197403
119
0.493552
from . import * from .colorutils import * class CPixelView(object): def __init__(self, leds=None, len_=None, _start=None, _end=None, other=None): if isinstance(other, CPixelView): self.dir = other.dir self.len = other.len self.leds = other.leds self.end_po...
true
true
1c00f3bd9dad9a8a1e63ad0de3b1001ff2aead35
331
py
Python
train.py
Chainso/DragonBot
c431cd42be8672259164c9ee4ab338cbc624bec9
[ "MIT" ]
null
null
null
train.py
Chainso/DragonBot
c431cd42be8672259164c9ee4ab338cbc624bec9
[ "MIT" ]
null
null
null
train.py
Chainso/DragonBot
c431cd42be8672259164c9ee4ab338cbc624bec9
[ "MIT" ]
null
null
null
import os if __name__ == "__main__": file_path = os.path.dirname(os.path.realpath(__file__)) exercises_path = file_path + "/dragonbot/rlbot/exercises/training_exercises.py" os.execvp( "rlbottraining", [ "rlbottraining", "run_module", exercises_path ...
22.066667
83
0.586103
import os if __name__ == "__main__": file_path = os.path.dirname(os.path.realpath(__file__)) exercises_path = file_path + "/dragonbot/rlbot/exercises/training_exercises.py" os.execvp( "rlbottraining", [ "rlbottraining", "run_module", exercises_path ...
true
true
1c00f3c445439af10a529d2fec47ac3606cda1b7
11,583
py
Python
ML_scripts/ensemble_scoring.py
disease-data-intelligence/3G_weight_loss_prediction
476ced900f5a4595877257e38eccbe5e53cb64c2
[ "BSD-3-Clause" ]
null
null
null
ML_scripts/ensemble_scoring.py
disease-data-intelligence/3G_weight_loss_prediction
476ced900f5a4595877257e38eccbe5e53cb64c2
[ "BSD-3-Clause" ]
null
null
null
ML_scripts/ensemble_scoring.py
disease-data-intelligence/3G_weight_loss_prediction
476ced900f5a4595877257e38eccbe5e53cb64c2
[ "BSD-3-Clause" ]
1
2021-11-11T13:35:14.000Z
2021-11-11T13:35:14.000Z
#!/usr/bin/python3 # Import packages seed = 42 import numpy as np np.random.seed(seed) # Set numpy random seed import os import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import roc_curve import utils as u ############################### # Ensemble predictions ############################### ...
39
197
0.613572
seed = 42 import numpy as np np.random.seed(seed) import os import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import roc_curve import utils as u def average_scoring(scores_frame, true_labels_col, drop=False, t=0.5): true_labels = scores_frame[true_labels_col] if drop: scor...
true
true
1c00f4244ef9265f12abdd41393c3ad9891018bf
82,384
bzl
Python
3rdparty/crates/defs.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
4
2021-11-08T14:53:23.000Z
2022-02-25T03:32:32.000Z
3rdparty/crates/defs.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
23
2021-10-13T18:53:05.000Z
2022-03-07T00:57:25.000Z
3rdparty/crates/defs.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
1
2021-12-09T17:11:39.000Z
2021-12-09T17:11:39.000Z
############################################################################### # @generated # This file is auto-generated by the cargo-bazel tool. # # DO NOT MODIFY: Local changes may be replaced in future executions. ############################################################################### """ # `crates_reposit...
39.703133
496
0.632332
load("@bazel_skylib//lib:selects.bzl", "selects") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") _COMMON_CONDITION = "" def _flatten_dependency_maps(all_dependency_maps): dependencies = {} for workspace_deps_map in all_dep...
true
true
1c00f49c90e046f7fd7d0a940df365ebd0204f94
1,204
py
Python
setup.py
iansmcf/pash
273786a0e830bd582294419c5a93211552e692ba
[ "BSD-3-Clause" ]
null
null
null
setup.py
iansmcf/pash
273786a0e830bd582294419c5a93211552e692ba
[ "BSD-3-Clause" ]
null
null
null
setup.py
iansmcf/pash
273786a0e830bd582294419c5a93211552e692ba
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
24.571429
68
0.651993
try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', '') requirements = [ ] test_requirements...
true
true
1c00f5bbe3675177789ccff42f586ad1ac4d908e
3,152
py
Python
python/test/o_types_test/test_odate.py
ojai/ojai-core
058b147e735fe95c83b339776daf79d437adae80
[ "Apache-2.0" ]
51
2015-09-30T18:54:57.000Z
2020-08-13T09:35:15.000Z
python/test/o_types_test/test_odate.py
ojai/ojai-core
058b147e735fe95c83b339776daf79d437adae80
[ "Apache-2.0" ]
21
2015-10-01T14:22:19.000Z
2022-02-04T02:17:26.000Z
python/test/o_types_test/test_odate.py
ojai/ojai-core
058b147e735fe95c83b339776daf79d437adae80
[ "Apache-2.0" ]
25
2015-09-30T14:13:16.000Z
2021-12-10T21:29:32.000Z
from __future__ import unicode_literals from ojai.types.ODate import ODate try: import unittest2 as unittest except ImportError: import unittest class ODateTest(unittest.TestCase): def test_days_from_epoch(self): days = 99 o_date = ODate(days_since_epoch=days) o_date_clone = ODa...
41.473684
90
0.681472
from __future__ import unicode_literals from ojai.types.ODate import ODate try: import unittest2 as unittest except ImportError: import unittest class ODateTest(unittest.TestCase): def test_days_from_epoch(self): days = 99 o_date = ODate(days_since_epoch=days) o_date_clone = ODa...
true
true
1c00f71b9d2015a86739999fba95e2b2b15a926f
7,459
py
Python
idaes/models/control/tests/test_pid_pump.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models/control/tests/test_pid_pump.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models/control/tests/test_pid_pump.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
1
2022-03-17T11:08:43.000Z
2022-03-17T11:08:43.000Z
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
33.751131
88
0.645663
__author__ = "Jinliang Ma" import pyomo.environ as pyo from pyomo.network import Arc from idaes.core import FlowsheetBlock from idaes.power_generation.unit_models.watertank import WaterTank from idaes.models.control.controller import PIDController, ControllerType import idaes.core.util.scaling as iscale from idaes.p...
true
true
1c00f92cfb4f4f43e431c3b7d43476a7cfc5569d
4,740
py
Python
tutorials/frontend/from_caffe2.py
intheworld/incubator-tvm
c07aa37aeb602e1ade7e26061d0fd3e908dd3791
[ "Apache-2.0" ]
null
null
null
tutorials/frontend/from_caffe2.py
intheworld/incubator-tvm
c07aa37aeb602e1ade7e26061d0fd3e908dd3791
[ "Apache-2.0" ]
null
null
null
tutorials/frontend/from_caffe2.py
intheworld/incubator-tvm
c07aa37aeb602e1ade7e26061d0fd3e908dd3791
[ "Apache-2.0" ]
1
2020-10-02T09:49:47.000Z
2020-10-02T09:49:47.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.465753
86
0.666878
from caffe2.python.models.download import ModelDownloader mf = ModelDownloader() class Model: def __init__(self, model_name): self.init_net, self.predict_net, self.value_info = mf.get_c2_model(model_name) resnet50 = Model("resnet50") from tvm.contrib.download import download_testdata from PIL import ...
true
true