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
1c3fbdcd48e631b7ec93438b03f953b85ecdf799
32,297
py
Python
app/maingame.py
diegoag30/ScrabbleAr
e309b21ec60148b290c45f4edc6bf90d391d144a
[ "MIT" ]
3
2020-05-26T21:02:48.000Z
2020-08-06T03:19:54.000Z
app/maingame.py
diegoag30/ScrabbleAr
e309b21ec60148b290c45f4edc6bf90d391d144a
[ "MIT" ]
null
null
null
app/maingame.py
diegoag30/ScrabbleAr
e309b21ec60148b290c45f4edc6bf90d391d144a
[ "MIT" ]
null
null
null
import PySimpleGUI as sg import random from itertools import combinations import time import clasificarPalabra import IA import os.path import config_tablero from Bolsa import Bolsa from Configuracion import Configuracion from puntajes import Puntaje base_path=os.path.dirname(os.path.abspath(__file__)) ""...
37.467517
409
0.605319
import PySimpleGUI as sg import random from itertools import combinations import time import clasificarPalabra import IA import os.path import config_tablero from Bolsa import Bolsa from Configuracion import Configuracion from puntajes import Puntaje base_path=os.path.dirname(os.path.abspath(__file__)) de...
true
true
1c3fbdd86124ddfe35fa159c15df6eb261761d5d
1,153
py
Python
exercicios/PythonExercicios/ex059.py
Roberto-Sartore/Python
98f91f13cf78d761893c4a1f3264ed999244d32b
[ "MIT" ]
null
null
null
exercicios/PythonExercicios/ex059.py
Roberto-Sartore/Python
98f91f13cf78d761893c4a1f3264ed999244d32b
[ "MIT" ]
null
null
null
exercicios/PythonExercicios/ex059.py
Roberto-Sartore/Python
98f91f13cf78d761893c4a1f3264ed999244d32b
[ "MIT" ]
null
null
null
from time import sleep n1 = int(input('Primeiro número:')) n2 = int(input('Segundo número')) opcao = 0 while opcao != 5: print(''' [ 1 ] Somar [ 2 ] Multiplicar [ 3 ] Maior [ 4 ] Novos números [ 5 ] Sair do programa''') opcao = int(input('\033[33m Qual é a sua opção? \033[m')) if opcao ==...
29.564103
87
0.529055
from time import sleep n1 = int(input('Primeiro número:')) n2 = int(input('Segundo número')) opcao = 0 while opcao != 5: print(''' [ 1 ] Somar [ 2 ] Multiplicar [ 3 ] Maior [ 4 ] Novos números [ 5 ] Sair do programa''') opcao = int(input('\033[33m Qual é a sua opção? \033[m')) if opcao ==...
true
true
1c3fbf17afd7a87d138502f9050c796fa3c76392
7,032
py
Python
Va-Project/Modules/gomoku_game/Gomoku.py
AdamKatborgpy/Virtuel-assistent
df226c0a0bdeb345840ddc41ea1e91fd77380d6b
[ "MIT" ]
null
null
null
Va-Project/Modules/gomoku_game/Gomoku.py
AdamKatborgpy/Virtuel-assistent
df226c0a0bdeb345840ddc41ea1e91fd77380d6b
[ "MIT" ]
null
null
null
Va-Project/Modules/gomoku_game/Gomoku.py
AdamKatborgpy/Virtuel-assistent
df226c0a0bdeb345840ddc41ea1e91fd77380d6b
[ "MIT" ]
null
null
null
import pygame from pygame.locals import * # Define some colors BLACK = (0, 0, 0) WHITE = (245, 245, 245) RED = (133, 42, 44) YELLOW = (208, 176, 144) GREEN = (26, 81, 79) PLAYER = False # Define grid globals WIDTH = 20 MARGIN = 1 PADDING = 20 DOT = 4 BOARD = (WIDTH + MARGIN) * 14 + MARGIN GAME_WIDTH = BOARD + ...
32.555556
115
0.486775
import pygame from pygame.locals import * BLACK = (0, 0, 0) WHITE = (245, 245, 245) RED = (133, 42, 44) YELLOW = (208, 176, 144) GREEN = (26, 81, 79) PLAYER = False WIDTH = 20 MARGIN = 1 PADDING = 20 DOT = 4 BOARD = (WIDTH + MARGIN) * 14 + MARGIN GAME_WIDTH = BOARD + PADDING * 2 GAME_HIGHT = GAME_WIDTH + 100...
true
true
1c3fbf6ee31f65152d01042d7740ecb05064ff89
1,062
py
Python
turtlebot3_dqn/nodes/tf_broadcaster.py
2529342549/turtlebot3_m_learning
19fc961de8a993eafcd421186ad1c38473d04818
[ "Apache-2.0" ]
1
2022-02-21T02:02:11.000Z
2022-02-21T02:02:11.000Z
turtlebot3_dqn/nodes/tf_broadcaster.py
2529342549/turtlebot3_machine_learning
bdb8cc0fa0110269cd3573d3f78011c3e0201e09
[ "Apache-2.0" ]
null
null
null
turtlebot3_dqn/nodes/tf_broadcaster.py
2529342549/turtlebot3_machine_learning
bdb8cc0fa0110269cd3573d3f78011c3e0201e09
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #coding=utf-8 import rospy from geometry_msgs.msg import Twist, Pose from nav_msgs.msg import Odometry import tf def pose_callback(msg,robotname): br = tf.TransformBroadcaster() #将坐标变换广播出去 #向/tf发布消息 tb3_0距离原点的坐标x ,y ,平移 br.sendTransform((msg.pose.pose.po...
37.928571
173
0.594162
import rospy from geometry_msgs.msg import Twist, Pose from nav_msgs.msg import Odometry import tf def pose_callback(msg,robotname): br = tf.TransformBroadcaster() br.sendTransform((msg.pose.pose.position.x, msg.pose.pose.position.y, 0), (msg.pose.pose.orientation.x, msg.p...
true
true
1c3fc02ecf4ffdcde6d9493188d850afab605017
792
py
Python
solutions/Interview-04-er-wei-shu-zu-zhong-de-cha-zhao-lcof/04.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
12
2020-04-21T01:09:14.000Z
2022-01-13T08:42:03.000Z
solutions/Interview-04-er-wei-shu-zu-zhong-de-cha-zhao-lcof/04.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
null
null
null
solutions/Interview-04-er-wei-shu-zu-zhong-de-cha-zhao-lcof/04.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
4
2020-03-31T03:06:16.000Z
2021-07-06T07:27:44.000Z
from typing import List class Solution: def findNumberIn2DArray(self, matrix: List[List[int]], target: int) -> bool: # solution one: 暴力 # 特判 if matrix == []: return False n, m = len(matrix), len(matrix[0]) for i in range(n): for j in range(m)...
27.310345
80
0.433081
from typing import List class Solution: def findNumberIn2DArray(self, matrix: List[List[int]], target: int) -> bool: if matrix == []: return False n, m = len(matrix), len(matrix[0]) for i in range(n): for j in range(m): if m...
true
true
1c3fc10050896dd77684b430b69808c0479ca325
234
py
Python
Capstone Two/setup.py
shalin4788/Springboard-Do-not-refer-
e7627e6f4b09456e08c6f10baeb66b0a22422b7a
[ "MIT" ]
2
2020-10-23T06:24:18.000Z
2020-10-23T06:24:25.000Z
Capstone Two/setup.py
shalin4788/Springboard-Do-not-refer-
e7627e6f4b09456e08c6f10baeb66b0a22422b7a
[ "MIT" ]
5
2021-06-08T22:56:21.000Z
2022-01-13T03:35:07.000Z
Capstone Two/setup.py
shalin4788/Springboard
e7627e6f4b09456e08c6f10baeb66b0a22422b7a
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Quora insincere data classification', author='Shalin Gosalia', license='MIT', )
21.272727
55
0.653846
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Quora insincere data classification', author='Shalin Gosalia', license='MIT', )
true
true
1c3fc2ea92b55d79bb3978373317cc25b7fa52ed
636
py
Python
sdeux/utils/alparser.py
ngost/alpes_laser_s2_custom
c2ef808998485e147d32b951bfd8350a4d32be2d
[ "MIT" ]
null
null
null
sdeux/utils/alparser.py
ngost/alpes_laser_s2_custom
c2ef808998485e147d32b951bfd8350a4d32be2d
[ "MIT" ]
null
null
null
sdeux/utils/alparser.py
ngost/alpes_laser_s2_custom
c2ef808998485e147d32b951bfd8350a4d32be2d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on September 01, 2015 Copyright Alpes Lasers SA, Neuchatel, Switzerland, 2015 @author: chiesa """ import argparse import logging logger = logging.getLogger(__name__) _version = 'undefined' try: from sdeux import pkg, version _version = '{} {}'.format(pkg, version) exce...
20.516129
75
0.690252
import argparse import logging logger = logging.getLogger(__name__) _version = 'undefined' try: from sdeux import pkg, version _version = '{} {}'.format(pkg, version) except Exception as e: logger.debug(e, exc_info=1) baseparser = argparse.ArgumentParser(add_help=False) baseparser.add_argument("--sh...
true
true
1c3fc3cbd94a9a36a1c0614624ab4f2519ffad6c
5,048
py
Python
tempo/seldon/k8s.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
null
null
null
tempo/seldon/k8s.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
null
null
null
tempo/seldon/k8s.py
majolo/tempo
516b7df0beaf36d69366e8e759ce00a362225278
[ "Apache-2.0" ]
null
null
null
import json import time from typing import Optional, Sequence import yaml from kubernetes import client from kubernetes.client.rest import ApiException from tempo.k8s.constants import TempoK8sLabel, TempoK8sModelSpecAnnotation from tempo.k8s.utils import create_k8s_client from tempo.seldon.endpoint import Endpoint fr...
36.57971
93
0.612916
import json import time from typing import Optional, Sequence import yaml from kubernetes import client from kubernetes.client.rest import ApiException from tempo.k8s.constants import TempoK8sLabel, TempoK8sModelSpecAnnotation from tempo.k8s.utils import create_k8s_client from tempo.seldon.endpoint import Endpoint fr...
true
true
1c3fc41e856187a3e2fe1ff0df604b7b87395070
1,702
py
Python
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SetDefaultRegistrantProfileRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SetDefaultRegistrantProfileRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SetDefaultRegistrantProfileRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.681818
83
0.780846
from aliyunsdkcore.request import RpcRequest from aliyunsdkdomain.endpoint import endpoint_data class SetDefaultRegistrantProfileRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Domain', '2018-01-29', 'SetDefaultRegistrantProfile') self.set_method('POST') if hasattr(self,...
true
true
1c3fc5d94d81003b54cea11a1d4e28a8b570d730
3,142
py
Python
src/midi_board/controls/encoder_button.py
lkt23/midi_board
543fd5d6abf915990a6d3bc2df061066006427f4
[ "MIT" ]
null
null
null
src/midi_board/controls/encoder_button.py
lkt23/midi_board
543fd5d6abf915990a6d3bc2df061066006427f4
[ "MIT" ]
null
null
null
src/midi_board/controls/encoder_button.py
lkt23/midi_board
543fd5d6abf915990a6d3bc2df061066006427f4
[ "MIT" ]
null
null
null
"""Encoder Controls for a MIDI controller.""" from midi_board.adapters.adapter import Adapter from midi_board.controls.button import Button from midi_board.controls.encoder import Encoder from midi_board import midi_utility class EncoderButton(Encoder, Button, Adapter): """An Encoder with Button control.""" ...
37.404762
112
0.674093
from midi_board.adapters.adapter import Adapter from midi_board.controls.button import Button from midi_board.controls.encoder import Encoder from midi_board import midi_utility class EncoderButton(Encoder, Button, Adapter): DEFAULT_NAME = 'encoder' DEFAULT_DESCRIPTION = 'An encoder with a button.' def...
true
true
1c3fc6593cca9bc77e3e6c6e5426fc6faf71bb6d
9,802
py
Python
networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_nexus_restapi_events_vxlan.py
Tehsmash/networking-cisco
fdbd79a832fe090f3c4c7bd7a4f0ec0c349d4d16
[ "Apache-2.0" ]
1
2019-01-19T09:12:49.000Z
2019-01-19T09:12:49.000Z
networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_nexus_restapi_events_vxlan.py
Tehsmash/networking-cisco
fdbd79a832fe090f3c4c7bd7a4f0ec0c349d4d16
[ "Apache-2.0" ]
null
null
null
networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_nexus_restapi_events_vxlan.py
Tehsmash/networking-cisco
fdbd79a832fe090f3c4c7bd7a4f0ec0c349d4d16
[ "Apache-2.0" ]
null
null
null
#Copyright (c) 2017 Cisco Systems, 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 applica...
33.568493
77
0.55254
from oslo_config import cfg from networking_cisco.plugins.ml2.drivers.cisco.nexus import ( nexus_restapi_snippets as snipp) from networking_cisco.tests.unit.ml2.drivers.cisco.nexus import ( test_cisco_nexus_base as base) from networking_cisco.tests.unit.ml2.drivers.cisco.nexus import ( t...
true
true
1c3fc6d400a17416500d72929da933f471a600f7
10,616
py
Python
segment_level/scripts/split_gismo_alignment_into_blocks.py
gtonkinhill/falciparum_transcriptome_manuscript
e7a9d33715264c741abfee77253e2244f5a8d91a
[ "MIT" ]
null
null
null
segment_level/scripts/split_gismo_alignment_into_blocks.py
gtonkinhill/falciparum_transcriptome_manuscript
e7a9d33715264c741abfee77253e2244f5a8d91a
[ "MIT" ]
null
null
null
segment_level/scripts/split_gismo_alignment_into_blocks.py
gtonkinhill/falciparum_transcriptome_manuscript
e7a9d33715264c741abfee77253e2244f5a8d91a
[ "MIT" ]
1
2020-12-10T13:56:42.000Z
2020-12-10T13:56:42.000Z
import sys,os import argparse from subprocess import check_call # from mungo.fasta import FastaReader import re import numpy as np from collections import defaultdict from itertools import groupby from mungo.sequence import sixFrameTranslation ACCEPTABLE_SYMBOLS = ['*', '-', 'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K'...
28.537634
131
0.643463
import sys,os import argparse from subprocess import check_call import re import numpy as np from collections import defaultdict from itertools import groupby from mungo.sequence import sixFrameTranslation ACCEPTABLE_SYMBOLS = ['*', '-', 'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', ...
false
true
1c3fca1f69d79f498cd13753a85b2fc3f0428449
1,309
py
Python
app/core/tests/test_admin.py
idy-3/recipe-rest-api
4ed1db6bda54232c3f0506ece5606fe00fb2eb7b
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
idy-3/recipe-rest-api
4ed1db6bda54232c3f0506ece5606fe00fb2eb7b
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
idy-3/recipe-rest-api
4ed1db6bda54232c3f0506ece5606fe00fb2eb7b
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@idudoh.com', ...
31.166667
68
0.638655
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@idudoh.com', ...
true
true
1c3fcac8dd4a1ba0496ef013bd4eb468a0075125
701
py
Python
benchmark/fluid/models/__init__.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
9
2017-12-04T02:58:01.000Z
2020-12-03T14:46:30.000Z
benchmark/fluid/models/__init__.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
7
2017-12-05T20:29:08.000Z
2018-10-15T08:57:40.000Z
benchmark/fluid/models/__init__.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
6
2018-03-19T22:38:46.000Z
2019-11-01T22:28:27.000Z
# Copyright (c) 2018 PaddlePaddle 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 appli...
38.944444
75
0.750357
__all__ = [ "machine_translation", "resnet", "vgg", "mnist", "stacked_dynamic_lstm" ]
true
true
1c3fcae299c5564f70363317bc35a332a100318c
9,126
py
Python
hgvs/intervalmapper.py
andreas-invitae/hgvs
5291f1a4fb1991c6da2d004b0e5ad6bf70bbeb64
[ "Apache-2.0" ]
177
2017-03-12T12:49:52.000Z
2022-03-19T10:55:08.000Z
hgvs/intervalmapper.py
andreas-invitae/hgvs
5291f1a4fb1991c6da2d004b0e5ad6bf70bbeb64
[ "Apache-2.0" ]
244
2017-03-10T22:53:09.000Z
2022-02-03T09:25:18.000Z
hgvs/intervalmapper.py
andreas-invitae/hgvs
5291f1a4fb1991c6da2d004b0e5ad6bf70bbeb64
[ "Apache-2.0" ]
77
2017-03-12T08:51:34.000Z
2022-02-09T21:56:12.000Z
# -*- coding: utf-8 -*- """ Mapping intervals between pairs of congruent segments The IntervalMapper class is at the heart of mapping between aligned sequences. An instance of :class:`uta.tools.intervalmapper.IntervalMapper` is constructed with an ordered list of :class:`uta.tools.intervalmapper.IntervalPair` instanc...
39.336207
102
0.641026
from __future__ import absolute_import, division, print_function, unicode_literals import logging import re from hgvs.exceptions import HGVSInvalidIntervalError from six.moves import range _logger = logging.getLogger(__name__) _logger.warning("This module is deprecated and will be removed in a future release") ...
true
true
1c3fcb5770492394a9cb08febb1f7816ab936f00
2,564
py
Python
src/gausskernel/dbmind/tools/anomaly_detection/detector/algorithm/fb_prophet.py
Yanci0/openGauss-server
b2ff10be1367c77f2fda396d6c12ffa3c25874c7
[ "MulanPSL-1.0" ]
360
2020-06-30T14:47:34.000Z
2022-03-31T15:21:53.000Z
src/gausskernel/dbmind/tools/anomaly_detection/detector/algorithm/fb_prophet.py
Yanci0/openGauss-server
b2ff10be1367c77f2fda396d6c12ffa3c25874c7
[ "MulanPSL-1.0" ]
4
2020-06-30T15:09:16.000Z
2020-07-14T06:20:03.000Z
src/gausskernel/dbmind/tools/anomaly_detection/detector/algorithm/fb_prophet.py
futurewei-cloud/chogori-opengauss
f43410e1643c887819e718d9baceb9e853ad9574
[ "MulanPSL-1.0" ]
133
2020-06-30T14:47:36.000Z
2022-03-25T15:29:00.000Z
""" Copyright (c) 2020 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WI...
35.123288
101
0.618175
import pickle import time import pandas as pd from fbprophet import Prophet from .model import AlgModel class FbProphet(AlgModel): def __init__(self): AlgModel.__init__(self) self.model = None self.train_length = 0 def fit(self, timeseries): timeseries = pd.DataFrame(timese...
true
true
1c3fcc29c72899455097c9c023a835636dff2790
5,578
py
Python
Flask/loginRadius-flask-auth/models.py
FuzzySid/engineering-blog-samples
7521cb1ea6d4300a91142c9e30f09fbcebcf8a1e
[ "MIT" ]
null
null
null
Flask/loginRadius-flask-auth/models.py
FuzzySid/engineering-blog-samples
7521cb1ea6d4300a91142c9e30f09fbcebcf8a1e
[ "MIT" ]
null
null
null
Flask/loginRadius-flask-auth/models.py
FuzzySid/engineering-blog-samples
7521cb1ea6d4300a91142c9e30f09fbcebcf8a1e
[ "MIT" ]
null
null
null
"""Application Models""" import bson, os from dotenv import load_dotenv from pymongo import MongoClient from werkzeug.security import generate_password_hash, check_password_hash load_dotenv() DATABASE_URL=os.environ.get('DATABASE_URL') or 'mongodb://localhost:27017/myDatabase' print(DATABASE_URL) client = MongoClient...
30.648352
95
0.551811
import bson, os from dotenv import load_dotenv from pymongo import MongoClient from werkzeug.security import generate_password_hash, check_password_hash load_dotenv() DATABASE_URL=os.environ.get('DATABASE_URL') or 'mongodb://localhost:27017/myDatabase' print(DATABASE_URL) client = MongoClient(DATABASE_URL) db = clien...
true
true
1c3fcd04aa5e14487e10c1c7db1afd19a1e6a7ab
4,981
py
Python
steg/DCT.py
tkadur/PennApps-XV
1998ed1e3857dc8a6d315173438b58eebb2e2494
[ "MIT" ]
null
null
null
steg/DCT.py
tkadur/PennApps-XV
1998ed1e3857dc8a6d315173438b58eebb2e2494
[ "MIT" ]
null
null
null
steg/DCT.py
tkadur/PennApps-XV
1998ed1e3857dc8a6d315173438b58eebb2e2494
[ "MIT" ]
null
null
null
import math from util import create_array class DCT(object): N = 8 QUALITY = 80 QUANTUM_LUMINANCE = [ 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35...
35.834532
117
0.47099
import math from util import create_array class DCT(object): N = 8 QUALITY = 80 QUANTUM_LUMINANCE = [ 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35...
false
true
1c3fcf849432b6cafa426068d55a77e03aa4e69b
1,747
py
Python
dependencies/FontTools/Lib/fontTools/pens/reportLabPen.py
charlesmchen/typefacet
8c6db26d0c599ece16f3704696811275120a4044
[ "Apache-2.0" ]
21
2015-01-16T05:10:02.000Z
2021-06-11T20:48:15.000Z
dependencies/FontTools/Lib/fontTools/pens/reportLabPen.py
charlesmchen/typefacet
8c6db26d0c599ece16f3704696811275120a4044
[ "Apache-2.0" ]
1
2019-09-09T12:10:27.000Z
2020-05-22T10:12:14.000Z
dependencies/FontTools/Lib/fontTools/pens/reportLabPen.py
charlesmchen/typefacet
8c6db26d0c599ece16f3704696811275120a4044
[ "Apache-2.0" ]
2
2015-05-03T04:51:08.000Z
2018-08-24T08:28:53.000Z
from fontTools.pens.basePen import BasePen class ReportLabPen(BasePen): """A pen for drawing onto a reportlab.graphics.shapes.Path object.""" def __init__(self, glyphSet, path=None): BasePen.__init__(self, glyphSet) if path is None: from reportlab.graphics.shapes import Path path = Path() self.path = ...
26.074627
85
0.702919
from fontTools.pens.basePen import BasePen class ReportLabPen(BasePen): """A pen for drawing onto a reportlab.graphics.shapes.Path object.""" def __init__(self, glyphSet, path=None): BasePen.__init__(self, glyphSet) if path is None: from reportlab.graphics.shapes import Path path = Path() self.path = ...
false
true
1c3fd02c8d60b07aa813e5e6f9443d79434be0ec
29,654
py
Python
python/neuroglancer/tool/screenshot.py
janelia-cosem/neuroglancer
add6885da32498a1cfd1075a4c19aae8ffb5a6f2
[ "Apache-2.0" ]
755
2016-06-06T13:56:32.000Z
2022-03-31T14:48:19.000Z
python/neuroglancer/tool/screenshot.py
janelia-cosem/neuroglancer
add6885da32498a1cfd1075a4c19aae8ffb5a6f2
[ "Apache-2.0" ]
331
2016-06-07T22:06:43.000Z
2022-03-24T21:48:51.000Z
python/neuroglancer/tool/screenshot.py
janelia-cosem/neuroglancer
add6885da32498a1cfd1075a4c19aae8ffb5a6f2
[ "Apache-2.0" ]
240
2016-06-07T00:56:43.000Z
2022-03-31T21:10:50.000Z
#!/usr/bin/env python # @license # Copyright 2020 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
41.707454
399
0.634956
import argparse import collections import contextlib import copy import datetime import itertools import numbers import os import threading import time from typing import NamedTuple, Tuple, Callable, Iterator, List, Optional import PIL import numpy as np import neuroglancer import neuroglancer.cli impo...
true
true
1c3fd089676e66f279943ebbb8aa269ae5ba3497
1,343
py
Python
demo/dcgan_v3_generate.py
hircumg/keras-text-to-image
365cf61075b04e9a98f69d471f0efd8b7e0adb6f
[ "MIT" ]
null
null
null
demo/dcgan_v3_generate.py
hircumg/keras-text-to-image
365cf61075b04e9a98f69d471f0efd8b7e0adb6f
[ "MIT" ]
null
null
null
demo/dcgan_v3_generate.py
hircumg/keras-text-to-image
365cf61075b04e9a98f69d471f0efd8b7e0adb6f
[ "MIT" ]
null
null
null
import os import sys import numpy as np from random import shuffle def main(): seed = 42 np.random.seed(seed) current_dir = os.path.dirname(__file__) sys.path.append(os.path.join(current_dir, '..')) current_dir = current_dir if current_dir is not '' else '.' img_dir_path = current_dir + '/da...
29.844444
128
0.699181
import os import sys import numpy as np from random import shuffle def main(): seed = 42 np.random.seed(seed) current_dir = os.path.dirname(__file__) sys.path.append(os.path.join(current_dir, '..')) current_dir = current_dir if current_dir is not '' else '.' img_dir_path = current_dir + '/da...
true
true
1c3fd17fd284852ba7aeedaa87ca07e74fdd23e5
32,578
py
Python
python/paddle/fluid/tests/unittests/test_optimizer.py
frankwhzhang/Paddle
131b1dc3240e53ea295cc49323bb2a7e7dcc717f
[ "Apache-2.0" ]
1
2020-11-03T04:57:40.000Z
2020-11-03T04:57:40.000Z
python/paddle/fluid/tests/unittests/test_optimizer.py
frankwhzhang/Paddle
131b1dc3240e53ea295cc49323bb2a7e7dcc717f
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_optimizer.py
frankwhzhang/Paddle
131b1dc3240e53ea295cc49323bb2a7e7dcc717f
[ "Apache-2.0" ]
4
2019-09-30T02:15:34.000Z
2019-09-30T02:41:30.000Z
# Copyright (c) 2018 PaddlePaddle 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 app...
42.474576
80
0.610228
from __future__ import print_function import unittest import paddle.fluid.framework as framework import paddle.fluid.optimizer as optimizer import paddle.compat as cpt from paddle.fluid.backward import append_backward class TestOptimizer(unittest.TestCase): def test_sgd_optimizer(self): de...
true
true
1c3fd18d95dde9b8c931da1988561fbe274ebc18
14,247
py
Python
tests/function/test_simple.py
klmitch/micropath
3de7f3d3da59dea802b502ebc71ec5e139e25e1f
[ "Apache-2.0" ]
1
2018-06-07T22:17:14.000Z
2018-06-07T22:17:14.000Z
tests/function/test_simple.py
klmitch/micropath
3de7f3d3da59dea802b502ebc71ec5e139e25e1f
[ "Apache-2.0" ]
null
null
null
tests/function/test_simple.py
klmitch/micropath
3de7f3d3da59dea802b502ebc71ec5e139e25e1f
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 by Kevin L. Mitchell <klmitch@mit.edu> # # 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...
30.184322
77
0.610865
import micropath from tests.function import utils class BookController(micropath.Controller): @micropath.route('get') def index(self, request, sub_id=None): return 'book::index(sub_id=%s)' % utils.safestr(sub_id) @micropath.route('post') def create(self, request, sub_id=None): ...
true
true
1c3fd1a1d43154bc61a1a422c1177bc1c1c2e413
424
py
Python
library_member/__manifest__.py
jhonaelramos/Odoo-14-Development-Essentials
52d1317c67b629233f5e246105d452018ae01700
[ "MIT" ]
8
2020-06-29T15:23:01.000Z
2021-11-08T13:10:50.000Z
library_member/__manifest__.py
jhonaelramos/Odoo-14-Development-Essentials
52d1317c67b629233f5e246105d452018ae01700
[ "MIT" ]
null
null
null
library_member/__manifest__.py
jhonaelramos/Odoo-14-Development-Essentials
52d1317c67b629233f5e246105d452018ae01700
[ "MIT" ]
11
2020-08-31T13:39:00.000Z
2021-11-06T13:05:07.000Z
{ "name": "Library Members", "description": "Manage members borrowing books.", "author": "Daniel Reis", "depends": ["library_app", "mail"], "application": False, "data": [ "security/library_security.xml", "security/ir.model.access.csv", "views/book_view.xml", "vie...
26.5
53
0.582547
{ "name": "Library Members", "description": "Manage members borrowing books.", "author": "Daniel Reis", "depends": ["library_app", "mail"], "application": False, "data": [ "security/library_security.xml", "security/ir.model.access.csv", "views/book_view.xml", "vie...
true
true
1c3fd2c55334fd038f3412b030377b167a93d36d
1,037
py
Python
Django/DjangoT3.2_LTS/06 Pagination dan queryset pada ListView/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT3.2_LTS/06 Pagination dan queryset pada ListView/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT3.2_LTS/06 Pagination dan queryset pada ListView/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic import ListView from .models import Artikel # Create your views here. class ArtikelListView(ListView): model = Artikel # urut berdasarkan ordering = ["judul"] # membagi halaman paginate_by = 2 extra_context = { "judul": "Bl...
24.690476
56
0.577628
from django.shortcuts import render from django.views.generic import ListView from .models import Artikel class ArtikelListView(ListView): model = Artikel ordering = ["judul"] paginate_by = 2 extra_context = { "judul": "Blog List", } def get_queryset(self): if self...
true
true
1c3fd34730bf6106bb035873310bd6717278ea53
3,724
py
Python
server/migrations/versions/5e634fc119ae_.py
TheKnarf/proost-app
7b7b9a20d6a9ca51424421e62765c7c26e4c4b78
[ "Apache-2.0" ]
6
2019-11-20T17:25:09.000Z
2019-12-06T11:07:21.000Z
server/migrations/versions/5e634fc119ae_.py
TheKnarf/proost-app
7b7b9a20d6a9ca51424421e62765c7c26e4c4b78
[ "Apache-2.0" ]
6
2019-12-10T18:26:51.000Z
2021-10-06T07:40:51.000Z
server/migrations/versions/5e634fc119ae_.py
itso-io/aika
86f333edcd3ad2d3125cbbd6c9f37764c8e05848
[ "Unlicense" ]
1
2019-12-06T11:08:57.000Z
2019-12-06T11:08:57.000Z
"""empty message Revision ID: 5e634fc119ae Revises: 3368ac633bb4 Create Date: 2019-10-09 21:52:05.255230 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '5e634fc119ae' down_revision = '3368ac633bb4' branch_labels = None depe...
40.478261
138
0.707304
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql revision = '5e634fc119ae' down_revision = '3368ac633bb4' branch_labels = None depends_on = None def upgrade(engine_name): globals()["upgrade_%s" % engine_name]() def downgrade(engine_name): globals()["downgrade_%s" % engi...
true
true
1c3fd38688bd2384d0ceb47363edfc9a526b2e63
2,883
py
Python
classy/migrations/0018_auto_20180306_1051.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
classy/migrations/0018_auto_20180306_1051.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
classy/migrations/0018_auto_20180306_1051.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.1 on 2018-03-06 18:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('classy', '0017_classification_review_classy_id'), ] operations = [ migrations.AlterField( model_name='classification', ...
33.917647
133
0.57232
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('classy', '0017_classification_review_classy_id'), ] operations = [ migrations.AlterField( model_name='classification', name='column_name', field=models...
true
true
1c3fd3b3cd4e5e6f759361f63f2b7ee6e61e7c88
13,290
py
Python
simpletransformers/experimental/classification/classification_utils.py
kinoute/simpletransformers
c14d01c8011cbdbf51996f07fc2fbe3d3c433f46
[ "Apache-2.0" ]
4
2020-03-06T00:03:22.000Z
2021-01-21T14:07:25.000Z
simpletransformers/experimental/classification/classification_utils.py
kinoute/simpletransformers
c14d01c8011cbdbf51996f07fc2fbe3d3c433f46
[ "Apache-2.0" ]
4
2019-12-24T10:55:32.000Z
2020-03-27T02:19:07.000Z
simpletransformers/experimental/classification/classification_utils.py
kinoute/simpletransformers
c14d01c8011cbdbf51996f07fc2fbe3d3c433f46
[ "Apache-2.0" ]
1
2021-01-21T14:36:55.000Z
2021-01-21T14:36:55.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 License. # You may obtain a cop...
40.03012
229
0.666441
from __future__ import absolute_import, division, print_function import os import sys import csv import logging from io import open from multiprocessing import Pool, cpu_count from tqdm.auto import tqdm from scipy.stats import pearsonr, spearmanr from sklearn.metrics import matthews_corrcoef, f1_scor...
true
true
1c3fd450d13f394c1939457f17417a0da2f33a35
12,127
py
Python
z.mine/test/ExpTestTrainedModel.py
hunsooni/sumo-rl
92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc
[ "MIT" ]
null
null
null
z.mine/test/ExpTestTrainedModel.py
hunsooni/sumo-rl
92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc
[ "MIT" ]
null
null
null
z.mine/test/ExpTestTrainedModel.py
hunsooni/sumo-rl
92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc
[ "MIT" ]
null
null
null
# from https://github.com/ray-project/ray/blob/master/rllib/examples/custom_keras_model.py import argparse import os import ray from ray import tune from ray.rllib.agents.dqn.distributional_q_tf_model import DistributionalQTFModel from ray.rllib.models import ModelCatalog from ray.rllib.models.tf.misc import normc_in...
35.049133
125
0.681372
import argparse import os import ray from ray import tune from ray.rllib.agents.dqn.distributional_q_tf_model import DistributionalQTFModel from ray.rllib.models import ModelCatalog from ray.rllib.models.tf.misc import normc_initializer from ray.rllib.models.tf.tf_modelv2 import TFModelV2 from ray.rllib.policy.poli...
true
true
1c3fd582b6c3eb660989a7e8560f197c75a80c2b
396
py
Python
app/article/migrations/0018_auto_20200601_1120.py
nabechin/article
63bbaaaa9c194cc259456c46d8c3ccd0f8ee10c1
[ "MIT" ]
null
null
null
app/article/migrations/0018_auto_20200601_1120.py
nabechin/article
63bbaaaa9c194cc259456c46d8c3ccd0f8ee10c1
[ "MIT" ]
9
2020-07-09T15:29:48.000Z
2020-07-29T13:05:30.000Z
app/article/migrations/0018_auto_20200601_1120.py
nabechin/article
63bbaaaa9c194cc259456c46d8c3ccd0f8ee10c1
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-06-01 11:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('article', '0017_comment_user'), ] operations = [ migrations.AlterField( model_name='comment', name='content', ...
20.842105
63
0.60101
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('article', '0017_comment_user'), ] operations = [ migrations.AlterField( model_name='comment', name='content', field=models.TextField(blank=True, max_le...
true
true
1c3fd5d5fc441b45465cee3727a99a6456d08b0b
5,309
py
Python
horovod/runner/common/util/hosts.py
zarzen/horovod
d3c93d7b97c6158f003dad9aa377fe2bbf194e38
[ "Apache-2.0" ]
7,676
2019-02-12T02:57:22.000Z
2022-03-31T21:05:40.000Z
horovod/runner/common/util/hosts.py
zarzen/horovod
d3c93d7b97c6158f003dad9aa377fe2bbf194e38
[ "Apache-2.0" ]
2,431
2019-02-12T01:34:21.000Z
2022-03-31T21:43:38.000Z
horovod/runner/common/util/hosts.py
zarzen/horovod
d3c93d7b97c6158f003dad9aa377fe2bbf194e38
[ "Apache-2.0" ]
1,557
2019-02-12T07:52:15.000Z
2022-03-31T21:05:43.000Z
# Copyright 2019 Uber Technologies, 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 applica...
34.032051
97
0.618761
import collections import re from dataclasses import dataclass class HostInfo: def __init__(self, hostname, slots): self.hostname = hostname self.slots = slots @staticmethod def from_string(host_string): hostname, slots = host_string.strip().split(':') retu...
true
true
1c3fd60d60e1b548ab64d419546139d32861b974
1,150
py
Python
libs/ExtractLocation.py
douglask3/UKESM_albedo_tile_optimization
6f9d39c6fae7d671bf5e455a871ea48cda512aab
[ "BSD-3-Clause" ]
1
2019-10-09T11:57:31.000Z
2019-10-09T11:57:31.000Z
libs/ExtractLocation.py
douglask3/UKESM-ConFire
344b07b9f5c230dd3925a05b96a54d127e3dd39c
[ "BSD-3-Clause" ]
null
null
null
libs/ExtractLocation.py
douglask3/UKESM-ConFire
344b07b9f5c230dd3925a05b96a54d127e3dd39c
[ "BSD-3-Clause" ]
null
null
null
import iris from pdb import set_trace as browser class ExtractLocation(object): def __init__(self, cubes, west= None, east = None, south = None, north = None): self.lon = self.coordRange2List([west, east]) self.lat = self.coordRange2List([south, north]) def lonRange(cel...
38.333333
95
0.564348
import iris from pdb import set_trace as browser class ExtractLocation(object): def __init__(self, cubes, west= None, east = None, south = None, north = None): self.lon = self.coordRange2List([west, east]) self.lat = self.coordRange2List([south, north]) def lonRange(cel...
true
true
1c3fd64e6099747c37dee97de029d91872fabe84
155
py
Python
produtos/apps.py
SolutionUp/SolutionUP-System
4f341df1a51a43b350e626d47abd207a55edb94d
[ "MIT" ]
4
2021-08-30T01:45:46.000Z
2022-01-08T18:05:10.000Z
produtos/apps.py
DiskFar/DiskFar-System
dfd687e55cbca03118656d14761eb5de6c5a58a9
[ "MIT" ]
6
2021-08-29T03:26:48.000Z
2021-09-24T00:13:11.000Z
produtos/apps.py
DiskFar/DiskFar-System
dfd687e55cbca03118656d14761eb5de6c5a58a9
[ "MIT" ]
1
2021-08-16T21:21:34.000Z
2021-08-16T21:21:34.000Z
from django.apps import AppConfig class EstoqueProdutosConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'produtos'
22.142857
56
0.774194
from django.apps import AppConfig class EstoqueProdutosConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'produtos'
true
true
1c3fd67199919cae4449110ec7ddd4039586f363
5,139
py
Python
stock_alerter/tests/test_rule.py
aamco-software/product-dev
02931667ff1a8a97a0f2debdff1618820eb0e0b5
[ "MIT" ]
1
2020-11-08T22:26:01.000Z
2020-11-08T22:26:01.000Z
stock_alerter/tests/test_rule.py
aamco-software/product-dev
02931667ff1a8a97a0f2debdff1618820eb0e0b5
[ "MIT" ]
null
null
null
stock_alerter/tests/test_rule.py
aamco-software/product-dev
02931667ff1a8a97a0f2debdff1618820eb0e0b5
[ "MIT" ]
4
2016-05-26T13:30:59.000Z
2021-01-18T19:33:55.000Z
import unittest from datetime import datetime from ..stock import Stock from ..rule import PriceRule, TrendRule, AndRule class PriceRuleTest(unittest.TestCase): @classmethod def setUpClass(cls): goog = Stock("GOOG") goog.update(datetime(2014, 2, 10), 11) cls.exchange = {"GOOG": goog} ...
42.122951
82
0.657132
import unittest from datetime import datetime from ..stock import Stock from ..rule import PriceRule, TrendRule, AndRule class PriceRuleTest(unittest.TestCase): @classmethod def setUpClass(cls): goog = Stock("GOOG") goog.update(datetime(2014, 2, 10), 11) cls.exchange = {"GOOG": goog} ...
true
true
1c3fd7009ea90c16a51ea4de59f4f5a27f39e9bd
1,719
py
Python
pol/curd/user.py
MoguCloud/server
f33e5cb3556a4fc99592c28b7ea4893708d9dbbd
[ "BSD-3-Clause" ]
null
null
null
pol/curd/user.py
MoguCloud/server
f33e5cb3556a4fc99592c28b7ea4893708d9dbbd
[ "BSD-3-Clause" ]
null
null
null
pol/curd/user.py
MoguCloud/server
f33e5cb3556a4fc99592c28b7ea4893708d9dbbd
[ "BSD-3-Clause" ]
null
null
null
from typing import Optional from datetime import datetime, timedelta from loguru import logger from pydantic import BaseModel from sqlalchemy.ext.asyncio import AsyncSession from pol import sa from pol.db.tables import ChiiMember, ChiiOauthAccessToken from pol.permission import Role, UserGroup from pol.curd.exception...
26.446154
75
0.680628
from typing import Optional from datetime import datetime, timedelta from loguru import logger from pydantic import BaseModel from sqlalchemy.ext.asyncio import AsyncSession from pol import sa from pol.db.tables import ChiiMember, ChiiOauthAccessToken from pol.permission import Role, UserGroup from pol.curd.exception...
true
true
1c3fd7a17e7dc122fce64c4ea4fa0d975dd40cc5
1,874
py
Python
tests/contract_tests/KT1NYqJMeLbUKuNaRrXyePrCZ4Uth2HU3173/test_nyqjme_addToken.py
konchunas/pytezos
65576d18bdf1956fae8ea21241b6c43a38921b83
[ "MIT" ]
98
2019-02-07T16:33:38.000Z
2022-03-31T15:53:41.000Z
tests/contract_tests/KT1NYqJMeLbUKuNaRrXyePrCZ4Uth2HU3173/test_nyqjme_addToken.py
konchunas/pytezos
65576d18bdf1956fae8ea21241b6c43a38921b83
[ "MIT" ]
152
2019-05-20T16:38:56.000Z
2022-03-30T14:24:38.000Z
tests/contract_tests/KT1NYqJMeLbUKuNaRrXyePrCZ4Uth2HU3173/test_nyqjme_addToken.py
konchunas/pytezos
65576d18bdf1956fae8ea21241b6c43a38921b83
[ "MIT" ]
34
2019-07-25T12:03:51.000Z
2021-11-11T22:23:38.000Z
from unittest import TestCase from os.path import dirname, join import json from pytezos.michelson.program import MichelsonProgram from pytezos.michelson.types.big_map import big_map_diff_to_lazy_diff from pytezos.michelson.forge import forge_micheline, unforge_micheline folder = 'dexter_usdtz_xtz' entrypoint = 'remo...
39.041667
112
0.721985
from unittest import TestCase from os.path import dirname, join import json from pytezos.michelson.program import MichelsonProgram from pytezos.michelson.types.big_map import big_map_diff_to_lazy_diff from pytezos.michelson.forge import forge_micheline, unforge_micheline folder = 'dexter_usdtz_xtz' entrypoint = 'remo...
true
true
1c3fd85d598b3d6c44fb247eae813bcf20a7a88e
742
py
Python
docs/code_snippets/map_reduce/limitations/single_mapping_node/invalid.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
9
2021-09-06T14:22:38.000Z
2022-02-08T07:48:39.000Z
docs/code_snippets/map_reduce/limitations/single_mapping_node/invalid.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
36
2021-09-04T06:20:19.000Z
2021-12-26T17:54:59.000Z
docs/code_snippets/map_reduce/limitations/single_mapping_node/invalid.py
raztud/dagger
7b394138c139e3b4fdf228e3d34359f1ae6bdd7a
[ "Apache-2.0" ]
4
2021-09-06T08:07:19.000Z
2021-10-18T19:13:18.000Z
from typing import List from dagger import dsl Partition = str @dsl.task() def get_partitions() -> List[Partition]: return ["first", "second", "...", "last"] @dsl.task() def do_something_with(partition: Partition) -> Partition: return f"{partition}*" @dsl.task() def do_something_else_with(partition: Par...
19.526316
62
0.684636
from typing import List from dagger import dsl Partition = str @dsl.task() def get_partitions() -> List[Partition]: return ["first", "second", "...", "last"] @dsl.task() def do_something_with(partition: Partition) -> Partition: return f"{partition}*" @dsl.task() def do_something_else_with(partition: Par...
true
true
1c3fd85dad49a2866b00e6e6336ab5dd4353b86e
13,938
py
Python
src/sage/rings/padics/padic_base_generic.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
1
2021-03-15T21:45:56.000Z
2021-03-15T21:45:56.000Z
src/sage/rings/padics/padic_base_generic.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
src/sage/rings/padics/padic_base_generic.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
r""" `p`-Adic Base Generic A superclass for implementations of `\ZZ_p` and `\QQ_p`. AUTHORS: - David Roe """ #***************************************************************************** # Copyright (C) 2007-2013 David Roe <roed.math@gmail.com> # William Stein <wstein@gmail.com>...
30.565789
175
0.536088
from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from .padic_generic import pAdicGeneric from .misc import precprint from sage.rings.padics.pow_computer import PowComputer from sage.rings.padics.padic_capped_relative_element import pAdicCoercion_ZZ_CR, pAdicCoercion_QQ_CR, pA...
true
true
1c3fd8926309431eb4f88378356064832fc6f8c6
149
py
Python
febio_python/test/test_feb.py
Nobregaigor/febio-python
6895b4e2f8959444a66b6f77a000ce193c3357a7
[ "MIT" ]
null
null
null
febio_python/test/test_feb.py
Nobregaigor/febio-python
6895b4e2f8959444a66b6f77a000ce193c3357a7
[ "MIT" ]
null
null
null
febio_python/test/test_feb.py
Nobregaigor/febio-python
6895b4e2f8959444a66b6f77a000ce193c3357a7
[ "MIT" ]
null
null
null
import unittest from febio_python import feb class test_feb(unittest.TestCase): def test_load_feb(self): feb.FEBio_feb("./sample.feb")
18.625
37
0.731544
import unittest from febio_python import feb class test_feb(unittest.TestCase): def test_load_feb(self): feb.FEBio_feb("./sample.feb")
true
true
1c3fd9c8cb6f1720691d88a108b04aa9c9562f9a
2,706
py
Python
testjinja/testjinja/settings.py
csiubru/py
769d7f5f4278e1c3b3719203e372992859268347
[ "MIT" ]
null
null
null
testjinja/testjinja/settings.py
csiubru/py
769d7f5f4278e1c3b3719203e372992859268347
[ "MIT" ]
null
null
null
testjinja/testjinja/settings.py
csiubru/py
769d7f5f4278e1c3b3719203e372992859268347
[ "MIT" ]
null
null
null
""" Django settings for testjinja project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
25.528302
71
0.695492
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'l1h47cgs#9s4%2ki1e=+%sc1-hw$p2wf-w+l$#1hhytms&7#@0' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c3fdaa56e245ce3d41a1548f2ff21d285086110
2,230
py
Python
demos/ant.core/08-rawmessage4.py
Brimizer/python-ant
2b99693b4754156d401a0bd90e02357e8358c1f5
[ "MIT" ]
null
null
null
demos/ant.core/08-rawmessage4.py
Brimizer/python-ant
2b99693b4754156d401a0bd90e02357e8358c1f5
[ "MIT" ]
null
null
null
demos/ant.core/08-rawmessage4.py
Brimizer/python-ant
2b99693b4754156d401a0bd90e02357e8358c1f5
[ "MIT" ]
1
2019-01-11T22:22:06.000Z
2019-01-11T22:22:06.000Z
""" Initialize a basic broadcast slave channel for listening to an ANT+ HRM monitor, using raw messages. """ import sys import time from ant.core import driver from ant.core import event from ant.core.constants import * from ant.core.message import * from config import * NETKEY = '\xB9\xA5\x21\xFB\xBD\x72\xC3\x45'...
23.978495
68
0.729148
""" Initialize a basic broadcast slave channel for listening to an ANT+ HRM monitor, using raw messages. """ import sys import time from ant.core import driver from ant.core import event from ant.core.constants import * from ant.core.message import * from config import * NETKEY = '\xB9\xA5\x21\xFB\xBD\x72\xC3\x45'...
false
true
1c3fdad50a1ce722cf607472598169e7f53cbe31
4,140
py
Python
setup.py
cwoebker/paxo
7d0dbc8e7ef5a1cb7f9fb14d765ada0134fd4a12
[ "BSD-3-Clause" ]
1
2018-09-16T13:04:53.000Z
2018-09-16T13:04:53.000Z
setup.py
cwoebker/paxo
7d0dbc8e7ef5a1cb7f9fb14d765ada0134fd4a12
[ "BSD-3-Clause" ]
null
null
null
setup.py
cwoebker/paxo
7d0dbc8e7ef5a1cb7f9fb14d765ada0134fd4a12
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine # Note: also necessary for building the code: # $ pip install wheel import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command ...
28.551724
86
0.638164
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command import paxo NAME = paxo.__title__ DESCRIPTION = 'paxo: python ♡ terminal' URL = 'https://github.com/cwoebker/paxo' EMAIL = 'me@cwoebker.com' AUTHOR = paxo.__author__ REQUIRES_PYTHON = '>=3.6.0' VERS...
true
true
1c3fdb16e203e45980d65e859f19336bbd347cea
3,983
py
Python
trainweak.py
HKUST-KnowComp/MLMET
ae1188a929a5ca6a8e087bb091853b328ea2c7e7
[ "MIT" ]
10
2021-05-21T16:16:05.000Z
2022-02-23T11:22:52.000Z
trainweak.py
HKUST-KnowComp/MLMET
ae1188a929a5ca6a8e087bb091853b328ea2c7e7
[ "MIT" ]
4
2021-07-03T05:20:01.000Z
2021-08-08T16:48:44.000Z
trainweak.py
HKUST-KnowComp/MLMET
ae1188a929a5ca6a8e087bb091853b328ea2c7e7
[ "MIT" ]
3
2021-08-20T08:26:45.000Z
2022-03-13T14:10:16.000Z
import datetime import torch import os import logging from utils import utils from exp import bertufexp import config def __setup_logging(to_file): log_file = os.path.join(config.DATA_DIR, 'ultrafine/log/{}-{}-{}-{}.log'.format(os.path.splitext( os.path.basename(__file__))[0], args.idx, str_today, config....
47.416667
112
0.72709
import datetime import torch import os import logging from utils import utils from exp import bertufexp import config def __setup_logging(to_file): log_file = os.path.join(config.DATA_DIR, 'ultrafine/log/{}-{}-{}-{}.log'.format(os.path.splitext( os.path.basename(__file__))[0], args.idx, str_today, config....
true
true
1c3fdb75e6069de112bca35146a844c47b3af97c
8,504
py
Python
ADBShell.py
AlvISsReimu/ArknightsAutoHelper
7112b73c01fe381b20314342ba0dfa2f7e01805d
[ "MIT" ]
2
2021-07-14T04:03:57.000Z
2022-03-17T03:23:19.000Z
ADBShell.py
AlvISsReimu/ArknightsAutoHelper
7112b73c01fe381b20314342ba0dfa2f7e01805d
[ "MIT" ]
null
null
null
ADBShell.py
AlvISsReimu/ArknightsAutoHelper
7112b73c01fe381b20314342ba0dfa2f7e01805d
[ "MIT" ]
null
null
null
import os from config import ADB_ROOT, ADB_HOST, SCREEN_SHOOT_SAVE_PATH, ShellColor from PIL import Image from time import sleep from random import randint # from numpy import average, dot, linalg class ADBShell(object): def __init__(self, adb_host=ADB_HOST): self.SCREEN_SHOOT_SAVE_PATH = os.path.abspath(...
39.37037
108
0.549271
import os from config import ADB_ROOT, ADB_HOST, SCREEN_SHOOT_SAVE_PATH, ShellColor from PIL import Image from time import sleep from random import randint class ADBShell(object): def __init__(self, adb_host=ADB_HOST): self.SCREEN_SHOOT_SAVE_PATH = os.path.abspath(SCREEN_SHOOT_SAVE_PATH) + "\\" ...
true
true
1c3fdb9f9201128eeca24377e0cb7fd4a8ed0437
9,923
py
Python
libs/PureCloudPlatformClientV2/models/voicemail_group_policy.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
1
2021-10-08T20:46:45.000Z
2021-10-08T20:46:45.000Z
libs/PureCloudPlatformClientV2/models/voicemail_group_policy.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
libs/PureCloudPlatformClientV2/models/voicemail_group_policy.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
31.302839
116
0.623299
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class VoicemailGroupPolicy(object): def __init__(self): self.swagger_types = { 'name': 'str', 'group': 'Group', 'enabled': 'bool', 's...
true
true
1c3fdc8113753c7644cdee8192c0a0284c64bf30
68,259
py
Python
se/se_epub_lint.py
jggimi/tools
b4aa35f986b22ab1b92dae1e0bfad9c4d94b6cf7
[ "CC0-1.0" ]
null
null
null
se/se_epub_lint.py
jggimi/tools
b4aa35f986b22ab1b92dae1e0bfad9c4d94b6cf7
[ "CC0-1.0" ]
null
null
null
se/se_epub_lint.py
jggimi/tools
b4aa35f986b22ab1b92dae1e0bfad9c4d94b6cf7
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 """ Contains the LintMessage class and the Lint function, which is broken out of the SeEpub class for readability and maintainability. Strictly speaking, the lint() function should be a class member of SeEpub. But the function is very big and it makes editing easier to put in a separate file. ""...
57.312343
1,259
0.692934
import filecmp import glob import html import io import os import unicodedata from pathlib import Path from typing import Dict, List import importlib_resources import lxml.cssselect import lxml.etree as etree import regex import roman from bs4 import BeautifulSoup, NavigableString import se import se.easy_xml import ...
true
true
1c3fdd4f966d9a2d8fcf67855782831abc65b4ad
337
py
Python
modules/first_module.py
BigMountainTiger/p-virtualenv-excercise
8f1f32de59f9b4b2be2ed9d212842385d3d48f1b
[ "MIT" ]
null
null
null
modules/first_module.py
BigMountainTiger/p-virtualenv-excercise
8f1f32de59f9b4b2be2ed9d212842385d3d48f1b
[ "MIT" ]
null
null
null
modules/first_module.py
BigMountainTiger/p-virtualenv-excercise
8f1f32de59f9b4b2be2ed9d212842385d3d48f1b
[ "MIT" ]
null
null
null
class _FirstClass: def __init__(self, name, age): self.name = name self.age = age firstObject = _FirstClass('Song', 20) class ANumber: def __init__(self, n): self.number = n a_number = ANumber(50) def set_a_number(n): a_number.number = n def get_a_number(): return a_number print('first_module...
16.047619
37
0.682493
class _FirstClass: def __init__(self, name, age): self.name = name self.age = age firstObject = _FirstClass('Song', 20) class ANumber: def __init__(self, n): self.number = n a_number = ANumber(50) def set_a_number(n): a_number.number = n def get_a_number(): return a_number print('first_module...
true
true
1c3fdd509254afc2cb7712d828b5d4ce54dab04e
430
py
Python
npbench/benchmarks/nbody/nbody.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
27
2021-05-10T11:49:13.000Z
2022-03-22T18:07:19.000Z
npbench/benchmarks/nbody/nbody.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
3
2021-12-01T13:03:17.000Z
2022-03-17T10:53:00.000Z
npbench/benchmarks/nbody/nbody.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
7
2021-06-24T03:40:25.000Z
2022-01-26T09:04:33.000Z
# Copyright 2021 ETH Zurich and the NPBench authors. All rights reserved. import numpy as np def initialize(N, tEnd, dt): from numpy.random import default_rng rng = default_rng(42) mass = 20.0 * np.ones((N, 1)) / N # total mass of particles is 20 pos = rng.random((N, 3)) # randomly selected positio...
30.714286
74
0.65814
import numpy as np def initialize(N, tEnd, dt): from numpy.random import default_rng rng = default_rng(42) mass = 20.0 * np.ones((N, 1)) / N pos = rng.random((N, 3)) vel = rng.random((N, 3)) Nt = int(np.ceil(tEnd / dt)) return mass, pos, vel, Nt
true
true
1c3fdd608b5db1307869afe943ad188d63c4110b
197
py
Python
tests/mytest.py
UmboCV/logutils
3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f
[ "BSD-3-Clause" ]
null
null
null
tests/mytest.py
UmboCV/logutils
3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f
[ "BSD-3-Clause" ]
null
null
null
tests/mytest.py
UmboCV/logutils
3f9d37f1dc649f3a01c7a1593b3a40f77aafa89f
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from logutils.testing import TestHandler, Matcher class MyTestHandler(TestHandler): def __init__(self): TestHandler.__init__(self, Matcher())
19.7
49
0.771574
from __future__ import absolute_import from logutils.testing import TestHandler, Matcher class MyTestHandler(TestHandler): def __init__(self): TestHandler.__init__(self, Matcher())
true
true
1c3fdd659991042710d33ea957b1e3751d39955f
742
py
Python
instagram/urls.py
enock24/Instagram-clone
6f213b1f42ddd2d0c7b6694b09ace990182c6245
[ "MIT" ]
null
null
null
instagram/urls.py
enock24/Instagram-clone
6f213b1f42ddd2d0c7b6694b09ace990182c6245
[ "MIT" ]
3
2020-03-08T20:18:54.000Z
2022-03-12T00:23:17.000Z
instagram/urls.py
enock24/Instagram-clone
6f213b1f42ddd2d0c7b6694b09ace990182c6245
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns=[ url(r'^$', views.index, name='index'), url(r'^profile/$', views.profile,name='profile'), url(r'^edit/$', views.edit_profile,name='edit_profile'), url(r'^user/$...
30.916667
81
0.67655
from django.conf.urls import url from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns=[ url(r'^$', views.index, name='index'), url(r'^profile/$', views.profile,name='profile'), url(r'^edit/$', views.edit_profile,name='edit_profile'), url(r'^user/$...
true
true
1c3fdd83082337c34febe14b2fa59434882d5ad3
38,457
py
Python
python/taichi/lang/kernel_impl.py
Lyken17/taichi
888a1792bd8566c31afc960c64b3c5fe838d444d
[ "MIT" ]
null
null
null
python/taichi/lang/kernel_impl.py
Lyken17/taichi
888a1792bd8566c31afc960c64b3c5fe838d444d
[ "MIT" ]
null
null
null
python/taichi/lang/kernel_impl.py
Lyken17/taichi
888a1792bd8566c31afc960c64b3c5fe838d444d
[ "MIT" ]
null
null
null
import ast import functools import inspect import re import sys import textwrap import traceback import numpy as np import taichi.lang from taichi.core.util import ti_core as _ti_core from taichi.lang import impl, util from taichi.lang.ast.checkers import KernelSimplicityASTChecker from taichi.lang.ast.transformer imp...
39.28192
307
0.584575
import ast import functools import inspect import re import sys import textwrap import traceback import numpy as np import taichi.lang from taichi.core.util import ti_core as _ti_core from taichi.lang import impl, util from taichi.lang.ast.checkers import KernelSimplicityASTChecker from taichi.lang.ast.transformer imp...
true
true
1c3fddd736b4b331ce0e9cce4a4deefad4aaaa9d
5,605
py
Python
ibis_mssql/compiler.py
safrazRampersaud/ibis-mssql
b4349d0d195c77b02c7a2531e4b83e6cf6ecd79a
[ "Apache-2.0" ]
null
null
null
ibis_mssql/compiler.py
safrazRampersaud/ibis-mssql
b4349d0d195c77b02c7a2531e4b83e6cf6ecd79a
[ "Apache-2.0" ]
15
2020-06-04T17:27:26.000Z
2021-02-15T16:29:14.000Z
ibis_mssql/compiler.py
safrazRampersaud/ibis-mssql
b4349d0d195c77b02c7a2531e4b83e6cf6ecd79a
[ "Apache-2.0" ]
5
2021-01-05T23:20:13.000Z
2021-04-17T10:52:53.000Z
import pyodbc import sqlalchemy as sa import sqlalchemy.dialects.mssql as mssql import ibis.common.exceptions as com import ibis.expr.datatypes as dt import ibis.expr.operations as ops import ibis.backends.base_sqlalchemy.alchemy as alch # used for literal translate from ibis.backends.base_sqlalchemy.alchemy import f...
27.077295
76
0.649955
import pyodbc import sqlalchemy as sa import sqlalchemy.dialects.mssql as mssql import ibis.common.exceptions as com import ibis.expr.datatypes as dt import ibis.expr.operations as ops import ibis.backends.base_sqlalchemy.alchemy as alch from ibis.backends.base_sqlalchemy.alchemy import fixed_arity, unary def rais...
true
true
1c3fde21a6ddd37df1568bf727236ba6d5ba10f9
707
py
Python
cla-backend/helpers/get_token.py
rinkeshbhutwala/easycla
b92eae57a696050b0a5c15c12e4084583f3d1c4c
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
52
2019-07-03T17:13:03.000Z
2022-03-29T20:42:55.000Z
cla-backend/helpers/get_token.py
rinkeshbhutwala/easycla
b92eae57a696050b0a5c15c12e4084583f3d1c4c
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
1,368
2019-07-03T21:24:07.000Z
2022-03-30T22:56:17.000Z
cla-backend/helpers/get_token.py
rinkeshbhutwala/easycla
b92eae57a696050b0a5c15c12e4084583f3d1c4c
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
49
2019-07-03T21:20:58.000Z
2021-12-10T08:22:18.000Z
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT import sys sys.path.append('../') from keycloak import KeycloakOpenID import cla # kc = KeycloakOpenID(cla.conf['KEYCLOAK_ENDPOINT'], # cla.conf['KEYCLOAK_CLIENT_ID'], # cl...
33.666667
100
0.678925
import sys sys.path.append('../') from keycloak import KeycloakOpenID import cla
true
true
1c3fdf53d10639920afbfd31b1c8147115d594be
778
py
Python
tools/find-missing.py
hao-lei/spice-nsis
85b6364ea1c14314c235dca3c1d698b3cc9294ee
[ "Zlib", "BSD-2-Clause" ]
6
2015-06-25T12:01:05.000Z
2022-02-05T14:10:20.000Z
tools/find-missing.py
hao-lei/spice-nsis
85b6364ea1c14314c235dca3c1d698b3cc9294ee
[ "Zlib", "BSD-2-Clause" ]
null
null
null
tools/find-missing.py
hao-lei/spice-nsis
85b6364ea1c14314c235dca3c1d698b3cc9294ee
[ "Zlib", "BSD-2-Clause" ]
1
2022-01-08T01:52:36.000Z
2022-01-08T01:52:36.000Z
#/usr/bin/python import md5 import os import sys src_dir = sys.argv[1] dest_dir = sys.argv[2] source_files = {} dest_files = set([]) for dirname, dirs, files in os.walk(src_dir): for filename in files: absolute_path = os.path.join(dirname, filename) content = file(absolute_pat...
27.785714
71
0.62982
import md5 import os import sys src_dir = sys.argv[1] dest_dir = sys.argv[2] source_files = {} dest_files = set([]) for dirname, dirs, files in os.walk(src_dir): for filename in files: absolute_path = os.path.join(dirname, filename) content = file(absolute_path, 'r').read() ...
false
true
1c3fdfdf45eeccd2bbadce8856a0d6f7840228fe
1,659
py
Python
dive/soundex/stage1/soundex2c.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
dive/soundex/stage1/soundex2c.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
dive/soundex/stage1/soundex2c.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
import string import re allchars = string.uppercase + string.lowercase charToSoundex = string.maketrans(allchars, "91239129922455912623919292" * 2) isOnlyChars = re.compile('^[A-Za-z]+$').search def soundex(source): "convert string to Soundex equivalent" if not isOnlyChars(source): return "0000" ...
27.196721
76
0.621459
import string import re allchars = string.uppercase + string.lowercase charToSoundex = string.maketrans(allchars, "91239129922455912623919292" * 2) isOnlyChars = re.compile('^[A-Za-z]+$').search def soundex(source): if not isOnlyChars(source): return "0000" digits = source[0].upper() + source[1:].tr...
true
true
1c3fe0bf3f57fbe31012b5b7537b6aeaca02fccc
6,226
py
Python
application.py
mdj924/py-flask-signup
35685037cdba419305cb1245df2044b153584f1c
[ "Apache-2.0" ]
null
null
null
application.py
mdj924/py-flask-signup
35685037cdba419305cb1245df2044b153584f1c
[ "Apache-2.0" ]
null
null
null
application.py
mdj924/py-flask-signup
35685037cdba419305cb1245df2044b153584f1c
[ "Apache-2.0" ]
null
null
null
# Copyright 2013. Amazon Web Services, 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 a...
35.577143
254
0.727594
import os import sys import json import flask from flask import request, Response from boto import sns from flask import Flask, jsonify from flask.ext.sqlalchemy import SQLAlchemy from functools import wraps THEME = 'default' if os.environ.get('THEME') is None else os.environ.get('THEME') FLASK...
false
true
1c3fe0bfadc33918d956aa1c6d71ceca984dd702
28,756
py
Python
archetypal/template/zonedefinition.py
louisleroy5/archetypal
71f13aaed859c10e663e68624e2b74d816de631f
[ "MIT" ]
null
null
null
archetypal/template/zonedefinition.py
louisleroy5/archetypal
71f13aaed859c10e663e68624e2b74d816de631f
[ "MIT" ]
null
null
null
archetypal/template/zonedefinition.py
louisleroy5/archetypal
71f13aaed859c10e663e68624e2b74d816de631f
[ "MIT" ]
null
null
null
################################################################################ # Module: archetypal.template # Description: # License: MIT, see full license in LICENSE.txt # Web: https://github.com/samuelduchesne/archetypal ################################################################################ import colle...
35.326781
167
0.60224
res return self._is_part_of_total_floor_area @staticmethod def get_volume_from_surfs(zone_surfs): vol = 0 for surf in zone_surfs: polygon_d = Polygon3D(surf.coords) n = len(polygon_d.vertices_list) v2 = polygon_d[0] x2 = v2.x ...
true
true
1c3fe2578a469520372eedadc600c4ff9471a9ef
4,503
py
Python
samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py
doc22940/openapi-generator
50d21cb0d161e7917bb410a7db78811635f0837b
[ "Apache-2.0" ]
1
2020-09-16T22:26:09.000Z
2020-09-16T22:26:09.000Z
samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py
doc22940/openapi-generator
50d21cb0d161e7917bb410a7db78811635f0837b
[ "Apache-2.0" ]
null
null
null
samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py
doc22940/openapi-generator
50d21cb0d161e7917bb410a7db78811635f0837b
[ "Apache-2.0" ]
1
2020-10-06T15:41:06.000Z
2020-10-06T15:41:06.000Z
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
33.604478
174
0.609594
from __future__ import absolute_import import re import sys import six from petstore_api.model_utils import ( ModelComposed, ModelNormal, ModelSimple, date, datetime, file_type, int, none_type, str, validate_get_composed_info, ) class CatAllOf(ModelNormal): a...
true
true
1c3fe3235baa13687662db78218ee5a102d7bf2a
1,780
py
Python
src/omission/interface/highscore.py
mousepawmedia/omission
e2a25d9c510be5c2d3469d064ee764f03050911f
[ "BSD-3-Clause" ]
13
2019-06-10T02:30:30.000Z
2022-01-09T08:25:48.000Z
src/omission/interface/highscore.py
mousepawmedia/omission
e2a25d9c510be5c2d3469d064ee764f03050911f
[ "BSD-3-Clause" ]
null
null
null
src/omission/interface/highscore.py
mousepawmedia/omission
e2a25d9c510be5c2d3469d064ee764f03050911f
[ "BSD-3-Clause" ]
2
2019-09-02T03:51:38.000Z
2020-11-30T01:50:57.000Z
""" Highscore Prompt Interface [Omission] """ from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.textinput import TextInput class Highscore(BoxLayout): """ Displays the prompt for entering a name for a new high score. """ def __init__(self, **kwargs): super().__in...
27.8125
81
0.57809
from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.textinput import TextInput class Highscore(BoxLayout): def __init__(self, **kwargs): super().__init__(**kwargs) self.datastring = None self.score = None def set_info(self, datastring, score): self...
true
true
1c3fe36663b363fbad6630f23d3c1ce859e431dd
158
py
Python
gigs/filter.py
djangoLovers/fiverrClone
567ea972603b4997590e1351a7d27fba8add91af
[ "MIT" ]
2
2021-04-17T19:08:07.000Z
2022-03-21T11:11:54.000Z
gigs/filter.py
djangoLovers/fiverrClone
567ea972603b4997590e1351a7d27fba8add91af
[ "MIT" ]
null
null
null
gigs/filter.py
djangoLovers/fiverrClone
567ea972603b4997590e1351a7d27fba8add91af
[ "MIT" ]
4
2021-04-17T19:08:08.000Z
2021-09-15T21:04:41.000Z
import django_filters from .models import Gig class gigFilter(django_filters.FilterSet): class Meta: model = Gig fields = ['category']
15.8
42
0.677215
import django_filters from .models import Gig class gigFilter(django_filters.FilterSet): class Meta: model = Gig fields = ['category']
true
true
1c3fe426dc2304d925c2926fa64efd31c2a68274
16,293
py
Python
examples/system/ota/native_ota_example/example_test.py
moolitayer/esp-idf
c1d0daf36d0dca81c23c226001560edfa51c30ea
[ "Apache-2.0" ]
1
2020-02-26T02:30:07.000Z
2020-02-26T02:30:07.000Z
examples/system/ota/native_ota_example/example_test.py
moolitayer/esp-idf
c1d0daf36d0dca81c23c226001560edfa51c30ea
[ "Apache-2.0" ]
null
null
null
examples/system/ota/native_ota_example/example_test.py
moolitayer/esp-idf
c1d0daf36d0dca81c23c226001560edfa51c30ea
[ "Apache-2.0" ]
null
null
null
import re import os import socket import BaseHTTPServer import SimpleHTTPServer from threading import Thread import ssl from tiny_test_fw import DUT import ttfw_idf import random import subprocess server_cert = "-----BEGIN CERTIFICATE-----\n" \ "MIIDXTCCAkWgAwIBAgIJAP4LF7E72HakMA0GCSqGSIb3DQEBCwUAMEUxCz...
48.204142
137
0.711471
import re import os import socket import BaseHTTPServer import SimpleHTTPServer from threading import Thread import ssl from tiny_test_fw import DUT import ttfw_idf import random import subprocess server_cert = "-----BEGIN CERTIFICATE-----\n" \ "MIIDXTCCAkWgAwIBAgIJAP4LF7E72HakMA0GCSqGSIb3DQEBCwUAMEUxCz...
true
true
1c3fe459583d256e465eeff96c43107ef808c2d6
1,049
py
Python
Totoro/bin/ic342_lst_range.py
sdss/Totoro
74befd99bda47ebb8c03a276b57371b5788e154a
[ "Apache-2.0" ]
1
2018-08-22T00:34:30.000Z
2018-08-22T00:34:30.000Z
Totoro/bin/ic342_lst_range.py
sdss/Totoro
74befd99bda47ebb8c03a276b57371b5788e154a
[ "Apache-2.0" ]
4
2018-06-06T22:10:14.000Z
2018-06-14T04:47:23.000Z
Totoro/bin/ic342_lst_range.py
sdss/Totoro
74befd99bda47ebb8c03a276b57371b5788e154a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: José Sánchez-Gallego (gallegoj@uw.edu) # @Date: 2019-10-07 # @Filename: ic342_lst_range.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) import sys from Totoro.db import getConnection def load_lst_ranges(lst0, lst1): lst0 =...
24.395349
89
0.620591
import sys from Totoro.db import getConnection def load_lst_ranges(lst0, lst1): lst0 = float(lst0) lst1 = float(lst1) ic342_ra = 55.910158 ha0 = lst0 * 15. - ic342_ra ha1 = lst1 * 15. - ic342_ra db = getConnection() session = db.Session() ic342_plates = session.query(db.m...
true
true
1c3fe4ea951aef122728a7aed7fc4ecaf8e7607e
4,082
py
Python
tests/compare_results.py
an1018/PaddleOCR
0a8ca67a0c4a4ed468e82a575cc64ce73f21e068
[ "Apache-2.0" ]
1
2022-01-21T07:48:15.000Z
2022-01-21T07:48:15.000Z
tests/compare_results.py
an1018/PaddleOCR
0a8ca67a0c4a4ed468e82a575cc64ce73f21e068
[ "Apache-2.0" ]
null
null
null
tests/compare_results.py
an1018/PaddleOCR
0a8ca67a0c4a4ed468e82a575cc64ce73f21e068
[ "Apache-2.0" ]
null
null
null
import numpy as np import os import subprocess import json import argparse import glob def init_args(): parser = argparse.ArgumentParser() # params for testing assert allclose parser.add_argument("--atol", type=float, default=1e-3) parser.add_argument("--rtol", type=float, default=1e-3) parser.add...
30.462687
111
0.628613
import numpy as np import os import subprocess import json import argparse import glob def init_args(): parser = argparse.ArgumentParser() parser.add_argument("--atol", type=float, default=1e-3) parser.add_argument("--rtol", type=float, default=1e-3) parser.add_argument("--gt_file", type=str, def...
true
true
1c3fe51d7dfc9a3980ef339a227c06617611f30a
4,807
py
Python
tests/forte/data/ontology/ndarray_attribute_test.py
bhaskar2443053/forte
95fabd94126d45c0db07cdcc197049ed1859d228
[ "Apache-2.0" ]
null
null
null
tests/forte/data/ontology/ndarray_attribute_test.py
bhaskar2443053/forte
95fabd94126d45c0db07cdcc197049ed1859d228
[ "Apache-2.0" ]
1
2022-02-23T23:21:03.000Z
2022-02-23T23:21:03.000Z
tests/forte/data/ontology/ndarray_attribute_test.py
KGerring/forte
7dc6e6c7d62d9a4126bdfc5ca02d15be3ffd61ca
[ "Apache-2.0" ]
null
null
null
import os import tempfile import unittest from ddt import data, ddt import numpy as np from forte.data.data_pack import DataPack from .test_outputs.ft.onto.test_ndarray import NdEntry1, NdEntry2, NdEntry3 """ NdEntry1, NdEntry2, and NdEntry3 are sample Entry containing NdArray attributes for testing. NdEntry1 has b...
34.092199
93
0.598294
import os import tempfile import unittest from ddt import data, ddt import numpy as np from forte.data.data_pack import DataPack from .test_outputs.ft.onto.test_ndarray import NdEntry1, NdEntry2, NdEntry3 @ddt class SerializationTest(unittest.TestCase): @data( NdEntry1, NdEntry2, NdEntry...
true
true
1c3fe5c3f7e422f2e584fd59cb3e47b18251a7e5
235
py
Python
pt-1/sem_7/6sem7_ex2_sum_array_elements.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_7/6sem7_ex2_sum_array_elements.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_7/6sem7_ex2_sum_array_elements.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
def soma_elementos(lista): sum = 0 for i in lista: sum += i return sum def test_sum(): test = [1, 2, 3, 4, 5] assert soma_elementos(test) == 15 def test_sum2(): test = [5, 5, 4, 6, 9, 2, 5] assert soma_elementos(test) == 36
16.785714
34
0.617021
def soma_elementos(lista): sum = 0 for i in lista: sum += i return sum def test_sum(): test = [1, 2, 3, 4, 5] assert soma_elementos(test) == 15 def test_sum2(): test = [5, 5, 4, 6, 9, 2, 5] assert soma_elementos(test) == 36
true
true
1c3fe7b23b37e235bc5dbaeab901904b62b9b074
11,279
py
Python
thirdparty/cv_bridge/core.py
Tsinghua-OpenICV/carla_icv_bridge
4d5f8c26b1847dbb16a81fe43f146bf4a9a8da5e
[ "MIT" ]
null
null
null
thirdparty/cv_bridge/core.py
Tsinghua-OpenICV/carla_icv_bridge
4d5f8c26b1847dbb16a81fe43f146bf4a9a8da5e
[ "MIT" ]
null
null
null
thirdparty/cv_bridge/core.py
Tsinghua-OpenICV/carla_icv_bridge
4d5f8c26b1847dbb16a81fe43f146bf4a9a8da5e
[ "MIT" ]
1
2020-12-19T05:48:01.000Z
2020-12-19T05:48:01.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, Inc. # Copyright (c) 2016, Tal Regev. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of ...
41.164234
152
0.63862
import sensor_msgs.msg import sys import cv2 import numpy as np class CvBridgeError(TypeError): pass class CvBridge(object): def __init__(self): import cv2 self.cvtype_to_name = {} self.cvdepth_to_numpy_depth = {cv2.CV_8U: 'uint8', cv2.CV_8S: 'int8',...
true
true
1c3fe8fee0a2b724d2ae89380da2ede97ecde881
3,121
py
Python
emtf_nnet/keras/layers/mutated_dense.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
emtf_nnet/keras/layers/mutated_dense.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
emtf_nnet/keras/layers/mutated_dense.py
jiafulow/emtf-nnet
70a6c747c221178f9db940197ea886bdb60bf3ba
[ "Apache-2.0" ]
null
null
null
# The following source code was originally obtained from: # https://github.com/keras-team/keras/blob/r2.6/keras/layers/core.py#L1066-L1270 # ============================================================================== # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License...
36.717647
95
0.627043
import tensorflow.compat.v2 as tf from keras.layers.core import Dense class MutatedDense(Dense): def __init__(self, units, **kwargs): super().__init__(units=units, **kwargs) self.supports_masking = True self._compute_output_and_mask_jointly = True def _dense(sel...
true
true
1c3fe9a0321b68f22254ea683c2077a5ca3f207c
5,419
py
Python
enno/utils/annotation.py
HPI-Information-Systems/enno
25d9c7aaf4a9ef0090bc7eca947684e354621586
[ "MIT" ]
5
2019-05-15T05:53:27.000Z
2021-01-07T03:00:53.000Z
enno/utils/annotation.py
HPI-Information-Systems/enno
25d9c7aaf4a9ef0090bc7eca947684e354621586
[ "MIT" ]
8
2017-09-28T13:41:49.000Z
2018-06-27T09:38:51.000Z
enno/utils/annotation.py
TimRepke/enno
25d9c7aaf4a9ef0090bc7eca947684e354621586
[ "MIT" ]
4
2017-09-28T14:34:04.000Z
2017-10-11T14:23:25.000Z
import json import re class Annotation: def __init__(self, wrapper='plaintext'): self.anno = {} self.wrapper = wrapper # some helper "indices" self.max = { 'denotations': 0, 'relations': 0 } self.ids = { 'denotations': [], ...
28.824468
107
0.532017
import json import re class Annotation: def __init__(self, wrapper='plaintext'): self.anno = {} self.wrapper = wrapper self.max = { 'denotations': 0, 'relations': 0 } self.ids = { 'denotations': [], 'relations': [] ...
true
true
1c3fea7ec6376c09b265b6fd7238ec2962f0cb87
866
py
Python
scripts/deployment/deploy_multisig_keyholders.py
JohnAllerdyce/Sovryn-smart-contracts
e0dc44582b4e4ae2fc1bc3f9a7d775384c69d169
[ "Apache-2.0" ]
108
2020-08-30T17:52:32.000Z
2022-02-26T00:00:15.000Z
scripts/deployment/deploy_multisig_keyholders.py
JohnAllerdyce/Sovryn-smart-contracts
e0dc44582b4e4ae2fc1bc3f9a7d775384c69d169
[ "Apache-2.0" ]
181
2020-08-24T09:28:53.000Z
2022-02-11T13:22:22.000Z
scripts/deployment/deploy_multisig_keyholders.py
JohnAllerdyce/Sovryn-smart-contracts
e0dc44582b4e4ae2fc1bc3f9a7d775384c69d169
[ "Apache-2.0" ]
36
2020-09-10T07:53:41.000Z
2022-03-26T00:35:30.000Z
from brownie import * import json def main(): thisNetwork = network.show_active() if thisNetwork == "development": acct = accounts[0] # configFile = open('./scripts/contractInteraction/testnet_contracts.json') elif thisNetwork == "testnet" or thisNetwork == "rsk-mainnet": acct = a...
36.083333
84
0.700924
from brownie import * import json def main(): thisNetwork = network.show_active() if thisNetwork == "development": acct = accounts[0] elif thisNetwork == "testnet" or thisNetwork == "rsk-mainnet": acct = accounts.load("rskdeployer") else: raise Exception("network not s...
true
true
1c3feac0e062f7e9f38d637e9292b971725339ef
75,220
py
Python
get_data_from_JD/apple_pachong.py
brucegai/jd_text_analysis
48e2593c51026b48e7289e4b37af3ccb2ec552eb
[ "Apache-2.0" ]
2
2018-04-05T15:41:06.000Z
2018-05-07T11:51:57.000Z
get_data_from_JD/apple_pachong.py
brucegai/jd_text_analysis
48e2593c51026b48e7289e4b37af3ccb2ec552eb
[ "Apache-2.0" ]
null
null
null
get_data_from_JD/apple_pachong.py
brucegai/jd_text_analysis
48e2593c51026b48e7289e4b37af3ccb2ec552eb
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://assets-cdn.github.com"> <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com"> <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com"> <link rel="dns-prefetch" href=...
68.319709
837
0.639245
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://assets-cdn.github.com"> <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com"> <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com"> <link rel="dns-prefetch" href=...
false
true
1c3fecd87798632e7d2525d71f35386553f5ecb5
10,785
py
Python
pyplusplus/creators_factory/sort_algorithms.py
electronicvisions/pyplusplus
4d88bb8754d22654a61202ae8adc222807953e38
[ "BSL-1.0" ]
5
2021-01-29T19:54:34.000Z
2022-03-23T11:16:37.000Z
pyplusplus/creators_factory/sort_algorithms.py
electronicvisions/pyplusplus
4d88bb8754d22654a61202ae8adc222807953e38
[ "BSL-1.0" ]
null
null
null
pyplusplus/creators_factory/sort_algorithms.py
electronicvisions/pyplusplus
4d88bb8754d22654a61202ae8adc222807953e38
[ "BSL-1.0" ]
null
null
null
# Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) from pygccxml import declarations from pyplusplus import decl_wrappers class COLOR: WHITE = 0 GRAY = 1 BLACK = 2 ...
38.935018
141
0.612239
from pygccxml import declarations from pyplusplus import decl_wrappers class COLOR: WHITE = 0 GRAY = 1 BLACK = 2 class class_organizer_t(object): def __init__( self, decls, include_vars=False): object.__init__( self ) self.__include_vars = include_vars self.__classes = [x...
true
true
1c3fef2e535e5662f29af722fb99adb738d0b837
3,279
py
Python
jwql/tests/test_calculations.py
cracraft/jwql
030c1663bc433465e01ad803e1578a2bc53035f4
[ "BSD-3-Clause" ]
42
2018-10-03T13:38:18.000Z
2022-03-11T12:19:32.000Z
jwql/tests/test_calculations.py
cracraft/jwql
030c1663bc433465e01ad803e1578a2bc53035f4
[ "BSD-3-Clause" ]
723
2018-08-29T18:29:49.000Z
2022-03-31T21:09:20.000Z
jwql/tests/test_calculations.py
cracraft/jwql
030c1663bc433465e01ad803e1578a2bc53035f4
[ "BSD-3-Clause" ]
30
2018-08-29T18:17:32.000Z
2022-03-10T19:43:39.000Z
#! /usr/bin/env python """Tests for the ``calculations`` module. Authors ------- - Bryan Hilbert Use --- These tests can be run via the command line (omit the ``-s`` to suppress verbose output to stdout): :: pytest -s test_calculations.py """ import numpy as np from jwql.utils import cal...
30.933962
97
0.625801
import numpy as np from jwql.utils import calculations def test_double_gaussian_fit(): amplitude1 = 500 mean_value1 = 0.5 sigma_value1 = 0.05 amplitude2 = 300 mean_value2 = 0.4 sigma_value2 = 0.03 bin_centers = np.arange(0., 1.1, 0.007) input_params = [amplitude1, mean_value1, si...
true
true
1c3fefba1ba14e9ffa62bb96df0e1e0d72ed83e9
94
py
Python
output/models/saxon_data/simple/simple046_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/saxon_data/simple/simple046_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/saxon_data/simple/simple046_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.saxon_data.simple.simple046_xsd.simple046 import E __all__ = [ "E", ]
15.666667
69
0.734043
from output.models.saxon_data.simple.simple046_xsd.simple046 import E __all__ = [ "E", ]
true
true
1c3feffbedeeffc98326325bf161e1a8938e3714
610
py
Python
music/models.py
parthrao/Django-Rest
7921be3de53b7992409ae0dc6e620925f63f9af0
[ "Unlicense" ]
null
null
null
music/models.py
parthrao/Django-Rest
7921be3de53b7992409ae0dc6e620925f63f9af0
[ "Unlicense" ]
null
null
null
music/models.py
parthrao/Django-Rest
7921be3de53b7992409ae0dc6e620925f63f9af0
[ "Unlicense" ]
null
null
null
from django.db import models # Create your models here. class Album(models.Model): artist = models.CharField(max_length=250) album_title = models.CharField(max_length=500) genre = models.CharField(max_length=100) album_logo = models.CharField(max_length=1000) def __str__(self): return self.album_title + ' - ' ...
30.5
59
0.77377
from django.db import models class Album(models.Model): artist = models.CharField(max_length=250) album_title = models.CharField(max_length=500) genre = models.CharField(max_length=100) album_logo = models.CharField(max_length=1000) def __str__(self): return self.album_title + ' - ' + self.artist class Song...
true
true
1c3ff1466c2b4efc9a30b95f8f66043026bac9d5
3,076
py
Python
2020/day/11/seating.py
mboos/advent-of-code
4477bb32c50b951b0a1be4850ed28a2c6f78e65d
[ "Apache-2.0" ]
null
null
null
2020/day/11/seating.py
mboos/advent-of-code
4477bb32c50b951b0a1be4850ed28a2c6f78e65d
[ "Apache-2.0" ]
null
null
null
2020/day/11/seating.py
mboos/advent-of-code
4477bb32c50b951b0a1be4850ed28a2c6f78e65d
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 """ Solution to https://adventofcode.com/2020/day/11 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags from collections import Counter FLAGS = flags.FLAGS flags.DEFINE_string("input", None, "...
25.848739
78
0.575423
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags from collections import Counter FLAGS = flags.FLAGS flags.DEFINE_string("input", None, "Input file.") flags.mark_flag_as_required("input") def count_neighbours(...
true
true
1c3ff15c8a420e719e49ef9f29e7361f57a3b52b
5,623
py
Python
network/detecthead.py
530824679/side_camera_perception
b83fb67b3128a048477def1330bac56f703766e6
[ "MIT" ]
null
null
null
network/detecthead.py
530824679/side_camera_perception
b83fb67b3128a048477def1330bac56f703766e6
[ "MIT" ]
null
null
null
network/detecthead.py
530824679/side_camera_perception
b83fb67b3128a048477def1330bac56f703766e6
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # coding=utf-8 #================================================================ # Copyright (C) 2020 * Ltd. All rights reserved. # # Editor : pycharm # File name : train.py # Author : oscar chen # Created date: 2020-10-13 9:50:26 # Description : # #======================...
57.377551
215
0.688067
import os import numpy as np import tensorflow as tf from network.ops import conv2d, batch_normalization from network.backbone import darknet53 class Model(object): def __init__(self, norm_epsilon, norm_decay, classes_path, anchors_path, pre_train): self.norm_epsilon = norm_epsilon sel...
true
true
1c3ff197fb1a5a69165b018285460b36c006c720
5,726
py
Python
zenml/core/steps/split/categorical_ratio_split_step.py
Camicb/zenml
92788a76c7923a30612c5f5bdaaf5bb9554773a1
[ "Apache-2.0" ]
1
2021-05-04T17:11:23.000Z
2021-05-04T17:11:23.000Z
zenml/core/steps/split/categorical_ratio_split_step.py
I-m-Zee/zenml
c0bfd70716c0cfed5ec825f467ab04b7bd97343e
[ "Apache-2.0" ]
null
null
null
zenml/core/steps/split/categorical_ratio_split_step.py
I-m-Zee/zenml
c0bfd70716c0cfed5ec825f467ab04b7bd97343e
[ "Apache-2.0" ]
1
2020-12-27T08:16:42.000Z
2020-12-27T08:16:42.000Z
# Copyright (c) maiot GmbH 2020. 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...
42.102941
79
0.663465
from typing import Text, List, Dict, Union from zenml.core.steps.split import constants from zenml.core.steps.split.base_split_step import BaseSplit from zenml.core.steps.split.categorical_domain_split_step import \ CategoricalPartitionFn from zenml.core.steps.split.utils import partition_cat_list C...
true
true
1c3ff1bdd5bd4f35b40e41df990e6222f62c69db
16,550
py
Python
docker-compose/core-network.py
kukkalli/oai-cn5g-fed
15634fac935ac8671b61654bdf75bf8af07d3c3a
[ "Apache-2.0" ]
null
null
null
docker-compose/core-network.py
kukkalli/oai-cn5g-fed
15634fac935ac8671b61654bdf75bf8af07d3c3a
[ "Apache-2.0" ]
null
null
null
docker-compose/core-network.py
kukkalli/oai-cn5g-fed
15634fac935ac8671b61654bdf75bf8af07d3c3a
[ "Apache-2.0" ]
null
null
null
""" Licensed to the OpenAirInterface (OAI) Software Alliance under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The OpenAirInterface Software Alliance licenses this file to You under the OAI Public License, Version ...
45.218579
194
0.603686
import yaml import re import subprocess import time import logging import argparse import sys logging.basicConfig( level=logging.DEBUG, stream=sys.stdout, format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s" ) MINI_W_NRF = 'docker-compose-mini-nrf.yaml' MINI_NO_NRF = 'docker-compose-mini-nonrf.ya...
true
true
1c3ff1dd2ff12e899dc1584fe534fb5dbf17b99d
2,578
py
Python
camkes/parser/stage6.py
aisamanra/camkes-tool
4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3
[ "BSD-2-Clause" ]
null
null
null
camkes/parser/stage6.py
aisamanra/camkes-tool
4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3
[ "BSD-2-Clause" ]
null
null
null
camkes/parser/stage6.py
aisamanra/camkes-tool
4bcf3f22ef7e73f8755ca1b5e7165dd6a23e89f3
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017, Data61 # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # ABN 41 687 119 230. # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE...
29.632184
79
0.703646
from __future__ import absolute_import, division, print_function, \ unicode_literals from camkes.internal.seven import cmp, filter, map, zip from .base import Transformer from camkes.ast import Assembly, Composition, Configuration, Group, \ TraversalAction from .exception import ParseError def...
true
true
1c3ff2bbb22ab4f99787b4f2b0fe0a3023f613cf
10,932
py
Python
pystac_client/stac_api_io.py
ocefpaf/pystac-client
ddf0e0566b2b1783a4d32d3d77f9f51b80270df3
[ "Apache-2.0" ]
52
2021-04-15T23:24:12.000Z
2022-03-09T23:02:27.000Z
pystac_client/stac_api_io.py
ocefpaf/pystac-client
ddf0e0566b2b1783a4d32d3d77f9f51b80270df3
[ "Apache-2.0" ]
119
2021-04-13T11:42:01.000Z
2022-02-24T10:02:35.000Z
pystac_client/stac_api_io.py
ocefpaf/pystac-client
ddf0e0566b2b1783a4d32d3d77f9f51b80270df3
[ "Apache-2.0" ]
14
2021-04-13T19:00:19.000Z
2022-02-23T09:17:30.000Z
from copy import deepcopy import json import logging from typing import ( Any, Dict, Iterator, List, Optional, TYPE_CHECKING, Union, ) from urllib.parse import urlparse import re from requests import Request, Session import pystac from pystac.link import Link from pystac.serialization impor...
41.25283
117
0.589005
from copy import deepcopy import json import logging from typing import ( Any, Dict, Iterator, List, Optional, TYPE_CHECKING, Union, ) from urllib.parse import urlparse import re from requests import Request, Session import pystac from pystac.link import Link from pystac.serialization impor...
true
true
1c3ff4337d079b6133dc0b44d79eca6a3b4a2637
1,919
py
Python
scrap_from_cusat.py
abinshoby/Malayalam-word-net
c7c3f5915d9fc59f96a381c2d35a65f6bbdd3b43
[ "MIT" ]
null
null
null
scrap_from_cusat.py
abinshoby/Malayalam-word-net
c7c3f5915d9fc59f96a381c2d35a65f6bbdd3b43
[ "MIT" ]
null
null
null
scrap_from_cusat.py
abinshoby/Malayalam-word-net
c7c3f5915d9fc59f96a381c2d35a65f6bbdd3b43
[ "MIT" ]
null
null
null
#from cusat using api # -*- coding: utf-8 -*- import requests import csv import sqlite3 import json from sqlite3 import Error import unicodedata def add_to_csv(l): f = open('test6_cusat.csv',"a") csv_file = csv.writer(f) l = json.loads(l) csv_file.writerow([str(l[0]['sid']), l[0]['synset'] ,l[0]['meanin...
24.922078
161
0.581553
import requests import csv import sqlite3 import json from sqlite3 import Error import unicodedata def add_to_csv(l): f = open('test6_cusat.csv',"a") csv_file = csv.writer(f) l = json.loads(l) csv_file.writerow([str(l[0]['sid']), l[0]['synset'] ,l[0]['meaning'] , l[0]['pos']] + l[0]['hypernym'] + l[0]...
true
true
1c3ff4ce33f9efe7358a1f50a8174fa7eefaac36
8,417
py
Python
pointmvsnet/networks.py
MarcWong/PointMVSNet
b48f20f3695eb4418f522daedb60e7329eebf05f
[ "MIT" ]
419
2019-08-13T06:03:32.000Z
2022-03-29T06:26:08.000Z
pointmvsnet/networks.py
MarcWong/PointMVSNet
b48f20f3695eb4418f522daedb60e7329eebf05f
[ "MIT" ]
31
2019-08-20T19:25:14.000Z
2022-03-30T05:14:39.000Z
pointmvsnet/networks.py
MarcWong/PointMVSNet
b48f20f3695eb4418f522daedb60e7329eebf05f
[ "MIT" ]
99
2019-08-13T08:52:46.000Z
2022-03-20T08:30:22.000Z
import torch import torch.nn as nn import torch.nn.functional as F from pointmvsnet.functions.gather_knn import gather_knn from pointmvsnet.nn.conv import * class EdgeConv(nn.Module): def __init__(self, in_channels, out_channels): super(EdgeConv, self).__init__() self.conv1 = nn.Conv1d(in_channe...
40.466346
107
0.653439
import torch import torch.nn as nn import torch.nn.functional as F from pointmvsnet.functions.gather_knn import gather_knn from pointmvsnet.nn.conv import * class EdgeConv(nn.Module): def __init__(self, in_channels, out_channels): super(EdgeConv, self).__init__() self.conv1 = nn.Conv1d(in_channe...
true
true
1c3ff586b6fbef23eed4818abfd348673ee07652
2,762
py
Python
chars/hud_scripts/HUDTester.py
camsdu59/Zelda_BlenderGame
0f5d5d15bfa79e9f8ea15f0ebcb76bce92f77a21
[ "FSFAP" ]
27
2016-01-13T14:16:13.000Z
2022-01-03T05:38:44.000Z
chars/hud_scripts/HUDTester.py
camsdu59/Zelda_BlenderGame
0f5d5d15bfa79e9f8ea15f0ebcb76bce92f77a21
[ "FSFAP" ]
1
2017-04-29T00:51:26.000Z
2017-04-29T00:54:43.000Z
chars/hud_scripts/HUDTester.py
camsdu59/Zelda_BlenderGame
0f5d5d15bfa79e9f8ea15f0ebcb76bce92f77a21
[ "FSFAP" ]
14
2016-01-20T21:02:37.000Z
2020-07-19T05:47:20.000Z
from bge import logic from link_scripts.Gamepad import Gamepad from hud_scripts.MessageBox import MessageBoxMode from link_scripts.GameInit import initGame from link_scripts.PlayerInventory import * scene = logic.getCurrentScene() def test(cont): own = cont.owner inventory = scene.objects['Inventory'] if...
38.901408
307
0.658219
from bge import logic from link_scripts.Gamepad import Gamepad from hud_scripts.MessageBox import MessageBoxMode from link_scripts.GameInit import initGame from link_scripts.PlayerInventory import * scene = logic.getCurrentScene() def test(cont): own = cont.owner inventory = scene.objects['Inventory'] if...
true
true
1c3ff62f20f5327454cb556b874ff0cd2bb8a5d3
3,602
py
Python
build.py
sfaleron/march-for-science-2017-sign
9af7d41a734df1ca8f225f2fbea652169e323185
[ "Apache-2.0" ]
null
null
null
build.py
sfaleron/march-for-science-2017-sign
9af7d41a734df1ca8f225f2fbea652169e323185
[ "Apache-2.0" ]
null
null
null
build.py
sfaleron/march-for-science-2017-sign
9af7d41a734df1ca8f225f2fbea652169e323185
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function ### Copyright 2017 Christopher Fuller ### ### 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 ##...
30.525424
112
0.574958
from __future__ import print_function
true
true
1c3ff6645dcf5bed9eac830cbeb144b7de90e41f
2,667
py
Python
slap.py
LokiL/troutslapbot
ddc4b9e2e3fb37f09882ee197dadd173dcccadfb
[ "MIT" ]
null
null
null
slap.py
LokiL/troutslapbot
ddc4b9e2e3fb37f09882ee197dadd173dcccadfb
[ "MIT" ]
null
null
null
slap.py
LokiL/troutslapbot
ddc4b9e2e3fb37f09882ee197dadd173dcccadfb
[ "MIT" ]
null
null
null
#!/usr/bin/python import time import requests import sys if (len(sys.argv) < 2): print("Usage:") print(" slap.py <bot_token>") exit(1) botapi_url = 'https://api.telegram.org/bot' token = sys.argv[1] endpoint = botapi_url + token offset = 0 print(time.ctime(), ': bot started') while(True): try: ...
38.1
91
0.425197
import time import requests import sys if (len(sys.argv) < 2): print("Usage:") print(" slap.py <bot_token>") exit(1) botapi_url = 'https://api.telegram.org/bot' token = sys.argv[1] endpoint = botapi_url + token offset = 0 print(time.ctime(), ': bot started') while(True): try: method = 'getU...
true
true
1c3ff6a03a9eb1d011ed4514c214a6fdf8f75813
23,810
py
Python
src/UIOverlay.py
alexberryman/poe-archnemesis-scanner
0f274748cbde9d3ebe2e15af59e58c7bf2aa239c
[ "Apache-2.0" ]
null
null
null
src/UIOverlay.py
alexberryman/poe-archnemesis-scanner
0f274748cbde9d3ebe2e15af59e58c7bf2aa239c
[ "Apache-2.0" ]
null
null
null
src/UIOverlay.py
alexberryman/poe-archnemesis-scanner
0f274748cbde9d3ebe2e15af59e58c7bf2aa239c
[ "Apache-2.0" ]
null
null
null
from configparser import ConfigParser import keyboard import tkinter as tk import sys from win32clipboard import OpenClipboard, EmptyClipboard, SetClipboardText, CloseClipboard from typing import Dict, List, Tuple from DataClasses import PoeWindowInfo from ArchnemesisItemsMap import ArchnemesisItemsMap from ImageScann...
47.52495
216
0.663251
from configparser import ConfigParser import keyboard import tkinter as tk import sys from win32clipboard import OpenClipboard, EmptyClipboard, SetClipboardText, CloseClipboard from typing import Dict, List, Tuple from DataClasses import PoeWindowInfo from ArchnemesisItemsMap import ArchnemesisItemsMap from ImageScann...
true
true
1c3ff6b906e239981544effbc56300d40607524e
1,365
py
Python
pysynphot/test/test_spectral_element.py
lheinke/pysynphot
b4a5eda2a6227b2f5782da22140f00fc087439cb
[ "BSD-3-Clause" ]
24
2015-01-04T23:38:21.000Z
2022-02-01T00:11:07.000Z
pysynphot/test/test_spectral_element.py
lheinke/pysynphot
b4a5eda2a6227b2f5782da22140f00fc087439cb
[ "BSD-3-Clause" ]
126
2015-01-29T14:50:37.000Z
2022-02-15T01:58:13.000Z
pysynphot/test/test_spectral_element.py
lheinke/pysynphot
b4a5eda2a6227b2f5782da22140f00fc087439cb
[ "BSD-3-Clause" ]
25
2015-02-09T12:12:02.000Z
2021-09-09T13:06:54.000Z
from __future__ import absolute_import, division, print_function import numpy as np import pytest from numpy.testing import assert_allclose from ..obsbandpass import ObsBandpass from ..spectrum import ArraySpectralElement def test_sample_units(): """Test that SpectralElement.sample respects internal units.""" ...
29.673913
71
0.668864
from __future__ import absolute_import, division, print_function import numpy as np import pytest from numpy.testing import assert_allclose from ..obsbandpass import ObsBandpass from ..spectrum import ArraySpectralElement def test_sample_units(): defwave = np.linspace(0.1, 1, 10) s = ArraySpectralElement(de...
true
true
1c3ff702ef6060894785080eb31a5db45d17ab8c
1,321
py
Python
Manny.CIFAR/CIFAR/CIFARPlotter.py
MannyGrewal/Manny.CIFAR
03aefd7d89728a31e9bf6d0e44f083315816d289
[ "MIT" ]
null
null
null
Manny.CIFAR/CIFAR/CIFARPlotter.py
MannyGrewal/Manny.CIFAR
03aefd7d89728a31e9bf6d0e44f083315816d289
[ "MIT" ]
null
null
null
Manny.CIFAR/CIFAR/CIFARPlotter.py
MannyGrewal/Manny.CIFAR
03aefd7d89728a31e9bf6d0e44f083315816d289
[ "MIT" ]
null
null
null
import math import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import pylab ######################################################################## # 2017 - Manny Grewal # Purpose of this class is to visualise a list of images from the CIFAR dataset # How many columns to show...
34.763158
94
0.660106
import math import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import pylab
true
true
1c3ff7265f2af9f3b6e9631d9340493f11898d87
350
py
Python
z3py/examples/quant.5.py
rainoftime/rainoftime.github.io
d6316f153db0ed96309d81a5f32af9887c6f1a9a
[ "MIT" ]
1
2021-08-01T07:28:03.000Z
2021-08-01T07:28:03.000Z
z3py/examples/quant.5.py
rainoftime/rainoftime.github.io
d6316f153db0ed96309d81a5f32af9887c6f1a9a
[ "MIT" ]
null
null
null
z3py/examples/quant.5.py
rainoftime/rainoftime.github.io
d6316f153db0ed96309d81a5f32af9887c6f1a9a
[ "MIT" ]
null
null
null
f = Function('f', IntSort(), IntSort()) g = Function('g', IntSort(), IntSort()) a, b, c = Ints('a b c') x = Int('x') s = Solver() s.set(auto_config=False, mbqi=False) s.add( ForAll(x, f(g(x)) == x, patterns = [g(x)]), g(a) == c, g(b) == c, a != b ) # Display solver state using internal format pr...
20.588235
50
0.545714
f = Function('f', IntSort(), IntSort()) g = Function('g', IntSort(), IntSort()) a, b, c = Ints('a b c') x = Int('x') s = Solver() s.set(auto_config=False, mbqi=False) s.add( ForAll(x, f(g(x)) == x, patterns = [g(x)]), g(a) == c, g(b) == c, a != b ) print s.sexpr() print s.check()
false
true
1c3ff82c8412663f83da8432c464a6225eacbbd2
23,071
py
Python
tests/test_dataset_common.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
2
2021-01-27T15:43:23.000Z
2021-03-13T11:04:30.000Z
tests/test_dataset_common.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
null
null
null
tests/test_dataset_common.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
43.04291
168
0.635473
import glob import os import tempfile import warnings from functools import wraps from multiprocessing import Pool from typing import List, Optional from unittest import TestCase from absl.testing import parameterized from datasets import ( BuilderConfig, DatasetBuilder, DownloadConfig, ...
true
true
1c3ff83f7aed1ddf9f7b04a5468bb69fb1e9f9d7
4,389
py
Python
chia/wallet/transaction_record.py
Hydrangea-Network/hydrangea-blockchain-1.3.0
241381a87366602ab35136c49536ff6e3e84c3da
[ "Apache-2.0" ]
1
2022-03-20T14:52:23.000Z
2022-03-20T14:52:23.000Z
chia/wallet/transaction_record.py
Hydrangea-Network/hydrangea-blockchain-1.3.0
241381a87366602ab35136c49536ff6e3e84c3da
[ "Apache-2.0" ]
null
null
null
chia/wallet/transaction_record.py
Hydrangea-Network/hydrangea-blockchain-1.3.0
241381a87366602ab35136c49536ff6e3e84c3da
[ "Apache-2.0" ]
1
2022-03-20T14:51:39.000Z
2022-03-20T14:51:39.000Z
from dataclasses import dataclass from typing import List, Optional, Tuple, Dict from chia.consensus.coinbase import pool_parent_id, farmer_parent_id, timelord_parent_id from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.mempool_inclusion_sta...
42.61165
99
0.673046
from dataclasses import dataclass from typing import List, Optional, Tuple, Dict from chia.consensus.coinbase import pool_parent_id, farmer_parent_id, timelord_parent_id from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.mempool_inclusion_sta...
true
true
1c3ff86e371ed76b9e4a252ad92846827c7c3820
7,026
py
Python
venv/Lib/site-packages/sklearn/neural_network/_base.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/neural_network/_base.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/neural_network/_base.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
"""Utilities for the neural network modules """ # Author: Issam H. Laradji <issam.laradji@gmail.com> # License: BSD 3 clause import numpy as np from scipy.special import expit as logistic_sigmoid from scipy.special import xlogy def identity(X): """Simply return the input array. Parameters ...
28.104
80
0.615571
import numpy as np from scipy.special import expit as logistic_sigmoid from scipy.special import xlogy def identity(X): return X def logistic(X): return logistic_sigmoid(X, out=X) def tanh(X): return np.tanh(X, out=X) def relu(X): np.clip(X, 0, np.finfo(X.dtype).max, ou...
true
true
1c3ff8ac816503ffde423cc95cb5ce90b8da1b2e
3,424
py
Python
ptm/lda_gibbs.py
YLTsai0609/python-topic-modeling
13f6e22d31ebc581cc1bd68e1b05ec560020248d
[ "Apache-2.0" ]
null
null
null
ptm/lda_gibbs.py
YLTsai0609/python-topic-modeling
13f6e22d31ebc581cc1bd68e1b05ec560020248d
[ "Apache-2.0" ]
null
null
null
ptm/lda_gibbs.py
YLTsai0609/python-topic-modeling
13f6e22d31ebc581cc1bd68e1b05ec560020248d
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import time import numpy as np from scipy.special import gammaln from six.moves import xrange from .base import BaseGibbsParamTopicModel from .formatted_logger import formatted_logger from .utils import sampling_from_dist logger = formatted_logger("GibbsLDA") class GibbsLDA(B...
29.016949
83
0.521904
from __future__ import print_function import time import numpy as np from scipy.special import gammaln from six.moves import xrange from .base import BaseGibbsParamTopicModel from .formatted_logger import formatted_logger from .utils import sampling_from_dist logger = formatted_logger("GibbsLDA") class GibbsLDA(B...
true
true
1c3ff995ba9abf5e372fb993b2378255bd9a7db1
4,026
py
Python
model/resnet.py
RKorzeniowski/Cutout
932a612d80071dd378c568a1633c711690de8608
[ "ECL-2.0" ]
460
2017-11-30T14:36:51.000Z
2022-03-26T10:24:07.000Z
model/resnet.py
RKorzeniowski/Cutout
932a612d80071dd378c568a1633c711690de8608
[ "ECL-2.0" ]
15
2018-06-12T13:42:36.000Z
2022-02-18T01:57:52.000Z
model/resnet.py
RKorzeniowski/Cutout
932a612d80071dd378c568a1633c711690de8608
[ "ECL-2.0" ]
150
2018-01-22T14:35:16.000Z
2022-03-30T18:42:10.000Z
'''ResNet18/34/50/101/152 in Pytorch.''' import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class BasicBlock(nn.Module):...
33.831933
102
0.631148
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class BasicBlock(nn.Module): expansion = 1 def __init__(self...
true
true
1c3ffa41c6f3e5bfc799516f57d14fa6f67806a9
4,315
py
Python
vae.py
MarkintoshZ/FontTransformer
5051db0d38a4b8ae7602fb22c75c008f9f59d2d1
[ "MIT" ]
null
null
null
vae.py
MarkintoshZ/FontTransformer
5051db0d38a4b8ae7602fb22c75c008f9f59d2d1
[ "MIT" ]
null
null
null
vae.py
MarkintoshZ/FontTransformer
5051db0d38a4b8ae7602fb22c75c008f9f59d2d1
[ "MIT" ]
null
null
null
from keras.layers import Dense, Conv2D, Deconvolution2D, \ MaxPool2D, UpSampling2D, Flatten, Dropout, Reshape,\ Concatenate, Lambda from keras.models import Sequential, Model, load_model, Input from keras.losses import mse, categorical_crossentropy from keras.utils import to_categorical from keras import backen...
33.192308
78
0.689455
from keras.layers import Dense, Conv2D, Deconvolution2D, \ MaxPool2D, UpSampling2D, Flatten, Dropout, Reshape,\ Concatenate, Lambda from keras.models import Sequential, Model, load_model, Input from keras.losses import mse, categorical_crossentropy from keras.utils import to_categorical from keras import backen...
true
true
1c3ffaec1a29ef25b021b63a4fcd78bed2b78692
3,785
py
Python
thorpy/miscgui/functions.py
YannThorimbert/Torus
367b1de7b6a2751a8dd5ecbfa8946bbd6bf2e580
[ "MIT" ]
2
2019-05-29T16:17:29.000Z
2021-08-15T23:41:52.000Z
thorpy/miscgui/functions.py
YannThorimbert/Torus
367b1de7b6a2751a8dd5ecbfa8946bbd6bf2e580
[ "MIT" ]
null
null
null
thorpy/miscgui/functions.py
YannThorimbert/Torus
367b1de7b6a2751a8dd5ecbfa8946bbd6bf2e580
[ "MIT" ]
1
2019-04-22T18:42:35.000Z
2019-04-22T18:42:35.000Z
import pygame.event as pygame_event import pygame from thorpy.miscgui import constants, application, parameters def obtain_valid_painter(painter_class, **kwargs): """Returns a valid painter whose class is <painter_class>. You can try any argument you want ; only arguments existing in painter's __init__ metho...
31.280992
78
0.684808
import pygame.event as pygame_event import pygame from thorpy.miscgui import constants, application, parameters def obtain_valid_painter(painter_class, **kwargs): try: painter = painter_class(**kwargs) except TypeError: painter = painter_class() args_okay = {} for arg in kwarg...
true
true
1c3ffe0e7312e14c944b616c7e6c57c5b159664d
2,662
py
Python
mango/placedorder.py
dendisuhubdy/mango-explorer
d49294f2cd8d3521062e228013e240b193909ca8
[ "MIT" ]
null
null
null
mango/placedorder.py
dendisuhubdy/mango-explorer
d49294f2cd8d3521062e228013e240b193909ca8
[ "MIT" ]
null
null
null
mango/placedorder.py
dendisuhubdy/mango-explorer
d49294f2cd8d3521062e228013e240b193909ca8
[ "MIT" ]
null
null
null
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
40.953846
198
0.717506
import typing from decimal import Decimal from .orders import Side rder(typing.NamedTuple): id: int client_id: int side: Side @staticmethod def build_from_open_orders_data(free_slot_bits: Decimal, is_bid_bits: Decimal, order_ids: typing.Sequence[Decimal], client_order_ids: typing.Sequence[...
true
true
1c3ffe11d33e1d6f639ee0ab88dbc29ee217b249
82,816
py
Python
tools/tensorflow_docs/api_generator/parser.py
abhi13-nitb/docs
8deb998a040ecf17b8887cf568fa919e16243560
[ "Apache-2.0" ]
null
null
null
tools/tensorflow_docs/api_generator/parser.py
abhi13-nitb/docs
8deb998a040ecf17b8887cf568fa919e16243560
[ "Apache-2.0" ]
null
null
null
tools/tensorflow_docs/api_generator/parser.py
abhi13-nitb/docs
8deb998a040ecf17b8887cf568fa919e16243560
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
32.798416
118
0.676137
import ast import collections import enum import functools import inspect import itertools import json import os import re import textwrap import typing from typing import Any, Dict, List, Tuple, Iterable, NamedTuple, Optional, Union import astor from tensorflow_docs.api_generator import doc_controls...
true
true
1c3ffe2cf70624885065508ede4bcba03719650b
93
py
Python
UpDownMethods/__init__.py
codles/UpDownMethods
948e469e1d26da85ff620e566be7a104cdf33530
[ "MIT" ]
1
2016-10-31T02:16:39.000Z
2016-10-31T02:16:39.000Z
UpDownMethods/__init__.py
codles/UpDownMethods
948e469e1d26da85ff620e566be7a104cdf33530
[ "MIT" ]
null
null
null
UpDownMethods/__init__.py
codles/UpDownMethods
948e469e1d26da85ff620e566be7a104cdf33530
[ "MIT" ]
null
null
null
from plot import * from process import * from updownmethods import * from procedure import *
18.6
27
0.784946
from plot import * from process import * from updownmethods import * from procedure import *
true
true
1c3ffe2e7ff0758cfd78cf696fe6c81519bb4e70
2,660
py
Python
scripts/pulse-view/pygraphGL_multsine.py
jsheedy/biofeedback-cube
178a518d70fdf0dfa3b51226a2a97dbfa68a0543
[ "Unlicense" ]
2
2022-03-03T04:07:06.000Z
2022-03-15T15:59:20.000Z
scripts/pulse-view/pygraphGL_multsine.py
jsheedy/biofeedback-cube
178a518d70fdf0dfa3b51226a2a97dbfa68a0543
[ "Unlicense" ]
null
null
null
scripts/pulse-view/pygraphGL_multsine.py
jsheedy/biofeedback-cube
178a518d70fdf0dfa3b51226a2a97dbfa68a0543
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Animated 3D sinc function requires: 1. pyqtgraph - download from here http://www.pyqtgraph.org/ 2. pyopenGL - if you have Anaconda, run the following command >>> conda install -c anaconda pyopengl """ from pyqtgraph.Qt...
29.88764
80
0.515038
from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import pyqtgraph as pg import numpy as np import sys import time class Visualizer(object): def __init__(self): self.traces = dict() self.app = QtGui.QApplication(sys.argv) self.w = gl.GLViewWidget() ...
true
true