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
f73087de99d28d62c47ee47f567d8a406a1bc2b8
1,502
py
Python
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-08-13T15:24:33.000Z
2021-10-18T18:38:19.000Z
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2020-07-24T17:09:12.000Z
2022-01-17T22:39:06.000Z
var/spack/repos/builtin/packages/eztrace/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-01-22T14:01:28.000Z
2020-07-23T21:35:12.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Eztrace(AutotoolsPackage): """EZTrace is a tool to automatically generate execution traces...
31.957447
106
0.62783
from spack import * class Eztrace(AutotoolsPackage): homepage = "http://eztrace.gforge.inria.fr" url = "https://gitlab.com/eztrace/eztrace/-/archive/eztrace-1.1-10/eztrace-eztrace-1.1-10.tar.gz" maintainers = ['trahay'] version('1.1-10', sha256='97aba8f3b3b71e8e2f7ef47e00c262234e27b9cb4a870c85...
true
true
f73088043a279f1eb399bbe99ed06db1fe268266
6,952
py
Python
Wessim1.py
tinyheero/wessim
30c91560e0d6d8ce96a41ce3bcd40b3467c3a1c6
[ "MIT" ]
null
null
null
Wessim1.py
tinyheero/wessim
30c91560e0d6d8ce96a41ce3bcd40b3467c3a1c6
[ "MIT" ]
null
null
null
Wessim1.py
tinyheero/wessim
30c91560e0d6d8ce96a41ce3bcd40b3467c3a1c6
[ "MIT" ]
1
2020-08-18T03:17:58.000Z
2020-08-18T03:17:58.000Z
#!/usr/bin/env python2 import sys import random import bisect import pysam import gzip import cPickle import numpy from time import time, localtime, strftime import argparse from multiprocessing import Process import os import math import pysam inds={'A':0,'T':1,'G':2,'C':3,'N':4,'a':0,'t':1,'g':2,'c':3,'n':4} def su...
33.263158
219
0.675489
import sys import random import bisect import pysam import gzip import cPickle import numpy from time import time, localtime, strftime import argparse from multiprocessing import Process import os import math import pysam inds={'A':0,'T':1,'G':2,'C':3,'N':4,'a':0,'t':1,'g':2,'c':3,'n':4} def subprogram(command, name)...
false
true
f7308819cec616f6758ef2e8960686762613ad90
18,855
py
Python
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
cbcintacctsdk/apis/api_base.py
Cold-Bore-Capital/sageintacct-sdk-py
a65c89aba9987a6d74238ad7d28b39ddd704d68c
[ "MIT" ]
null
null
null
""" API Base class with util functions """ import json import datetime import uuid from warnings import warn from typing import Dict, List, Tuple from urllib.parse import unquote import re import xmltodict import requests from ..exceptions import SageIntacctSDKError, ExpiredTokenError, InvalidTokenError, NoPrivilegeE...
34.723757
137
0.547759
import json import datetime import uuid from warnings import warn from typing import Dict, List, Tuple from urllib.parse import unquote import re import xmltodict import requests from ..exceptions import SageIntacctSDKError, ExpiredTokenError, InvalidTokenError, NoPrivilegeError, \ WrongParamsError, NotFoundItemE...
true
true
f730894e33a039bd60f085adc8ba9927f4c02448
17,661
py
Python
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
1
2021-02-19T17:23:04.000Z
2021-02-19T17:23:04.000Z
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
null
null
null
binance.py
mrhuytran/bnb-api-wrapper
569e6eddc9c44f50a918b046cdb248bee60ac0e1
[ "MIT" ]
1
2020-11-16T05:59:49.000Z
2020-11-16T05:59:49.000Z
import requests import json from datetime import datetime import time import pandas as pd from pandas import DataFrame as df import hmac import hashlib from interval_enum import Interval from order_enum import Order class BinanceClient: def __init__(self, api_key, api_secret): self.key = api_key ...
33.135084
120
0.554895
import requests import json from datetime import datetime import time import pandas as pd from pandas import DataFrame as df import hmac import hashlib from interval_enum import Interval from order_enum import Order class BinanceClient: def __init__(self, api_key, api_secret): self.key = api_key ...
true
true
f7308a1085cb46493a7cbe0bd9834d3db9018f4f
946
py
Python
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
1
2021-12-07T09:40:38.000Z
2021-12-07T09:40:38.000Z
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
null
null
null
Initial files/dht_publish.py
vinayrnair/ESP32-DHT22-Sensors
cc7a34eb866b39aa62ce8cdf676371aa9d6a3d28
[ "Unlicense" ]
null
null
null
from time import sleep from umqtt.simple import MQTTClient from machine import Pin from dht import DHT22 SERVER = 'ip address' # MQTT Server Address (Change to the IP address of your Pi) CLIENT_ID = 'ESP32_DHT22_Sensor' TOPIC = b'temp_humidity' client = MQTTClient(CLIENT_ID, SERVER) client.connect() # Connect to M...
32.62069
105
0.651163
from time import sleep from umqtt.simple import MQTTClient from machine import Pin from dht import DHT22 SERVER = 'ip address' CLIENT_ID = 'ESP32_DHT22_Sensor' TOPIC = b'temp_humidity' client = MQTTClient(CLIENT_ID, SERVER) client.connect() sensor = DHT22(Pin(23, Pin.IN, Pin.PULL_UP)) while True: try: ...
true
true
f7308a5b65edfbcf8a90beaa071fcbcffe8b5c75
1,912
py
Python
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
echopype/utils/prov.py
mbdunn/echopype
a53290801d1ca062d45c00ca2c541d54682dd40a
[ "Apache-2.0" ]
null
null
null
from datetime import datetime as dt from pathlib import PosixPath from typing import Any, Dict, List, Tuple, Union # TODO: uncomment after release (causes flake8 to fail) # from _echopype_version import version as ECHOPYPE_VERSION from typing_extensions import Literal ProcessType = Literal["conversion", "processing"]...
29.875
96
0.668933
from datetime import datetime as dt from pathlib import PosixPath from typing import Any, Dict, List, Tuple, Union from typing_extensions import Literal ProcessType = Literal["conversion", "processing"] def echopype_prov_attrs(process_type: ProcessType) -> Dict[str, str]: prov_dict = { f"{process_ty...
true
true
f7308b26ee37870995f03c79abb88818796df454
18,976
py
Python
pypy/interpreter/error.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2016-07-06T23:30:20.000Z
2017-05-30T15:59:31.000Z
pypy/interpreter/error.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
null
null
null
pypy/interpreter/error.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2020-07-09T08:14:22.000Z
2021-01-15T18:01:25.000Z
import os, sys from rpython.rlib import jit from rpython.rlib.objectmodel import we_are_translated from errno import EINTR AUTO_DEBUG = os.getenv('PYPY_DEBUG') RECORD_INTERPLEVEL_TRACEBACK = True class OperationError(Exception): """Interpreter-level exception that signals an exception that should be sent to ...
39.865546
81
0.57657
import os, sys from rpython.rlib import jit from rpython.rlib.objectmodel import we_are_translated from errno import EINTR AUTO_DEBUG = os.getenv('PYPY_DEBUG') RECORD_INTERPLEVEL_TRACEBACK = True class OperationError(Exception): """Interpreter-level exception that signals an exception that should be sent to ...
false
true
f7308d265ec40e3e5b63ae6f5eca1836d9790623
1,861
py
Python
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeNotificationConfigurationsRequest.py
LittleJober/aliyun-openapi-python-sdk
f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76
[ "Apache-2.0" ]
null
null
null
# 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...
37.979592
92
0.780226
from aliyunsdkcore.request import RpcRequest from aliyunsdkess.endpoint import endpoint_data class DescribeNotificationConfigurationsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Ess', '2014-08-28', 'DescribeNotificationConfigurations','ess') if hasattr(self, "endpoint_map"): setattr(se...
true
true
f7308d359d4660aec3e1f8d361278eb035139385
2,776
py
Python
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
jcp/lexer.py
RupasaiR/CC-Project
b50164ddadc45ef0f09edd791215b3e127feee58
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------------- # lexer.py # Lexer for Java programming language in Python # Reference: https://docs.oracle.com/javase/specs/jls/se7/html/jls-18.html #----------------------------------------------------------------------------------- import ply.lex ...
26.692308
113
0.507565
import ply.lex as lex keywords = ('this', 'class', 'void', 'super', 'extends', 'implements', 'enum', 'interface', 'byte', 'short', 'int', 'long', 'char', 'float', 'double', 'boolean', 'null', 'true', 'false', 'final', 'public', 'protected', 'private', 'abstract', 'static', 'strictf...
true
true
f7308dfb1be9d3dd6bfea4a978d12b10c84b88cb
1,785
py
Python
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
9
2019-09-30T04:24:39.000Z
2021-07-15T06:08:20.000Z
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
6
2020-05-14T03:13:32.000Z
2022-02-10T10:23:46.000Z
kessk_web/device/wexinSignature.py
yungs2017/kessk-switch
a56c73c756bb88e8ee38b7aa196fd58a4a802341
[ "BSD-3-Clause" ]
2
2020-12-19T07:12:01.000Z
2021-05-24T02:21:15.000Z
import hashlib import random import string import time from django.core.cache import cache import requests from common.config import WECHAT_GET_JSSDK_TICKET_URL, WECHAT_GET_ACCESS_TOKEN_URL class Signature: """ Get Wechat JSSDK signature """ def __init__(self,url): self.ret = { 'n...
29.262295
111
0.62521
import hashlib import random import string import time from django.core.cache import cache import requests from common.config import WECHAT_GET_JSSDK_TICKET_URL, WECHAT_GET_ACCESS_TOKEN_URL class Signature: def __init__(self,url): self.ret = { 'nonceStr': self.__create_nonce_str(), ...
true
true
f7308e9c4d895763eaa137bfcd7402eab1c334b6
388
py
Python
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p124.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
def problem124(): LIMIT = 100000 # Modification of the sieve of Eratosthenes rads = [0] + [1] * LIMIT for i in range(2, len(rads)): if rads[i] == 1: for j in range(i, len(rads), i): rads[j] *= i data = sorted((rad, i) for (i, rad) in enumerate(rads)) return ...
22.823529
59
0.53866
def problem124(): LIMIT = 100000 rads = [0] + [1] * LIMIT for i in range(2, len(rads)): if rads[i] == 1: for j in range(i, len(rads), i): rads[j] *= i data = sorted((rad, i) for (i, rad) in enumerate(rads)) return data[10000][1] if __name__ == "__main__": ...
true
true
f7308f2ba96d7185ba98d55e78390dec75d685f8
1,923
py
Python
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
76
2019-05-27T23:38:53.000Z
2021-12-19T00:31:13.000Z
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
9
2019-05-29T21:01:32.000Z
2020-07-30T12:00:02.000Z
Chapter05/utils.py
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras
fccada4810ba1fe8b79c5a74420a590c95623b52
[ "MIT" ]
35
2019-05-12T04:20:54.000Z
2022-03-03T19:46:06.000Z
import matplotlib matplotlib.use("Agg") import matplotlib.pylab as plt from math import ceil import numpy as np import argparse from functools import partial import os from keras.models import Model, Sequential from keras.layers import Input, Dense, Reshape, Flatten from keras.layers.merge import _Merge from keras.laye...
30.52381
69
0.690588
import matplotlib matplotlib.use("Agg") import matplotlib.pylab as plt from math import ceil import numpy as np import argparse from functools import partial import os from keras.models import Model, Sequential from keras.layers import Input, Dense, Reshape, Flatten from keras.layers.merge import _Merge from keras.laye...
true
true
f7308f9c00ebc9bbce9d89a7668d0310b9d0223d
793
py
Python
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
7
2021-09-29T09:46:36.000Z
2022-03-24T08:30:41.000Z
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-09-30T16:56:21.000Z
2021-10-15T09:14:12.000Z
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/grid/_subplots.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-09-29T22:34:05.000Z
2021-09-29T22:34:05.000Z
import _plotly_utils.basevalidators class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): super(SubplotsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
36.045455
85
0.515763
import _plotly_utils.basevalidators class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): super(SubplotsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f730903cf9f64cb688db3b16064ab4dafccd0ee0
297
py
Python
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
5.3-Thursday/writing.py
lraynes/activities
5438ff9869df9d67757817fd4994be545eb38604
[ "MIT" ]
null
null
null
import os import csv output_path = os.path.join(".", "output", "new.csv") with open(output_path, "w", newline="") as csvfile: csvwriter = csv.writer(csvfile, delimiter=",") csvwriter.writerow(["First Name", "Last Name", "SSN"]) csvwriter.writerow(["Laura", "Raynes", "555-55-5555"])
29.7
58
0.653199
import os import csv output_path = os.path.join(".", "output", "new.csv") with open(output_path, "w", newline="") as csvfile: csvwriter = csv.writer(csvfile, delimiter=",") csvwriter.writerow(["First Name", "Last Name", "SSN"]) csvwriter.writerow(["Laura", "Raynes", "555-55-5555"])
true
true
f73090ca8723e36f89646c3925d6c5c1658f9fa9
24,872
py
Python
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
5
2021-06-21T08:17:44.000Z
2022-03-25T03:12:13.000Z
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
107
2021-06-07T07:31:14.000Z
2022-03-30T07:24:33.000Z
harvester_e2e_tests/scenarios/test_vm_actions.py
tjjh89017/tests
ab7a7dbc380f2585cf6de709d203912cf34fa84a
[ "Apache-2.0" ]
17
2021-05-26T21:05:54.000Z
2022-03-29T00:49:50.000Z
# Copyright (c) 2021 SUSE LLC # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; witho...
41.801681
79
0.575064
from harvester_e2e_tests import utils import polling2 import time import json import pytest pytest_plugins = [ 'harvester_e2e_tests.fixtures.keypair', 'harvester_e2e_tests.fixtures.vm', 'harvester_e2e_tests.fixtures.volume', 'harvester_e2e_tests.fixtures.backuptarget' ] def backup_restore_migrated_v...
true
true
f7309124ed3ffe0189fdb1c51cf417808d3ed9f7
1,726
py
Python
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
data/mnist.py
aPere3/MVAProject-RecVis16
83b581c37cb486ec855e4a40652860df4e56b363
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains a method to load mnist data. Based on David Larson work at: http://g.sweyla.com/blog/2012/mnist-numpy/a """ import numpy import os, struct from array import array as pyarray def load_mnist(dataset="training", digits=numpy.arange(10), path="mnist"):...
32.566038
115
0.634994
import numpy import os, struct from array import array as pyarray def load_mnist(dataset="training", digits=numpy.arange(10), path="mnist"): if dataset == "training": fname_img = os.path.join(path, 'train-images.idx3-ubyte') fname_lbl = os.path.join(path, 'train-labels.idx1-ubyte') elif dat...
true
true
f73092536f6b16f929d0669d98b5a821729b2f1a
4,328
py
Python
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
6
2021-04-06T19:50:52.000Z
2022-01-19T17:42:33.000Z
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
491
2021-01-20T01:10:00.000Z
2022-03-31T19:30:48.000Z
tests/modules/notifications/resources/utils.py
WildMeOrg/houston
8102229421388e44234c07ee6cb73bf705b6fba0
[ "Apache-2.0" ]
2
2021-03-12T02:33:55.000Z
2021-03-16T20:18:43.000Z
# -*- coding: utf-8 -*- """ notification resources utils ------------- """ import json from tests import utils as test_utils PATH = '/api/v1/notifications/' EXPECTED_NOTIFICATION_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sender_guid', 'message_values', } EXPECTED_LIST_KEYS = {...
29.243243
106
0.676063
import json from tests import utils as test_utils PATH = '/api/v1/notifications/' EXPECTED_NOTIFICATION_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sender_guid', 'message_values', } EXPECTED_LIST_KEYS = { 'guid', 'is_read', 'message_type', 'sender_name', 'sen...
true
true
f730926324462a884c4e33f7f7f63d6260891d16
3,685
py
Python
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
tutorials/plot_notebook.py
jnothman/sphinx-gallery
b930662613a32fe05f16b39f86fafdb4c8d6f424
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ ======================== Notebook styled examples ======================== The gallery is capable of transforming python files into reStructuredText files with a notebook structure. For this to be used you need to respect some syntax rules. It makes a lot of sense to contrast this output r...
37.989691
79
0.690638
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-np.pi, np.pi, 300) xx, yy = np.meshgrid(x, x) z = np.cos(xx) + np.cos(yy) plt.figure() plt.imshow(z) plt.colorbar() plt.xlabel('$x$') plt.ylabel('$y$') plt.figure() plt.imshow(z, cmap=plt.cm.get_cmap('hot')) plt.figure() plt.imshow(z, cmap=plt.c...
true
true
f73092a62dc94f15d8005c38a7f97315b3879895
2,582
py
Python
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
null
null
null
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
1
2021-03-02T07:15:43.000Z
2021-03-02T07:15:43.000Z
src/openstack_cli/commands/conf/keys/export.py
hapylestat/openstack_cli
be627f0b3c7ab9bf1032c36faca2ad101e53fb0e
[ "Apache-2.0" ]
1
2021-03-23T10:00:56.000Z
2021-03-23T10:00:56.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...
36.366197
82
0.72773
import os from openstack_cli.commands.conf.keys.list import _keys_list from openstack_cli.modules.apputils.terminal import Console from openstack_cli.core.config import Configuration from openstack_cli.modules.apputils.discovery import CommandMetaInfo from openstack_cli.modules.openstack import VMKeypairItemValue, Op...
true
true
f73093a92dabd28a9639dd0153472843f0f05b2b
4,305
py
Python
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
NQLoong/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-osm/huaweicloudsdkosm/v2/model/accessory_limit_vo.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class AccessoryLimitVo: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value i...
26.090909
80
0.571196
import pprint import re import six class AccessoryLimitVo: sensitive_list = [] openapi_types = { 'limit_count': 'str', 'limit_size': 'str', 'limit_file_type': 'str' } attribute_map = { 'limit_count': 'limit_count', 'limit_size': 'limit_size', '...
true
true
f730942a921d93e237889ddabf84129fe2aacd58
26
py
Python
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
1
2022-03-24T18:18:29.000Z
2022-03-24T18:18:29.000Z
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
null
null
null
e.py
Flonky/e
0954acd82ebd74e6a433aa778a3844dc7b8acc60
[ "MIT" ]
null
null
null
while True: print("e")
13
14
0.576923
while True: print("e")
true
true
f7309493f11a75d980777cffc4ea62f00325b0e2
23,031
py
Python
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
1
2020-04-07T10:09:00.000Z
2020-04-07T10:09:00.000Z
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
13
2020-05-08T11:14:37.000Z
2020-05-12T10:03:53.000Z
test/functional/test_framework/util.py
DancingAxolotl/encocoinplus
b3dcc750c48a4f4e2ffebd104e5426544fe2f6b8
[ "MIT" ]
22
2020-02-10T09:17:20.000Z
2020-07-10T10:33:26.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
38.00495
142
0.649516
from base64 import b64encode from binascii import hexlify, unhexlify from decimal import Decimal, ROUND_DOWN import hashlib import json import logging import os import random import re from subprocess import CalledProcessError import time from . import coverage from .authproxy import AuthServiceProxy, JSONRPCExceptio...
true
true
f7309534df4a2fc8176f000b46935824e18a7d45
6,764
py
Python
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/kandleriavitulina.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Kandleria vitulina. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-...
35.413613
223
0.706978
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def KandleriaVitulina( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: retur...
true
true
f73095a96bda44dd33e649a8f9b2f81b0f8a2d5e
108
py
Python
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/NodeSocketInterfaceIntUnsigned.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class NodeSocketInterfaceIntUnsigned: default_value = None max_value = None min_value = None
13.5
37
0.722222
class NodeSocketInterfaceIntUnsigned: default_value = None max_value = None min_value = None
true
true
f7309823f58463b82e823f3fd4ecc77467f835fd
11,759
py
Python
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
183
2015-01-11T13:01:01.000Z
2022-02-08T04:45:33.000Z
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
13
2015-05-12T17:39:42.000Z
2018-07-29T18:01:38.000Z
pml/engineer_tests.py
gatapia/py_ml_utils
844d8b62a7c5cc0a80f4f62c0bfda092aac57ade
[ "MIT" ]
166
2015-01-28T18:05:55.000Z
2022-02-08T04:45:34.000Z
from __future__ import print_function, absolute_import import unittest, math import pandas as pd import numpy as np from . import * class T(base_pandas_extensions_tester.BasePandasExtensionsTester): def test_concat(self): df = pd.DataFrame({'c_1':['a', 'b', 'c'], 'c_2': ['d', 'e', 'f']}) df.en...
46.478261
133
0.541628
from __future__ import print_function, absolute_import import unittest, math import pandas as pd import numpy as np from . import * class T(base_pandas_extensions_tester.BasePandasExtensionsTester): def test_concat(self): df = pd.DataFrame({'c_1':['a', 'b', 'c'], 'c_2': ['d', 'e', 'f']}) df.en...
true
true
f730982d2495ed4b89b4a58fb60e72212470ea17
11,358
py
Python
nanopores/tools/errorest.py
mitschabaude/nanopores
b1a7effed8e99ef862dd24cd9aada577d6ce28e1
[ "MIT" ]
8
2016-09-07T01:59:31.000Z
2021-03-06T12:14:31.000Z
nanopores/tools/errorest.py
mitschabaude/nanopores
b1a7effed8e99ef862dd24cd9aada577d6ce28e1
[ "MIT" ]
null
null
null
nanopores/tools/errorest.py
mitschabaude/nanopores
b1a7effed8e99ef862dd24cd9aada577d6ce28e1
[ "MIT" ]
4
2017-12-06T17:43:01.000Z
2020-05-01T05:41:14.000Z
from dolfin import * import math, numpy __all__ = ["edge_residual_indicator", "poisson_indicator", "zz_indicator", "pb_indicator", "Estimator", "pb_indicator_GO", "pb_indicator_GO_cheap"] class Estimator(object): ''' object consisting of pairs (N, f(N)) describing convergence of an error or similar '''...
30.127321
94
0.588924
from dolfin import * import math, numpy __all__ = ["edge_residual_indicator", "poisson_indicator", "zz_indicator", "pb_indicator", "Estimator", "pb_indicator_GO", "pb_indicator_GO_cheap"] class Estimator(object): ''' object consisting of pairs (N, f(N)) describing convergence of an error or similar '''...
false
true
f73099b5d58d809058597f4eeb4632505a3407c8
404
py
Python
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
5
2016-09-08T08:33:47.000Z
2020-02-10T12:31:15.000Z
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
505
2016-08-09T07:41:03.000Z
2021-02-08T20:26:46.000Z
package/cloudshell/cp/azure/models/azure_blob_url.py
tim-spiglanin/Azure-Shell
58c52994f0d6cfd798c5dca33737419ec18363d4
[ "Apache-2.0" ]
5
2016-12-21T12:52:55.000Z
2021-07-08T09:50:42.000Z
class AzureBlobUrlModel(object): def __init__(self, storage_name, container_name, blob_name): """ :param storage_name: (str) Azure storage name :param container_name: (str) Azure container name :param blob_name: (str) Azure Blob name """ self.storage_name = storage_n...
33.666667
64
0.658416
class AzureBlobUrlModel(object): def __init__(self, storage_name, container_name, blob_name): self.storage_name = storage_name self.container_name = container_name self.blob_name = blob_name
true
true
f7309b8ab0ec6cc5672805a9ee0b86213e917ba4
964
py
Python
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
5
2018-07-02T13:18:59.000Z
2019-10-14T04:55:31.000Z
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
1
2019-10-16T20:54:25.000Z
2019-10-16T20:54:25.000Z
webdriver_test_tools/config/__init__.py
connordelacruz/webdriver-test-tools
fe6906839e4423562c6d4d0aa6b10b2ea90bff6b
[ "MIT" ]
1
2019-09-03T05:29:41.000Z
2019-09-03T05:29:41.000Z
"""Default configurations for various items in the test framework. This module imports the following classes: :class:`webdriver_test_tools.config.browser.BrowserConfig` :class:`webdriver_test_tools.config.browser.BrowserStackConfig` :class:`webdriver_test_tools.config.projectfiles.ProjectFilesConfig` ...
35.703704
72
0.823651
from .projectfiles import ProjectFilesConfig from .site import SiteConfig from .test import TestSuiteConfig from .webdriver import WebDriverConfig from .browser import BrowserConfig, BrowserStackConfig
true
true
f7309bc8a28f4f8cdb7fb8535f464ad2bbe04bfe
392
py
Python
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-04-27T14:47:30.000Z
2020-04-27T14:47:30.000Z
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-06-09T15:23:04.000Z
2020-06-09T15:23:04.000Z
tests/test_invenio_circulation.py
NRodriguezcuellar/invenio-circulation
8e0c977849eb76ba9a342542dae3b6a6ef5bae16
[ "MIT" ]
1
2020-01-13T17:10:13.000Z
2020-01-13T17:10:13.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2019 CERN. # Copyright (C) 2018-2019 RERO. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Module tests.""" def test_version(): """Test version import.""" ...
23.058824
77
0.701531
def test_version(): from invenio_circulation import __version__ assert __version__
true
true
f7309c92dce2b8723801c5e1bdb0c965492b3e58
12,782
py
Python
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
lib/coinchooser.py
parkbyte/electrum-parkbyte
32fec1a172e1b39e5b57df93a972f4d9b4e595c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight ParkByte client # Copyright (C) 2015 kyuupichan@gmail # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
39.819315
79
0.634408
from collections import defaultdict, namedtuple from math import floor, log10 import struct from parkbyte import sha256, COIN, TYPE_ADDRESS from transaction import Transaction from util import NotEnoughFunds, PrintError, profiler class PRNG: def __init__(self, seed): self.sha = sha256(seed) self...
true
true
f7309d29d60d2cbdb6763d9b77b9ea53b7fcf2ae
631
py
Python
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
scripts/AddTag/R21/addsbtag.py
AsheAnn/C4D_Python
3fa5e1d8b4f94efb03f820a61789d276c8a5b045
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------- # Note: # - This is the Python code used in Script Manager. ## # Compatible: # - Win / Mac...
31.55
204
0.328051
import c4d def main(): c4d.CallCommand(100004708, 100004708) c4d.CallCommand(180000042, 180000042) if __name__=='__main__': main()
true
true
f7309d67644cc71130ee7f30f1834d0eaeb38d8f
11,434
py
Python
pyogp/apps/examples/smoke_test.py
grobertson/PyOGP.Apps
03583baa8d3a2438b0d0a5452ee8c9e56aace9fd
[ "Apache-2.0" ]
null
null
null
pyogp/apps/examples/smoke_test.py
grobertson/PyOGP.Apps
03583baa8d3a2438b0d0a5452ee8c9e56aace9fd
[ "Apache-2.0" ]
null
null
null
pyogp/apps/examples/smoke_test.py
grobertson/PyOGP.Apps
03583baa8d3a2438b0d0a5452ee8c9e56aace9fd
[ "Apache-2.0" ]
null
null
null
""" Contributors can be viewed at: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/CONTRIBUTORS.txt $LicenseInfo:firstyear=2008&license=apachev2$ Copyright 2009, Linden Research, Inc. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at: http://www.ap...
35.399381
118
0.568305
""" Contributors can be viewed at: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/CONTRIBUTORS.txt $LicenseInfo:firstyear=2008&license=apachev2$ Copyright 2009, Linden Research, Inc. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at: http://www.ap...
false
true
f7309e2c4b077ea8962cfa2d8cd82d87e8d4bf65
2,158
py
Python
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
1
2019-07-07T19:54:17.000Z
2019-07-07T19:54:17.000Z
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
null
null
null
Analysis Scripts/co2_offset.py
bonesbb/HASPR
856af4a480f4ff135591bbbcc1267898d88cbf0d
[ "MIT" ]
null
null
null
# HASPR - High-Altitude Solar Power Research # Script to calculate CO2-equivalent offset given generation profiles # Version 0.1 # Author: neyring from os import walk import haspr from haspr import Result from haspr import Dataset import numpy as np from numpy import genfromtxt # PARAMETERS # # path to ....
33.71875
100
0.696942
from os import walk import haspr from haspr import Result from haspr import Dataset import numpy as np from numpy import genfromtxt ciPath = "D:\\00_Results\\04_CO2 Offset\\1_Swiss Grid CI - 1h - UTC.csv" inputDirectory = "D:\\00_Results\\Out" haspr.outputDirectory = "D:\\00_Results\\04_CO2 Offset\\Case 5 -...
true
true
f7309e42f5d8076d77031b024afee339b3886980
1,817
py
Python
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
setup.py
JockeJarre/robotframework-CSVLibrary
e9e567ca3c7d3199ddde167c42c310fcd5657c96
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from os.path import join, dirname, abspath from setuptools import setup def read(rel_path): here = abspath(dirname(__file__)) with open(join(here, rel_path)) as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.startsw...
34.283019
63
0.624656
from os.path import join, dirname, abspath from setuptools import setup def read(rel_path): here = abspath(dirname(__file__)) with open(join(here, rel_path)) as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): if line.startswith("__version__"): ...
true
true
f7309efcb09c67631eaa89d0877022da259f67fd
566
py
Python
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
083-remove-duplicates-from-sorted-list/remove_duplicates_from_sorted_list.py
cnluocj/leetcode
5b870a63ba1aab3db1e05421c91f404a9aabc489
[ "MIT" ]
null
null
null
""" 60.36% """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ current = hea...
23.583333
45
0.530035
class Solution(object): def deleteDuplicates(self, head): current = head while current and current.next: next_node = current.next if next_node.val == current.val: current.next = next_node.next else: current = current.next ...
true
true
f7309f8fa8176e6126bbfea93a4688ef973e5475
2,172
py
Python
tests/util/test_rwlock.py
abichinger/pycasbin
6166f298406d029a8540a12a4157d7b0072f8c8e
[ "Apache-2.0" ]
915
2018-11-25T01:00:39.000Z
2022-03-30T11:21:34.000Z
tests/util/test_rwlock.py
ffyuanda/pycasbin
230132e459420aaa519d1eb9479f8996bdbbbd2a
[ "Apache-2.0" ]
231
2019-02-13T09:29:51.000Z
2022-03-28T16:32:51.000Z
tests/util/test_rwlock.py
ffyuanda/pycasbin
230132e459420aaa519d1eb9479f8996bdbbbd2a
[ "Apache-2.0" ]
173
2019-02-08T02:22:33.000Z
2022-03-10T15:16:11.000Z
from unittest import TestCase from casbin.util.rwlock import RWLockWrite from concurrent.futures import ThreadPoolExecutor import time import queue class TestRWLock(TestCase): def gen_locks(self): rw_lock = RWLockWrite() rl = rw_lock.gen_rlock() wl = rw_lock.gen_wlock() return (rl,...
26.814815
70
0.563076
from unittest import TestCase from casbin.util.rwlock import RWLockWrite from concurrent.futures import ThreadPoolExecutor import time import queue class TestRWLock(TestCase): def gen_locks(self): rw_lock = RWLockWrite() rl = rw_lock.gen_rlock() wl = rw_lock.gen_wlock() return (rl,...
true
true
f7309fc308191a299ba7877254d0da7512e8a712
1,237
py
Python
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
6
2019-08-29T19:00:57.000Z
2020-06-15T14:55:16.000Z
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
1
2020-10-23T18:56:21.000Z
2020-10-23T18:56:33.000Z
tests/python/unittest/test_lang_target.py
titikid/tvm
0cf3765b28d457d2503ec20b551e9a8eadb1491d
[ "Apache-2.0" ]
3
2018-06-29T17:19:21.000Z
2020-12-11T07:50:33.000Z
import tvm @tvm.target.generic_func def mygeneric(data): # default generic function return data + 1 @mygeneric.register(["cuda", "gpu"]) def cuda_func(data): return data + 2 @mygeneric.register("rocm") def rocm_func(data): return data + 3 @mygeneric.register("cpu") def rocm_func(data): return da...
22.490909
70
0.654002
import tvm @tvm.target.generic_func def mygeneric(data): return data + 1 @mygeneric.register(["cuda", "gpu"]) def cuda_func(data): return data + 2 @mygeneric.register("rocm") def rocm_func(data): return data + 3 @mygeneric.register("cpu") def rocm_func(data): return data + 10 def test_target_d...
true
true
f730a004824585ea2e54e929e3732507886f6a0a
516
py
Python
testcase/log_tokenNotpresent_streamActive_fail.py
SubhasisDutta/Connector-Api
76d074064500c21004e826b70883bee61efe8bf4
[ "Apache-2.0" ]
null
null
null
testcase/log_tokenNotpresent_streamActive_fail.py
SubhasisDutta/Connector-Api
76d074064500c21004e826b70883bee61efe8bf4
[ "Apache-2.0" ]
null
null
null
testcase/log_tokenNotpresent_streamActive_fail.py
SubhasisDutta/Connector-Api
76d074064500c21004e826b70883bee61efe8bf4
[ "Apache-2.0" ]
null
null
null
import httplib,json conn = httplib.HTTPConnection("localhost", 8888) print "Testing with incorrect token - Expected FAIL" token="qwertyujm-32ddfd-dfdfm-fgfvv" streamId="1321-1321" conn.request("GET", "/log?accessToken="+token+"&streamId="+streamId ) r2 = conn.getresponse() print 'Response Status: '+str(r2.status) data ...
32.25
69
0.699612
import httplib,json conn = httplib.HTTPConnection("localhost", 8888) print "Testing with incorrect token - Expected FAIL" token="qwertyujm-32ddfd-dfdfm-fgfvv" streamId="1321-1321" conn.request("GET", "/log?accessToken="+token+"&streamId="+streamId ) r2 = conn.getresponse() print 'Response Status: '+str(r2.status) data ...
false
true
f730a01780aed4d018a947bb7fd6e5d025daca5d
9,499
py
Python
modules/tests/photons_canvas_tests/points/test_helpers.py
Djelibeybi/photons
bc0aa91771d8e88fd3c691fb58f18cb876f292ec
[ "MIT" ]
51
2020-07-03T08:34:48.000Z
2022-03-16T10:56:08.000Z
modules/tests/photons_canvas_tests/points/test_helpers.py
delfick/photons
bc0aa91771d8e88fd3c691fb58f18cb876f292ec
[ "MIT" ]
81
2020-07-03T08:13:59.000Z
2022-03-31T23:02:54.000Z
modules/tests/photons_canvas_tests/points/test_helpers.py
Djelibeybi/photons
bc0aa91771d8e88fd3c691fb58f18cb876f292ec
[ "MIT" ]
8
2020-07-24T23:48:20.000Z
2021-05-24T17:20:16.000Z
# coding: spec from photons_canvas.points import helpers as php import pytest describe "Color": it "has ZERO": assert php.Color.ZERO == (0, 0, 0, 0) it "has WHITE": assert php.Color.WHITE == (0, 0, 1, 3500) it "has EMPTIES": assert php.Color.EMPTIES == (php.Color.ZERO, None) ...
38.45749
100
0.505106
from photons_canvas.points import helpers as php import pytest describe "Color": it "has ZERO": assert php.Color.ZERO == (0, 0, 0, 0) it "has WHITE": assert php.Color.WHITE == (0, 0, 1, 3500) it "has EMPTIES": assert php.Color.EMPTIES == (php.Color.ZERO, None) it "can tell ...
false
true
f730a126b5abb572ff7afb60caf111aa9e871c02
116
py
Python
LEVEL2/행렬테두리회전하기/tempCodeRunnerFile.py
seunghwanly/CODING-TEST
a820da950c163d399594770199aa2e782d1fbbde
[ "MIT" ]
null
null
null
LEVEL2/행렬테두리회전하기/tempCodeRunnerFile.py
seunghwanly/CODING-TEST
a820da950c163d399594770199aa2e782d1fbbde
[ "MIT" ]
null
null
null
LEVEL2/행렬테두리회전하기/tempCodeRunnerFile.py
seunghwanly/CODING-TEST
a820da950c163d399594770199aa2e782d1fbbde
[ "MIT" ]
null
null
null
for u in range(columns): # for k in range(rows): # print(map[u][k], end= "\t") # print()
29
41
0.448276
for u in range(columns):
false
true
f730a1a680a5e31f14718b5fcf0fe938a393cf81
4,041
py
Python
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py
jedbrown/PetIBM
8584d824e0ffbbe2ea413dcf081e79a72b39bf5f
[ "BSD-3-Clause" ]
null
null
null
""" Plots the steady-state force coefficients of an inclined flat-plate with aspect-ratio 2 at Reynolds number 100 for angles of attack between 0 and 90 degrees. Compares with experimental results reported in Taira et al. (2007). _References:_ * Taira, K., Dickson, W. B., Colonius, T., Dickinson, M. H., & Rowley, C. ...
39.23301
78
0.644642
import os import numpy from matplotlib import pyplot if not os.environ.get('PETIBM_EXAMPLES'): raise KeyError('Environment variable PETIBM_EXAMPLES is not set; ' 'Set PETIBM_EXAMPLES as the root directory of the examples.') script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.se...
true
true
f730a1ae102d08afb1c37051c52914eb79ec8212
1,395
py
Python
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
utils/parser/parser.py
reeegry/youtube-parser-bot
475e232f80445ae6ba3e988d844b61bada6c0aed
[ "MIT" ]
null
null
null
import urllib.request import json import requests from data.config import * def youtube_get_information(channel_id): api_key = YOUTUBE_API_KEY base_search_url = "https://www.googleapis.com/youtube/v3/search?" base_video_link = "https://www.youtube.com/watch?v=" first_url = base_search_url + f"key={api...
29.680851
113
0.629391
import urllib.request import json import requests from data.config import * def youtube_get_information(channel_id): api_key = YOUTUBE_API_KEY base_search_url = "https://www.googleapis.com/youtube/v3/search?" base_video_link = "https://www.youtube.com/watch?v=" first_url = base_search_url + f"key={api...
true
true
f730a1efa3b379ce51a02f804023a5cabbc94433
12,104
py
Python
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
4
2021-07-21T07:48:02.000Z
2022-03-16T00:42:33.000Z
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
3
2021-11-06T09:18:21.000Z
2022-01-11T14:19:40.000Z
models/yolo.py
QamarQuqa/Real-time-Traffic-and-Pedestrian-Counting
c53384f496e816bb852afea328d94b9e963fe753
[ "MIT" ]
3
2021-12-26T03:05:06.000Z
2022-01-14T07:54:56.000Z
# YOLOv5 YOLO-specific modules import argparse import logging import sys from copy import deepcopy sys.path.append('./') # to run '$ python *.py' files in subdirectories logger = logging.getLogger(__name__) from models.common import * from models.experimental import * from utils.autoanchor import check_anchor_order...
43.539568
119
0.542052
import argparse import logging import sys from copy import deepcopy sys.path.append('./') logger = logging.getLogger(__name__) from models.common import * from models.experimental import * from utils.autoanchor import check_anchor_order from utils.general import make_divisible, check_file, set_logging from utils.to...
true
true
f730a306db38384a6b876c13045c0824325f5a80
95
py
Python
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
1
2020-08-06T18:51:26.000Z
2020-08-06T18:51:26.000Z
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
null
null
null
matversion.py
lukasijus/Improving-Deep-Neural-Networks-Hyperparameter-tuning-Regularization-and-gradient-checking
ce33f2a830abaf974aa1b04b61a7f25d2c4b2bd7
[ "MIT" ]
null
null
null
#import matplotlib #print(matplotlib.__version__) import tensorflow as tf print(tf.__version__)
23.75
30
0.842105
import tensorflow as tf print(tf.__version__)
true
true
f730a4182acb8d42e7b585c4b972507dc5f1fbb5
5,276
py
Python
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
1
2022-02-10T06:48:05.000Z
2022-02-10T06:48:05.000Z
egs/voxceleb/v1/nnet/lib/extract.py
deciding/tf-kaldi-speaker
ceaed721e502a71434d910fd73b202940ea2ce60
[ "Apache-2.0" ]
null
null
null
import argparse import numpy as np import os import sys import numpy, scipy, sklearn from model.trainer import Trainer from misc.utils import Params from dataset.kaldi_io import FeatureReader, open_or_fd, read_mat_ark, write_vec_flt from six.moves import range parser = argparse.ArgumentParser() parser.add_argument("-g...
52.237624
164
0.657127
import argparse import numpy as np import os import sys import numpy, scipy, sklearn from model.trainer import Trainer from misc.utils import Params from dataset.kaldi_io import FeatureReader, open_or_fd, read_mat_ark, write_vec_flt from six.moves import range parser = argparse.ArgumentParser() parser.add_argument("-g...
true
true
f730a42cacff927c57b8618033a20ff148ab5b71
1,637
py
Python
config.py
rafael-carvalho/investigo-meraki
3c75ebc54e38b822e5ae452f4faf12d527d95f4d
[ "Apache-2.0" ]
2
2018-04-05T08:52:54.000Z
2020-05-16T15:43:44.000Z
config.py
meraki/investigo-spark-bot
34665143724522d463873d704dd8d77861748358
[ "Apache-2.0" ]
null
null
null
config.py
meraki/investigo-spark-bot
34665143724522d463873d704dd8d77861748358
[ "Apache-2.0" ]
2
2018-04-18T08:35:59.000Z
2020-03-12T22:13:19.000Z
import os class Config(object): BASE_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = False SECRET_KEY = os.environ['SECRET_KEY'] DATABASE_URL = os.environ['DATABASE_URL'] SQLALCHEMY_DATABASE_URI = DATABASE_URL SQLALCHEMY_TRACK_MODIFICATIONS = True TROPO_API_KEY_TEXT = os.environ.g...
34.829787
91
0.729994
import os class Config(object): BASE_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = False SECRET_KEY = os.environ['SECRET_KEY'] DATABASE_URL = os.environ['DATABASE_URL'] SQLALCHEMY_DATABASE_URI = DATABASE_URL SQLALCHEMY_TRACK_MODIFICATIONS = True TROPO_API_KEY_TEXT = os.environ.g...
true
true
f730a48aa8629fddb68ef5a3a25e8da73942fea2
5,876
py
Python
tensorflow/python/compat/compat.py
lightyang/tensorflow
1a455a77d80fa788fd7963530dd130ad7d902226
[ "Apache-2.0" ]
null
null
null
tensorflow/python/compat/compat.py
lightyang/tensorflow
1a455a77d80fa788fd7963530dd130ad7d902226
[ "Apache-2.0" ]
2
2021-08-25T16:13:06.000Z
2022-02-10T02:19:43.000Z
tensorflow/python/compat/compat.py
Hyperclaw79/tensorflow
14c58e1d380b2001ffdf7ef782d44ad1a21f763c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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.185629
82
0.747617
from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import os from tensorflow.python.util import tf_contextlib from tensorflow.python.util.tf_export import tf_export _FORWARD_COMPATIBILITY_HORIZON = datetime.date(2020, 2, 5) _FORWARD_COMPATIBI...
true
true
f730a4db01573a009901b98513880dc1ffb68715
807
py
Python
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/neurolearn_dev
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_imageglobals.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
33.625
78
0.545229
from nose.tools import (assert_true, assert_false, assert_raises, assert_equal, assert_not_equal) from .. import imageglobals as igs def test_errorlevel(): orig_level = igs.error_level for level in (10, 20, 30): with igs.ErrorLevel(level): assert_equal(igs.error_l...
true
true
f730a5be097b0dd193d78fd67d840787ea818e19
886
py
Python
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
10
2018-04-19T21:54:31.000Z
2021-07-22T12:46:33.000Z
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
9
2018-01-30T20:41:36.000Z
2021-01-28T23:00:18.000Z
graph_peak_caller/analysis/diploratio_v_motifrate.py
uio-bmi/graph_peak_caller
89deeabf3cd0b23fba49b1304f1c81222fb534d7
[ "BSD-3-Clause" ]
3
2019-08-20T21:43:53.000Z
2022-01-20T14:39:34.000Z
import numpy as np import matplotlib.pyplot as plt def plot(base_name): def get_hist(s): return s["summary"][0]*s["diplo_hist"] motif = np.load(base_name + "/limited_summits_alignments_motif_summary.npz") nonmotif = np.load(base_name + "/limited_summits_alignments_nonmotif_summary.npz") motif_...
31.642857
86
0.691874
import numpy as np import matplotlib.pyplot as plt def plot(base_name): def get_hist(s): return s["summary"][0]*s["diplo_hist"] motif = np.load(base_name + "/limited_summits_alignments_motif_summary.npz") nonmotif = np.load(base_name + "/limited_summits_alignments_nonmotif_summary.npz") motif_...
true
true
f730a5caa27df176131385076f8a70b5752aa206
1,224
py
Python
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
2
2015-09-02T21:39:10.000Z
2016-06-16T01:54:20.000Z
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
null
null
null
os_windows/_i18n.py
cloudbase/oslo.windows
8dd9a41499653ea7c58e238877942ab1d4c46636
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
31.384615
78
0.747549
import oslo_i18n _translators = oslo_i18n.TranslatorFactory(domain='oslo.windows') _ = _translators.primary _LI = _translators.log_info _LW = _translators.log_warning _LE = _translators.log_error _LC = _translators.log_critical
true
true
f730a64dcfd7ad054c235267a643fa3816394fc1
261
py
Python
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
4
2021-01-07T14:25:15.000Z
2021-02-01T10:36:10.000Z
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
month01/all_code/day02/exercise06.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
""" 练习1:在终端中输入一个疫情确诊人数再录入一个治愈人数, 打印治愈比例 格式:治愈比例为xx% 效果: 请输入确诊人数:500 请 输入治愈人数:495 治愈比例为99.0% """ confirmed = int(input("请输入确诊人数:")) cure = int(input("请输入治愈人数:")) result = cure / confirmed * 100 print("治愈比例为" + str(result) + "%")
18.642857
34
0.59387
confirmed = int(input("请输入确诊人数:")) cure = int(input("请输入治愈人数:")) result = cure / confirmed * 100 print("治愈比例为" + str(result) + "%")
true
true
f730a690b6b79400b52d582014d1ddf3b05f2bf6
369
py
Python
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
1
2022-02-19T18:55:43.000Z
2022-02-19T18:55:43.000Z
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
null
null
null
h1st_contrib/iot_mgmt/maint_ops/migrations/0073_auto_20181121_0024.py
h1st-ai/h1st-contrib
38fbb1fff4513bb3433bc12f2b436836e5e51c80
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.1 on 2018-11-21 00:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('IoT_MaintOps', '0072_auto_20181115_0423'), ] operations = [ migrations.AlterModelOptions( name='equipmentinstancedailyriskscore', ...
20.5
52
0.620596
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('IoT_MaintOps', '0072_auto_20181115_0423'), ] operations = [ migrations.AlterModelOptions( name='equipmentinstancedailyriskscore', options={'ordering': ()}, ), ]...
true
true
f730a88b0aa1fb26bbd6dfb345fe135d202fd7b6
8,692
py
Python
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
9
2020-04-28T19:12:30.000Z
2022-03-22T23:04:46.000Z
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
59
2020-06-12T12:12:52.000Z
2022-03-28T18:14:50.000Z
sdk/python/pulumi_mongodbatlas/get_cloud_provider_snapshot.py
pulumi/pulumi-mongodbatlas
0d5c085dcfd871b56fb4cf582620260b70caa07a
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-25T21:22:08.000Z
2021-08-30T20:06:18.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
40.0553
254
0.666015
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ 'GetCloudProviderSnapshotResult', 'AwaitableGetCloudProviderSnapshotResult', 'get_cloud_provider_snapshot', ] @pulumi.output_type class GetCloudPro...
true
true
f730a8d6bd9bfbf555172824425acb3083358392
686
py
Python
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
7
2020-11-23T02:45:36.000Z
2022-03-18T03:03:33.000Z
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
4
2021-02-23T03:03:51.000Z
2021-11-13T00:07:38.000Z
coq/tools/make-both-time-files.py
reichel3/TacTok
c344e76263de04311af8a0030c07aec95d87f71c
[ "MIT" ]
2
2021-01-19T17:56:28.000Z
2022-03-28T04:39:41.000Z
#!/usr/bin/env python import sys from TimeFileMaker import * if __name__ == '__main__': USAGE = 'Usage: %s [--sort-by=auto|absolute|diff] AFTER_FILE_NAME BEFORE_FILE_NAME [OUTPUT_FILE_NAME ..]' % sys.argv[0] HELP_STRING = r'''Formats timing information from the output of two invocations of `make TIMED=1` into ...
40.352941
123
0.728863
import sys from TimeFileMaker import * if __name__ == '__main__': USAGE = 'Usage: %s [--sort-by=auto|absolute|diff] AFTER_FILE_NAME BEFORE_FILE_NAME [OUTPUT_FILE_NAME ..]' % sys.argv[0] HELP_STRING = r'''Formats timing information from the output of two invocations of `make TIMED=1` into a sorted table. The i...
true
true
f730a93f581867bc217a894c85120b1515d73e81
2,516
py
Python
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
1
2020-04-16T12:13:47.000Z
2020-04-16T12:13:47.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:50:15.000Z
2020-05-19T14:58:30.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/125359744.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:45:13.000Z
2020-06-09T19:18:31.000Z
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 125359744 """ """ random actions, total chaos """ board = gamma_new(3, 4, 4, 4) assert board is...
29.255814
58
0.678855
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) board = gamma_new(3, 4, 4, 4) assert board is not None assert gamma_move(board, 1, 1, 2) == 1 assert gamma_move(board, 1, 0, 2) == 1 ...
true
true
f730a9b7a1db7a1618efa71421a99e18b273e3d6
2,861
py
Python
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, jsonify from flask_cors import CORS, cross_origin import requests from bs4 import BeautifulSoup as bs from urllib.request import urlopen as uReq import pymongo app = Flask(__name__) @app.route('/', methods=['POST', 'GET']) def index(): if request.method == 'POST...
40.871429
112
0.51136
from flask import Flask, render_template, request, jsonify from flask_cors import CORS, cross_origin import requests from bs4 import BeautifulSoup as bs from urllib.request import urlopen as uReq import pymongo app = Flask(__name__) @app.route('/', methods=['POST', 'GET']) def index(): if request.method == 'POST...
true
true
f730a9e2fce406cfb29f69a52f9dfdd07eb5199b
96
py
Python
Python Pattern Programs/Alphabetic Patterns/Pattern 5.py
trial1user/Printing-Pattern-Programs
dde29e056b8e067fb3a824edb7ecb7dd9c9a776a
[ "MIT" ]
61
2021-01-07T03:56:25.000Z
2022-02-26T14:39:52.000Z
PythonPatternPrograms/AlphabeticPatterns/Pattern 5.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
51
2020-12-25T17:06:26.000Z
2021-05-07T12:52:56.000Z
PythonPatternPrograms/AlphabeticPatterns/Pattern 5.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
13
2021-01-07T09:50:21.000Z
2021-12-17T11:03:57.000Z
for x in range(65, 70): for y in range(65, x + 1): print(chr(x), end="") print()
24
30
0.489583
for x in range(65, 70): for y in range(65, x + 1): print(chr(x), end="") print()
true
true
f730a9e647e5d1432afdb7a94d9a14a04264fc9b
5,738
py
Python
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
39.30137
84
0.518822
import copy import platform from platformio.managers.platform import PlatformBase from platformio.util import get_systype class Nordicnrf51Platform(PlatformBase): def is_embedded(self): return True def configure_default_packages(self, variables, targets): if "erase" in targets: ...
true
true
f730a9f146914b909d2007a03b578d74b8950165
248
py
Python
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Learning Eligibility in Clinical Trials Using Neural Networks', author='John James', license='BSD-3', )
22.545455
80
0.693548
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Learning Eligibility in Clinical Trials Using Neural Networks', author='John James', license='BSD-3', )
true
true
f730aa6163e999ba3e3dedeced39133e1bbdaa3b
4,662
py
Python
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
3
2016-09-15T12:49:08.000Z
2016-10-22T11:47:11.000Z
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
null
null
null
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
null
null
null
# coding: utf-8 # """ Mediator module. This module puts together other modules to implement the program logic. """ from __future__ import absolute_import # Standard-library imports from argparse import ArgumentParser from argparse import ArgumentTypeError import sys import traceback # Local imports from .func import...
22.631068
77
0.611111
from __future__ import absolute_import from argparse import ArgumentParser from argparse import ArgumentTypeError import sys import traceback from .func import factorial def int_ge0(text): try: int_value = int(text) assert int_value >= 0 except Exception: rai...
true
true
f730abdde75909808210df1f3886c99110f87f72
11,682
py
Python
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
import cgi import re try: import urllib.parse as urlparse except ImportError: import urlparse try: from html import unescape except ImportError: try: from html.parser import HTMLParser except ImportError: from HTMLParser import HTMLParser unescape = HTMLParser().unescape from...
31.069149
91
0.54982
import cgi import re try: import urllib.parse as urlparse except ImportError: import urlparse try: from html import unescape except ImportError: try: from html.parser import HTMLParser except ImportError: from HTMLParser import HTMLParser unescape = HTMLParser().unescape from...
true
true
f730abe304c37698a7a929d72c33c9de240a15f7
9,543
py
Python
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (tryread/config/settings/base.py - 3 = tryread/) APPS_DIR = ROOT_DIR.path('tryread') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: ...
38.635628
98
0.625799
import environ ROOT_DIR = environ.Path(__file__) - 3 APPS_DIR = ROOT_DIR.path('tryread') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR.path('.env'))) DEBUG = env.bool('DJANGO_DEBUG', False) TIME_ZONE = 'UTC' LANG...
true
true
f730acfe327038eafb73c8469ea9eb060bf5ea02
4,297
py
Python
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
import numpy as np import argparse import cv2 as cv import subprocess import time import os from support import infer_image, show_image FLAGS = [] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--model-path', type=str, default='./model/', help='The directory where th...
26.20122
105
0.658366
import numpy as np import argparse import cv2 as cv import subprocess import time import os from support import infer_image, show_image FLAGS = [] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--model-path', type=str, default='./model/', help='The directory where th...
true
true
f730ad586dc64abb0dc959278121e0408d62bbe2
1,041
py
Python
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
3
2020-09-19T21:38:30.000Z
2022-03-30T11:02:26.000Z
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
null
null
null
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
1
2022-02-04T09:13:20.000Z
2022-02-04T09:13:20.000Z
""" Sprawdz czy istnieje permutacja danego slowa bedaca palindromem. """ # Wersja 1 def znajdz_permutacje(napis, start, koniec, wynik=[]): if start >= koniec: if "".join(napis) not in wynik: wynik.append("".join(napis)) else: for i in range(start, koniec): napis[start...
20.82
84
0.621518
def znajdz_permutacje(napis, start, koniec, wynik=[]): if start >= koniec: if "".join(napis) not in wynik: wynik.append("".join(napis)) else: for i in range(start, koniec): napis[start], napis[i] = napis[i], napis[start] znajdz_permutacje(napis, start + 1...
true
true
f730adbf9c1f3a579711a5941736814a6d65e98c
7,139
py
Python
Tiny-ImageNet/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
1
2021-08-21T09:19:17.000Z
2021-08-21T09:19:17.000Z
CIFAR/CIFAR_50K/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
null
null
null
CIFAR/CIFAR_50K/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
2
2021-04-15T08:23:49.000Z
2021-09-15T06:52:25.000Z
from __future__ import print_function from PIL import Image import os import os.path import numpy as np import sys import pickle import torch import torch.utils.data as data from itertools import permutations class VisionDataset(data.Dataset): _repr_indent = 4 def __init__(self, root, transforms=None, trans...
32.747706
86
0.595321
from __future__ import print_function from PIL import Image import os import os.path import numpy as np import sys import pickle import torch import torch.utils.data as data from itertools import permutations class VisionDataset(data.Dataset): _repr_indent = 4 def __init__(self, root, transforms=None, trans...
true
true
f730ae6a31dcc419b37475dbdeeafb8f61dff61c
3,593
py
Python
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 LMNT, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
33.579439
91
0.618981
import numpy as np import os import torch import torchaudio from argparse import ArgumentParser from diffwave.params import AttrDict, params as base_params from diffwave.model import DiffWave models = {} def load_model(model_dir, device): global models if os.path.exists(f"{model_dir}/weights.pt"): ...
true
true
f730ae92f94c6a1c98bcbfd1b9c656dbf9f0d677
576
py
Python
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
null
null
null
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
null
null
null
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
1
2018-10-24T02:54:40.000Z
2018-10-24T02:54:40.000Z
''' Created on Dec 30, 2010 @author: patnaik ''' from collections import deque class Queue(object): def __init__(self, data = None): if data: self.internal_queue = deque(data) else: self.internal_queue = deque() def enqueue(self, value): self...
20.571429
49
0.578125
from collections import deque class Queue(object): def __init__(self, data = None): if data: self.internal_queue = deque(data) else: self.internal_queue = deque() def enqueue(self, value): self.internal_queue.append(value) def deq...
true
true
f730af67a6528163daebb523295431d1e6c54c82
16,885
py
Python
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
52.601246
1,678
0.640687
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f730af851f20a268b6a0f44fd441c1856d5e489a
8,362
py
Python
transformers/modeling_tf_transfo_xl_utilities.py
wietsedv/transformers
8efc6dd544bf1a30d99d4b5abfc5e214699eab2b
[ "Apache-2.0" ]
4
2020-02-18T22:33:35.000Z
2021-06-24T20:34:50.000Z
transformers/modeling_tf_transfo_xl_utilities.py
eangelica2014/transformers
5e289f69bc564c94132f77c89a34e5f1dd69a592
[ "Apache-2.0" ]
null
null
null
transformers/modeling_tf_transfo_xl_utilities.py
eangelica2014/transformers
5e289f69bc564c94132f77c89a34e5f1dd69a592
[ "Apache-2.0" ]
1
2020-07-01T01:16:11.000Z
2020-07-01T01:16:11.000Z
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
47.511364
110
0.527864
from collections import defaultdict import numpy as np import tensorflow as tf from .modeling_tf_utils import shape_list class TFAdaptiveSoftmaxMask(tf.keras.layers.Layer): def __init__(self, vocab_size, d_embed, d_proj, cutoffs, div_val=1, keep_order=False, **kwargs): super(TFAdaptive...
true
true
f730b057549fb7fa3a7ab3af3435630749ad857a
131
py
Python
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
import fileinput suma = sum(float(num) for num in fileinput.input()) if (suma).is_integer(): print(int(suma)) else: print(suma)
16.375
51
0.709924
import fileinput suma = sum(float(num) for num in fileinput.input()) if (suma).is_integer(): print(int(suma)) else: print(suma)
true
true
f730b0aa8d6d0ccc56c5c91946429f4bb15d48a4
218
py
Python
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
4
2015-05-27T04:07:59.000Z
2016-03-08T15:13:35.000Z
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
null
null
null
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
null
null
null
from redis import Redis from config.getconfig import getconfig def conn(): config = config() rec = getconfig()["redis"] self.conn = Redis(host=rec["host"],port=int(rec["port"]),db=int(rec['db'])) return self.conn
27.25
77
0.697248
from redis import Redis from config.getconfig import getconfig def conn(): config = config() rec = getconfig()["redis"] self.conn = Redis(host=rec["host"],port=int(rec["port"]),db=int(rec['db'])) return self.conn
true
true
f730b168fcf7dec7355c788c5f9285fee330b4ac
325
py
Python
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
# 1876. Утро сороконожки # solved boots = input().split(' ') left_boots = int(boots[0]) right_boots = int(boots[1]) left_legs = 40 right_legs = 40 result = 0 if right_boots >= left_boots: result = right_boots*2 + left_legs else: result = (right_legs - 1)*2 + left_legs + (left_boots - left_legs)*2 + 1 print(re...
21.666667
76
0.683077
boots = input().split(' ') left_boots = int(boots[0]) right_boots = int(boots[1]) left_legs = 40 right_legs = 40 result = 0 if right_boots >= left_boots: result = right_boots*2 + left_legs else: result = (right_legs - 1)*2 + left_legs + (left_boots - left_legs)*2 + 1 print(result)
true
true
f730b1d1edd280ab8da6c0db314c7a6d740157a1
12,189
py
Python
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
null
null
null
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
null
null
null
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
1
2018-08-26T02:48:51.000Z
2018-08-26T02:48:51.000Z
"Callbacks provides extensibility to the `basic_train` loop. See `train` for examples of custom callbacks." from .data import * from .torch_core import * __all__ = ['Callback', 'CallbackHandler', 'OptimWrapper', 'SmoothenValue', 'Stepper', 'annealing_cos', 'CallbackList', 'annealing_exp', 'annealing_linear'...
42.618881
124
0.644844
from .data import * from .torch_core import * __all__ = ['Callback', 'CallbackHandler', 'OptimWrapper', 'SmoothenValue', 'Stepper', 'annealing_cos', 'CallbackList', 'annealing_exp', 'annealing_linear', 'annealing_no', 'annealing_poly', 'do_annealing_poly'] class OptimWrapper(): def __init__(self, opt:o...
true
true
f730b21126e67ebc36e6bc1ec1c6b28c3f9a4d71
174
py
Python
.history/py/main_20210613213845.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
.history/py/main_20210613213845.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
.history/py/main_20210613213845.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
class IceCream: def __init__(self): self.scoops = 3 def eat(self, scoops): self.scoops = self.scoops = scoops def add(self, scoops):
14.5
42
0.557471
class IceCream: def __init__(self): self.scoops = 3 def eat(self, scoops): self.scoops = self.scoops = scoops def add(self, scoops):
false
true
f730b2ef46405f107ae301a6a6737279f08c4c9d
2,465
py
Python
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access """ import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from google.appengine.api import memcache from google.appengine.ext ...
33.767123
76
0.636917
import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from google.appengine.api import memcache from google.appengine.ext import ndb from conference import ConferenceApi from settings import MEMCACHE_SPEAKER_KEY from models import Conference, Session, Speaker __author__...
true
true
f730b4147de5dae0eab5ed3e717e1a146221dfe5
972
py
Python
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Forest Posets AUTHORS: - Stefan Grosser (06-2020): initial implementation """ # **************************************************************************** # Copyright (C) 2020 Stefan Grosser <stefan.grosser1@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under t...
32.4
78
0.616255
from sage.combinat.posets.posets import FinitePoset from sage.combinat.posets.linear_extensions import LinearExtensionsOfForest class ForestPoset(FinitePoset): _lin_ext_type = LinearExtensionsOfForest _desc = 'Finite forest poset'
true
true
f730b4360fcf30609dec2be0e7dc23ff7f04436d
190
py
Python
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
9
2019-11-28T01:33:43.000Z
2021-09-06T06:51:47.000Z
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
1
2022-02-06T12:03:00.000Z
2022-02-07T02:30:47.000Z
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
4
2019-12-12T05:35:28.000Z
2021-04-30T18:41:41.000Z
from collections import namedtuple ConvolutionConfig = namedtuple('ConvolutionConfig', ['n_filters', 'kernel_size', 'stride', 'padding']) PadConfig = namedtuple('PadConfig', ['padding'])
27.142857
102
0.752632
from collections import namedtuple ConvolutionConfig = namedtuple('ConvolutionConfig', ['n_filters', 'kernel_size', 'stride', 'padding']) PadConfig = namedtuple('PadConfig', ['padding'])
true
true
f730b62321ee0ae029cfec6153d97c708713be29
37,777
py
Python
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
1
2018-04-19T05:09:06.000Z
2018-04-19T05:09:06.000Z
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
14
2018-03-04T22:56:41.000Z
2020-12-10T19:49:43.000Z
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
2
2020-09-18T15:12:26.000Z
2020-11-10T22:09:59.000Z
# -*- coding: utf-8 -*- # pylint: disable=no-member """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: BSD | This file contains the DAL support for many relational databases, including: - SQLite & SpatiaLite - MySQL - Postgres - Firebird...
36.819688
169
0.556953
import glob import logging import socket import threading import time import traceback import urllib from ._compat import ( PY2, pickle, hashlib_md5, pjoin, copyreg, integer_types, with_metaclass, long, unquote, iteritems, ) from ._globals import GLOBAL_LOCKER, THREAD_LOCAL, DE...
true
true
f730b66e7a44d8029420d31e049ca3f917f8e10f
10,128
py
Python
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
2
2016-11-23T17:32:37.000Z
2022-02-24T05:13:20.000Z
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
null
null
null
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
1
2016-12-30T20:02:48.000Z
2016-12-30T20:02:48.000Z
# coding: utf-8 """ BillForward REST API OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git 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...
36.042705
193
0.626086
from pprint import pformat from six import iteritems import re class DataSynchronizationJobPagedMetadata(object): def __init__(self, next_page=None, current_page=None, current_offset=None, records_requested=None, records_returned=None, execution_time=None, results=None): self.swagger_types = { ...
true
true
f730b975efb7291bf0ef3c3242905078b950a0fa
45
py
Python
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
1,392
2021-03-28T01:11:50.000Z
2022-03-23T21:46:27.000Z
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
195
2021-03-27T20:38:54.000Z
2021-10-01T12:43:17.000Z
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
50
2021-04-16T07:08:03.000Z
2022-02-21T05:06:47.000Z
"""A nbformat mock""" __version__ = "4.2.0"
11.25
21
0.6
__version__ = "4.2.0"
true
true
f730ba393656175bda415e196e26904e2b289597
1,606
py
Python
release/xgboost_tests/workloads/train_gpu.py
manishnish138/ray
790dca28cf6972edebc44826c8aa3d62cbee1a5e
[ "Apache-2.0" ]
3
2021-08-29T20:41:21.000Z
2022-01-31T18:47:51.000Z
release/xgboost_tests/workloads/train_gpu.py
QPC-database/amazon-ray
55aa4cac02a412b96252aea4e8c3f177a28324a1
[ "Apache-2.0" ]
59
2021-01-14T14:59:36.000Z
2022-03-25T23:07:05.000Z
release/xgboost_tests/workloads/train_gpu.py
majacQ/ray
bc08c6cdcc7ddf4da751ca2a972defd3db509061
[ "Apache-2.0" ]
null
null
null
"""Training on a GPU cluster. This will train a small dataset on a distributed GPU cluster. Test owner: krfricke Acceptance criteria: Should run through and report final results. Notes: The test will report output such as this: ``` [05:14:49] WARNING: ../src/gbm/gbtree.cc:350: Loading from a raw memory buffer on CP...
25.492063
78
0.663138
import json import os import time import ray from xgboost_ray import RayParams from _train import train_ray if __name__ == "__main__": ray.init(address="auto") ray_params = RayParams( elastic_training=False, max_actor_restarts=2, num_actors=4, cpus_per_actor=4, gpus_p...
true
true
f730bb742a33abcb801bbbb522892e6ea4f4e546
2,152
py
Python
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
7
2020-10-12T10:46:30.000Z
2021-06-23T10:42:30.000Z
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
null
null
null
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
2
2021-04-26T12:46:44.000Z
2021-09-16T08:27:53.000Z
import json import os from typing import Tuple, List, Callable from core.folders import folders class RoadStorage: def __init__(self, path: str = None): if path is None: path='test_driving' self.folder = str(folders.member_seeds.joinpath(path)) os.makedirs(self.folder, exist_...
34.15873
101
0.608271
import json import os from typing import Tuple, List, Callable from core.folders import folders class RoadStorage: def __init__(self, path: str = None): if path is None: path='test_driving' self.folder = str(folders.member_seeds.joinpath(path)) os.makedirs(self.folder, exist_...
true
true
f730bbfbb24db521361e11a81c81fd782b3e533d
10,665
py
Python
inbreast.py
wentaozhu/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
106
2017-03-12T17:26:49.000Z
2022-02-12T01:37:17.000Z
inbreast.py
huhansan666666/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
17
2017-04-11T14:49:34.000Z
2022-03-19T07:57:37.000Z
inbreast.py
huhansan666666/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
41
2017-03-21T09:48:39.000Z
2021-11-29T06:51:16.000Z
#import dicom # some machines not install pydicom import scipy.misc import numpy as np from sklearn.model_selection import StratifiedKFold import cPickle #import matplotlib #import matplotlib.pyplot as plt from skimage.filters import threshold_otsu import os from os.path import join as join import csv impo...
35.909091
112
0.634974
import scipy.misc import numpy as np from sklearn.model_selection import StratifiedKFold import cPickle from skimage.filters import threshold_otsu import os from os.path import join as join import csv import scipy.ndimage import dicom path = '../AllDICOMs/' preprocesspath = '../preprocesspath/' labelfile =...
true
true
f730bcb2483c07c6b27c50e0f64f975de88ddef7
1,707
py
Python
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
2
2019-12-14T04:24:33.000Z
2020-02-21T07:17:40.000Z
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
14
2020-02-12T22:20:41.000Z
2021-11-09T19:41:23.000Z
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
2
2020-06-22T11:17:44.000Z
2020-11-04T04:11:59.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...
39.697674
74
0.794376
from __future__ import absolute_import from apache_beam.io.avroio import * from apache_beam.io.filebasedsink import * from apache_beam.io.iobase import Read from apache_beam.io.iobase import Sink from apache_beam.io.iobase import Write from apache_beam.io.iobase import Writer from apache_beam.io.mongodbio import * fr...
true
true
f730bd8c30f682808cde1355d3c15659e66ef93c
582
py
Python
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 10 21:23:13 2021 @author: Administrator """ import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../') from utils import SpiderFormat # noqa: E402 from spider_factory import SpiderFactory # noqa: E402 def test_onnxspider(): spider = S...
20.068966
68
0.725086
import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../') from utils import SpiderFormat from spider_factory import SpiderFactory def test_onnxspider(): spider = SpiderFactory.create(SpiderFormat.ONNX) assert spider is not None def test_torchspider(): spider = SpiderFactory....
true
true
f730bdfa184e875f2155e79716a3aed6b404a24c
1,861
py
Python
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
562
2015-02-20T08:25:24.000Z
2021-11-12T19:58:44.000Z
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
129
2015-02-20T07:41:14.000Z
2022-02-17T21:14:40.000Z
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
54
2015-02-28T01:12:23.000Z
2021-03-02T11:14:52.000Z
SQLALCHEMY_DATABASE_URI = "postgresql:///test_freight" LOG_LEVEL = "INFO" WORKSPACE_ROOT = "/tmp/freight-tests" SSH_PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEArvyc+vZVxUjC5ZcFg1VN3jQOCOjO94gwQKFxlz0zOCrCz+Sq\nnWk28YdUpOU016Zinlh4ZZk2136nCKKTMnNMjd6cTTCn5fWomjR+F2CSdaYYpYfO\nNtVnq0SIDUgGmjyPncOGr...
186.1
1,720
0.922085
SQLALCHEMY_DATABASE_URI = "postgresql:///test_freight" LOG_LEVEL = "INFO" WORKSPACE_ROOT = "/tmp/freight-tests" SSH_PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEArvyc+vZVxUjC5ZcFg1VN3jQOCOjO94gwQKFxlz0zOCrCz+Sq\nnWk28YdUpOU016Zinlh4ZZk2136nCKKTMnNMjd6cTTCn5fWomjR+F2CSdaYYpYfO\nNtVnq0SIDUgGmjyPncOGr...
true
true
f730be982c887d5e48842dce53d62d19a740a19a
8,899
py
Python
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/AIToolbox
c64ac4810a02d230ce471d86b758e82ea232a7e7
[ "MIT" ]
3
2019-10-12T12:24:09.000Z
2020-08-02T02:42:43.000Z
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/aitoolbox
1060435e6cbdfd19abcb726c4080b663536b7467
[ "MIT" ]
3
2020-04-10T14:07:07.000Z
2020-04-22T19:04:38.000Z
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/aitoolbox
1060435e6cbdfd19abcb726c4080b663536b7467
[ "MIT" ]
null
null
null
import unittest import os import shutil import random import pickle import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.multiprocessing as mp import torch.dis...
37.23431
118
0.60681
import unittest import os import shutil import random import pickle import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.multiprocessing as mp import torch.dis...
true
true
f730bee814b7a46573d0b55a5eaf76c8bd13efe5
1,913
py
Python
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
from util.inputReader import read_as_strings LENGTH = 12 def part1(list_of_strings): one_count = [0] * LENGTH zero_count = [0] * LENGTH for string in list_of_strings: for i, val in enumerate(string): if val == '0': zero_count[i] += 1 else: ...
27.328571
76
0.543126
from util.inputReader import read_as_strings LENGTH = 12 def part1(list_of_strings): one_count = [0] * LENGTH zero_count = [0] * LENGTH for string in list_of_strings: for i, val in enumerate(string): if val == '0': zero_count[i] += 1 else: ...
true
true
f730bf6ba9f601b648b12146b752965863bf095b
7,902
py
Python
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
1
2019-11-15T16:44:36.000Z
2019-11-15T16:44:36.000Z
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
null
null
null
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function from .common import Benchmark import numpy as np class Histogram1D(Benchmark): def setup(self): self.d = np.linspace(0, 100, 100000) def time_full_coverage(self): np.histogram(self.d, 200, (0, 100)) def time_small_coverag...
27.248276
95
0.578208
from __future__ import absolute_import, division, print_function from .common import Benchmark import numpy as np class Histogram1D(Benchmark): def setup(self): self.d = np.linspace(0, 100, 100000) def time_full_coverage(self): np.histogram(self.d, 200, (0, 100)) def time_small_coverag...
true
true
f730c073a0c4b6559a2cfcc7ed69427ce1242339
836
py
Python
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
null
null
null
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
3
2020-04-17T05:24:06.000Z
2022-02-10T09:00:22.000Z
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
null
null
null
import unittest from clayful.exception import ClayfulException class ClayfulExceptionTest(unittest.TestCase): def test_clayful_error_constructor(self): error = ClayfulException( 'Brand', 'get', 400, {}, 'g-no-model', 'my message', {} ) self.assertEqual(error.is_clayful, True) self.asse...
19.44186
47
0.679426
import unittest from clayful.exception import ClayfulException class ClayfulExceptionTest(unittest.TestCase): def test_clayful_error_constructor(self): error = ClayfulException( 'Brand', 'get', 400, {}, 'g-no-model', 'my message', {} ) self.assertEqual(error.is_clayful, True) self.asse...
true
true
f730c0c1c337facbe3bca9654deb29a5694579fe
618
py
Python
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
357
2019-01-23T23:54:30.000Z
2022-03-31T05:32:25.000Z
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
65
2019-02-06T15:35:35.000Z
2022-03-25T09:56:48.000Z
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
164
2019-02-06T15:05:57.000Z
2022-03-31T11:48:14.000Z
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel Corporation # # 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 app...
29.428571
74
0.737864
true
true
f730c12f66e371e778dfd8bfc1d9044399d1afe0
74,951
py
Python
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.878146
119
0.649611
from knack.prompting import NoTTYException, prompt, prompt_pass from knack.log import get_logger from typing import Any, List, Dict, Tuple, Union from azure.cli.core import AzCommandsLoader from azure.cli.core.azclierror import ( CLIInternalError, MutuallyExclusiveArgumentError, RequiredArgumentMissingErr...
true
true
f730c134a28f77e3c847ee825ab9c72a1458d0e4
3,102
py
Python
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
andrewtarzia/stk
1ac2ecbb5c9940fe49ce04cbf5603fd7538c475a
[ "MIT" ]
21
2018-04-12T16:25:24.000Z
2022-02-14T23:05:43.000Z
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
JelfsMaterialsGroup/stk
0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2
[ "MIT" ]
8
2019-03-19T12:36:36.000Z
2020-11-11T12:46:00.000Z
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
supramolecular-toolkit/stk
0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2
[ "MIT" ]
5
2018-08-07T13:00:16.000Z
2021-11-01T00:55:10.000Z
""" Collapser ========= """ from .optimizer import Optimizer from .utilities import get_mch_bonds, get_long_bond_ids, get_subunits import mchammer as mch class Collapser(Optimizer): """ Performs rigid-body collapse of molecules [1]_. Examples -------- *Structure Optimization* Using :class...
28.722222
69
0.604449
from .optimizer import Optimizer from .utilities import get_mch_bonds, get_long_bond_ids, get_subunits import mchammer as mch class Collapser(Optimizer): def __init__( self, step_size=0.1, distance_threshold=1.5, scale_steps=True, ): self._optimizer = mch.Collapser(...
true
true
f730c1eb989c9c84f7652a96a8ab7e841c0ef149
339
py
Python
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
null
null
null
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
null
null
null
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
3
2020-10-24T14:36:14.000Z
2020-10-24T14:41:13.000Z
import cv2 # frame per second cap = cv2.VideoCapture(0,cv2.CAP_DSHOW) while True: ret,frame = cap.read() frame[200:250,200:250] = frame[100:150,100:150] frame[100:150,100:150] = [255,255,255] cv2.imshow("ilkresim",frame) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2....
18.833333
51
0.637168
import cv2 cap = cv2.VideoCapture(0,cv2.CAP_DSHOW) while True: ret,frame = cap.read() frame[200:250,200:250] = frame[100:150,100:150] frame[100:150,100:150] = [255,255,255] cv2.imshow("ilkresim",frame) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2.destroyAllWindows()
true
true
f730c2199ac56dcd1e8d9c7c1237e1e4ccc3fe0f
6,446
py
Python
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
1
2021-01-21T03:44:59.000Z
2021-01-21T03:44:59.000Z
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
null
null
null
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( 'войти', 'монета', 'вскинуть', 'желание', 'экзамен', 'налоговый', 'вытаскивать', 'приятель', 'вздрагивать', 'куча', 'порт', 'точно', 'заплак...
70.835165
80
0.579429
from __future__ import unicode_literals from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( 'войти', 'монета', 'вскинуть', 'желание', 'экзамен', 'налоговый', 'вытаскивать', 'приятель', 'вздрагивать', 'куча', 'порт', 'точно', 'заплакать', 'изба', 'правление...
true
true
f730c23f0da51300b98e1b1ee705c0aa5cefff70
1,034
py
Python
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
import scrapy from scrapy.loader import ItemLoader from tiki.items import TiviItem class TikiSpider(scrapy.Spider): # crawl from tiki name = "tiki" allowed_domains = ["tiki.vn"] start_urls = {"https://tiki.vn/tivi/c5015"} def parse(self, response): tks = response.css('div.product-item') for tk in tks: l...
27.210526
53
0.679884
import scrapy from scrapy.loader import ItemLoader from tiki.items import TiviItem class TikiSpider(scrapy.Spider): name = "tiki" allowed_domains = ["tiki.vn"] start_urls = {"https://tiki.vn/tivi/c5015"} def parse(self, response): tks = response.css('div.product-item') for tk in tks: loader = ItemLoader...
true
true
f730c43933f5c965f1163cbe92ea2e00c357ef48
115
py
Python
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
3
2015-12-22T09:04:44.000Z
2017-10-18T15:26:03.000Z
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
from v1 import artifact as art1 from v2 import artifact as art2 MY_ARTIFACT = [art1.MyArtifact, art2.MyArtifact]
19.166667
48
0.791304
from v1 import artifact as art1 from v2 import artifact as art2 MY_ARTIFACT = [art1.MyArtifact, art2.MyArtifact]
true
true
f730c5d7592773f3e022c3b161473f2b1d4a7b40
9,591
py
Python
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
14
2018-09-25T20:35:25.000Z
2021-07-14T04:30:54.000Z
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
32
2018-10-09T04:13:42.000Z
2020-05-11T07:20:28.000Z
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
11
2018-10-09T00:14:53.000Z
2021-11-03T10:54:09.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
29.151976
97
0.607966
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_system_arp_table short_description: Configure ARP ...
true
true
f730c69d6e5ae3c5d5a6129b26bdaf4232dd5224
161
py
Python
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
import time import RPi.GPIO as IO PIN = 4 IO.setmode(IO.BCM) IO.setup(PIN, IO.OUT) IO.output(PIN, IO.HIGH) time.sleep(15) IO.output(PIN, IO.LOW) IO.cleanup()
12.384615
23
0.701863
import time import RPi.GPIO as IO PIN = 4 IO.setmode(IO.BCM) IO.setup(PIN, IO.OUT) IO.output(PIN, IO.HIGH) time.sleep(15) IO.output(PIN, IO.LOW) IO.cleanup()
true
true
f730c70d8ffa1539142454cd5cf5157d8a5a5d00
226
py
Python
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
6
2016-04-26T18:39:36.000Z
2021-09-01T09:13:38.000Z
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
null
null
null
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
4
2016-04-10T23:47:23.000Z
2021-08-15T11:40:28.000Z
from historia.utils.id import unique_id from historia.utils.color import random_country_colors from historia.utils.store import Store from historia.utils.timer import Timer from historia.utils.trading import position_in_range
37.666667
54
0.867257
from historia.utils.id import unique_id from historia.utils.color import random_country_colors from historia.utils.store import Store from historia.utils.timer import Timer from historia.utils.trading import position_in_range
true
true