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
f75d2f0ce0e642abd57f7328ec6a66adc4c2630f
33
py
Python
tests/content/item/test_wells_handler.py
dlogan/pe2loaddata
4121fbab354278f4504fa8b0caabc7d3da48e91c
[ "BSD-2-Clause" ]
1
2018-02-17T00:29:55.000Z
2018-02-17T00:29:55.000Z
tests/content/item/test_wells_handler.py
dlogan/pe2loaddata
4121fbab354278f4504fa8b0caabc7d3da48e91c
[ "BSD-2-Clause" ]
18
2018-05-22T16:37:23.000Z
2022-03-16T19:24:52.000Z
tests/content/item/test_wells_handler.py
dlogan/pe2loaddata
4121fbab354278f4504fa8b0caabc7d3da48e91c
[ "BSD-2-Clause" ]
3
2021-06-11T18:25:16.000Z
2022-03-21T15:36:26.000Z
class TestWellsHandler: pass
11
23
0.757576
class TestWellsHandler: pass
true
true
f75d301687eb698350cbf67301a2f2b56e41ae28
1,212
py
Python
video_processor/frame_comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
video_processor/frame_comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
video_processor/frame_comm.py
zhiyanliu/riverrun
c426139e0b4ea0b46d74c6152ede1d2cec8f836f
[ "MIT" ]
null
null
null
import constants import frame_subscriber import frame_receiver # Income def create_receiver(): receiver_port = constants.get_meta_frame_server_port() return frame_receiver.FrameReceiver(port=receiver_port) def create_subscriber(): subscriber_port = constants.get_meta_frame_server_port() topic = cons...
33.666667
108
0.749175
import constants import frame_subscriber import frame_receiver def create_receiver(): receiver_port = constants.get_meta_frame_server_port() return frame_receiver.FrameReceiver(port=receiver_port) def create_subscriber(): subscriber_port = constants.get_meta_frame_server_port() topic = constants.get...
true
true
f75d309c11f136786ff0730400d59f3ebe594b90
6,078
py
Python
check_mq_oldest_msg_age.py
klapper/nagios-plugins-mq
0de9ef3700c671a17948c3c4148e90e9e196e985
[ "MIT" ]
1
2016-07-28T11:13:57.000Z
2016-07-28T11:13:57.000Z
check_mq_oldest_msg_age.py
klapper/nagios-plugins-mq
0de9ef3700c671a17948c3c4148e90e9e196e985
[ "MIT" ]
null
null
null
check_mq_oldest_msg_age.py
klapper/nagios-plugins-mq
0de9ef3700c671a17948c3c4148e90e9e196e985
[ "MIT" ]
1
2018-08-09T01:59:02.000Z
2018-08-09T01:59:02.000Z
#!/usr/bin/python import getopt import sys import pymqi, CMQC, CMQCFC STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 STATE_UNKNOWN = 3 STATE_STR = {STATE_OK:"OK",STATE_WARNING:"WARNING",STATE_CRITICAL:"CRITICAL",STATE_UNKNOWN:"UNKNOWN"} def usage(): print """Usage: rbh_check_mq_oldest_msg_age -H <HostName> -g...
36.178571
248
0.605627
import getopt import sys import pymqi, CMQC, CMQCFC STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 STATE_UNKNOWN = 3 STATE_STR = {STATE_OK:"OK",STATE_WARNING:"WARNING",STATE_CRITICAL:"CRITICAL",STATE_UNKNOWN:"UNKNOWN"} def usage(): print """Usage: rbh_check_mq_oldest_msg_age -H <HostName> -g <QMGRName> -q <Qu...
false
true
f75d319cbd93d1d409201894f07408dc245fcf18
21,264
py
Python
sympy/physics/wigner.py
dqnykamp/sympy
f341893eea26c7ee90be45df181eac1d21b7a541
[ "BSD-3-Clause" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
sympy/physics/wigner.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
9
2016-11-03T21:56:41.000Z
2020-08-09T19:27:37.000Z
sympy/physics/wigner.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
27
2016-10-06T16:05:32.000Z
2022-03-18T02:37:00.000Z
r""" Wigner, Clebsch-Gordan, Racah, and Gaunt coefficients Collection of functions for calculating Wigner 3j, 6j, 9j, Clebsch-Gordan, Racah as well as Gaunt coefficients exactly, all evaluating to a rational number times the square root of a rational number [Rasch03]_. Please see the description of the individual fun...
30.772793
102
0.591187
from __future__ import print_function, division from sympy import Integer, pi, sqrt, sympify _Factlist = [1] def _calc_factlist(nn): if nn >= len(_Factlist): for ii in range(len(_Factlist), int(nn + 1)): _Factlist.append(_Factlist[ii - 1] * ii) return _Factlist[:int(nn) + 1] def wigner...
true
true
f75d3252517166742bc28e06a49c2e98b3f54a45
396
py
Python
cpu_intensive.py
rahulguptakota/thermal_eavesdropping
81050ebefbc1264f54cf2120826aafb7b8c79082
[ "MIT" ]
null
null
null
cpu_intensive.py
rahulguptakota/thermal_eavesdropping
81050ebefbc1264f54cf2120826aafb7b8c79082
[ "MIT" ]
null
null
null
cpu_intensive.py
rahulguptakota/thermal_eavesdropping
81050ebefbc1264f54cf2120826aafb7b8c79082
[ "MIT" ]
null
null
null
#!/usr/bin/env python from multiprocessing import cpu_count from multiprocessing import Pool def func(temp): while True: temp = (temp ** temp ) if(temp > 5000): temp = 2 def main(): number_of_cores = cpu_count() print("Number of cores availabe is {}".format(number_of_cores)) use_cpu = 2 pool = Pool(use_...
18
64
0.689394
from multiprocessing import cpu_count from multiprocessing import Pool def func(temp): while True: temp = (temp ** temp ) if(temp > 5000): temp = 2 def main(): number_of_cores = cpu_count() print("Number of cores availabe is {}".format(number_of_cores)) use_cpu = 2 pool = Pool(use_cpu) pool.map(func, r...
true
true
f75d32a6a9f3e10f1394f7af3d22caa540e678b8
1,354
py
Python
blocks/convnormpool.py
AntixK/Neural-Blocks
018a44bbb703fc848234b95a3e604576bd9df88f
[ "MIT" ]
3
2019-07-23T12:35:50.000Z
2021-02-23T04:20:31.000Z
blocks/convnormpool.py
AntixK/Neural-Blocks
018a44bbb703fc848234b95a3e604576bd9df88f
[ "MIT" ]
null
null
null
blocks/convnormpool.py
AntixK/Neural-Blocks
018a44bbb703fc848234b95a3e604576bd9df88f
[ "MIT" ]
1
2019-07-21T06:07:12.000Z
2019-07-21T06:07:12.000Z
import torch.nn as nn from NeuralBlocks.blocks.convnorm import ConvNorm class ConvNormPool(nn.Module): """ A simply block consisting of a convolution layer, a normalization layer and a pooling layer. For example, this is the first block in the ResNet architecture. """ def __init__(self, in...
37.611111
89
0.619645
import torch.nn as nn from NeuralBlocks.blocks.convnorm import ConvNorm class ConvNormPool(nn.Module): def __init__(self, in_channels, out_channels, conv_kernel_size=3, conv_stride=1, conv_padding=1, conv_bias=False, norm='BN', pool_type='max',pool_kernel_size=2, pool...
true
true
f75d32c9b4acec0f2a85aca2944bd209b5fc3103
3,998
py
Python
parse_log.py
yman45/parse_gandi_access_logs
91895dc87d173e8426c0a2d34be12cd8d381e2e9
[ "MIT" ]
null
null
null
parse_log.py
yman45/parse_gandi_access_logs
91895dc87d173e8426c0a2d34be12cd8d381e2e9
[ "MIT" ]
null
null
null
parse_log.py
yman45/parse_gandi_access_logs
91895dc87d173e8426c0a2d34be12cd8d381e2e9
[ "MIT" ]
null
null
null
import re import smtplib from email.message import EmailMessage from collections import defaultdict from datetime import datetime, timedelta from typing import Union, List, Dict # for 3.7 we need typing.List, typing.Dict, etc... RebuiltLogLines = List[str] ResultData = Union[int, RebuiltLogLines] PerDayDict = Dict[str...
41.216495
79
0.594547
import re import smtplib from email.message import EmailMessage from collections import defaultdict from datetime import datetime, timedelta from typing import Union, List, Dict RebuiltLogLines = List[str] ResultData = Union[int, RebuiltLogLines] PerDayDict = Dict[str, ResultData] ResultDict = Dict[str, PerDayDict] F...
true
true
f75d332daaf1dd01605c45c08e8f00b0afa91723
2,379
py
Python
kibana_objects_remapper/bases/kibana_saved_object.py
shdubsh/kibana-objects-remapper
9520fbf76a5932c175f8370414459d3b8696ca27
[ "Apache-2.0" ]
null
null
null
kibana_objects_remapper/bases/kibana_saved_object.py
shdubsh/kibana-objects-remapper
9520fbf76a5932c175f8370414459d3b8696ca27
[ "Apache-2.0" ]
null
null
null
kibana_objects_remapper/bases/kibana_saved_object.py
shdubsh/kibana-objects-remapper
9520fbf76a5932c175f8370414459d3b8696ca27
[ "Apache-2.0" ]
null
null
null
""" KibanaSavedObject interface """ from abc import ABCMeta, abstractmethod class KibanaSavedObject: __metaclass__ = ABCMeta def __init__(self, data: dict): self.data = data self.type = self._get_type() self.source = self._get_source() self.title = self.source['title'] ...
24.525773
80
0.617907
from abc import ABCMeta, abstractmethod class KibanaSavedObject: __metaclass__ = ABCMeta def __init__(self, data: dict): self.data = data self.type = self._get_type() self.source = self._get_source() self.title = self.source['title'] self.metadata = self.source['kiban...
true
true
f75d33c168e927b119859707ba43bbf6add3dfb0
1,300
py
Python
main.py
Arnaud-Bdr/chess-api
3ab865d053a9f237f1b21a9bde15f9871422f41b
[ "MIT" ]
null
null
null
main.py
Arnaud-Bdr/chess-api
3ab865d053a9f237f1b21a9bde15f9871422f41b
[ "MIT" ]
null
null
null
main.py
Arnaud-Bdr/chess-api
3ab865d053a9f237f1b21a9bde15f9871422f41b
[ "MIT" ]
null
null
null
import os import platform import tornado.httpserver import tornado.ioloop from tornado.options import define, options def setup(): system = platform.system() engine_path = os.path.dirname(__file__) engine_paths = dict([ ('Darwin', 'engines/stockfish/Mac/stockfish-7-64'), ('Linux', 'engines...
32.5
92
0.685385
import os import platform import tornado.httpserver import tornado.ioloop from tornado.options import define, options def setup(): system = platform.system() engine_path = os.path.dirname(__file__) engine_paths = dict([ ('Darwin', 'engines/stockfish/Mac/stockfish-7-64'), ('Linux', 'engines...
true
true
f75d34465f644d19b6c6a81ebf1655ded5472cb0
4,359
py
Python
python/dynamixel_functions_py/dynamixel_functions.py
ROBOTIS-Leon/ManipulatorXdemo
c491a15211bdbe64cd89149b6e3a96f2744b0b93
[ "BSD-3-Clause" ]
null
null
null
python/dynamixel_functions_py/dynamixel_functions.py
ROBOTIS-Leon/ManipulatorXdemo
c491a15211bdbe64cd89149b6e3a96f2744b0b93
[ "BSD-3-Clause" ]
1
2016-07-11T08:51:30.000Z
2016-07-11T08:51:30.000Z
python/dynamixel_functions_py/dynamixel_functions.py
ROBOTIS-Leon/ManipulatorXdemo
c491a15211bdbe64cd89149b6e3a96f2744b0b93
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from ctypes import cdll # dxl_lib = cdll.LoadLibrary("../../c/build/win32/output/dxl_x86_c.dll") # for windows 32bit # dxl_lib = cdll.LoadLibrary("../../c/build/win64/output/dxl_x64_c.dll") # for windows 64bit dxl_lib = cdll.LoadLibrary("../../c/build/linux32/libdxl_x86_...
29.255034
94
0.847901
from ctypes import cdll dxl_lib = cdll.LoadLibrary("../../c/build/linux32/libdxl_x86_c.so") portHandler = dxl_lib.portHandler openPort = dxl_lib.openPort closePort = dxl_lib.closePort clearPort = dxl_lib.clearPort setPortName = dxl_lib.setPortName getPortName = dxl_lib.getPortName setBaudRate = dxl_lib.setB...
true
true
f75d351b80bd75a441b786ecfc5cb7538bfa1c02
65,121
py
Python
bird_view/utils/map_utils.py
seikurou/LearningByCheating
5e61f8624d79204b367479fab790b23d3af08b57
[ "MIT" ]
null
null
null
bird_view/utils/map_utils.py
seikurou/LearningByCheating
5e61f8624d79204b367479fab790b23d3af08b57
[ "MIT" ]
null
null
null
bird_view/utils/map_utils.py
seikurou/LearningByCheating
5e61f8624d79204b367479fab790b23d3af08b57
[ "MIT" ]
null
null
null
# Source: https://github.com/carla-simulator/carla import os import datetime import weakref import math import numpy as np import carla from carla import TrafficLightState as tls import pygame from pygame.locals import KMOD_CTRL from pygame.locals import KMOD_SHIFT from pygame.locals import K_COMMA from pygame.l...
43.53008
134
0.58141
import os import datetime import weakref import math import numpy as np import carla from carla import TrafficLightState as tls import pygame from pygame.locals import KMOD_CTRL from pygame.locals import KMOD_SHIFT from pygame.locals import K_COMMA from pygame.locals import K_DOWN from pygame.locals import K_ESC...
true
true
f75d352ff195b9127e3592664cfde743dddbab76
391
py
Python
azure-quantum/azure/quantum/plugins/__init__.py
jplewa/qdk-python
0c48b2a2123ca47f004e5a121c050d5908eec4f4
[ "MIT" ]
53
2021-01-21T23:38:09.000Z
2022-03-29T16:34:42.000Z
azure-quantum/azure/quantum/plugins/__init__.py
jplewa/qdk-python
0c48b2a2123ca47f004e5a121c050d5908eec4f4
[ "MIT" ]
152
2021-01-23T07:01:49.000Z
2022-03-31T19:43:21.000Z
azure-quantum/azure/quantum/plugins/__init__.py
slowy07/qdk-python
e4ce0c433cc986bc1c746e9a58f3f05733c657e2
[ "MIT" ]
47
2021-01-30T20:15:46.000Z
2022-03-25T23:35:28.000Z
## # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. ## import warnings warnings.warn( "The azure.quantum.plugins package will be deprecated. \ Please use azure.quantum.cirq and azure.quantum.qiskit instead.") ## # Copyright (c) Microsoft Corporation. All rights reserved....
27.928571
65
0.757033
import warnings warnings.warn( "The azure.quantum.plugins package will be deprecated. \ Please use azure.quantum.cirq and azure.quantum.qiskit instead.") from azure.quantum.cirq import *
true
true
f75d3544ffa19cc489ce532ee8d14ab4f09c6953
3,830
py
Python
datar/base/trig_hb.py
stjordanis/datar
4e2b5db026ad35918954576badef9951928c0cb1
[ "MIT" ]
110
2021-03-09T04:10:40.000Z
2022-03-13T10:28:20.000Z
datar/base/trig_hb.py
sthagen/datar
1218a549e2f0547c7b5a824ca6d9adf1bf96ba46
[ "MIT" ]
54
2021-06-20T18:53:44.000Z
2022-03-29T22:13:07.000Z
datar/base/trig_hb.py
sthagen/datar
1218a549e2f0547c7b5a824ca6d9adf1bf96ba46
[ "MIT" ]
11
2021-06-18T03:03:14.000Z
2022-02-25T11:48:26.000Z
"""Trigonometric and Hyperbolic Functions""" from typing import Callable import numpy from pipda import register_func from ..core.contexts import Context from ..core.types import FloatOrIter from .constants import pi def _register_trig_hb_func(name: str, np_name: str, doc: str) -> Callable: """Register trigono...
16.228814
76
0.636031
from typing import Callable import numpy from pipda import register_func from ..core.contexts import Context from ..core.types import FloatOrIter from .constants import pi def _register_trig_hb_func(name: str, np_name: str, doc: str) -> Callable: np_fun = getattr(numpy, np_name) if name.endswith("pi"): ...
true
true
f75d35554f0f54ceb44fa5f1c3bcd85389959860
1,180
py
Python
test/test_device_sla_widget_data.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
test/test_device_sla_widget_data.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
test/test_device_sla_widget_data.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
28.780488
304
0.751695
from __future__ import absolute_import import unittest import logicmonitor_sdk from logicmonitor_sdk.models.device_sla_widget_data import DeviceSLAWidgetData from logicmonitor_sdk.rest import ApiException class TestDeviceSLAWidgetData(unittest.TestCase): def setUp(self): pass def tearDown(self...
true
true
f75d35f6c45189ee48014097599d2f0655015487
2,716
py
Python
qa/rpc-tests/test_framework/coverage.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/coverage.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/coverage.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
""" This module contains utilities for doing coverage analysis on the RPC interface. It provides a way to track which RPC commands are exercised during testing. """ import os REFERENCE_FILENAME = 'rpc_interface.txt' class AuthServiceProxyWrapper(object): """ An object that wraps AuthServiceProxy to record...
26.627451
79
0.650957
import os REFERENCE_FILENAME = 'rpc_interface.txt' class AuthServiceProxyWrapper(object): def __init__(self, auth_service_proxy_instance, coverage_logfile=None): self.auth_service_proxy_instance = auth_service_proxy_instance self.coverage_logfile = coverage_logfile def __getattr__(self, *ar...
true
true
f75d36bacab7e4e5ec0cc1f18562666dfef6c868
399
py
Python
01/01.py
stevenpclark/aoc2019
a02815c751a2cb2eea2b7648795ed7c6cf41190f
[ "MIT" ]
null
null
null
01/01.py
stevenpclark/aoc2019
a02815c751a2cb2eea2b7648795ed7c6cf41190f
[ "MIT" ]
null
null
null
01/01.py
stevenpclark/aoc2019
a02815c751a2cb2eea2b7648795ed7c6cf41190f
[ "MIT" ]
null
null
null
def calc_fuel(mass, recurse=True): n = mass/3-2 if n <= 0: return 0 elif recurse: return n + calc_fuel(n) else: return n def solve(recurse=True): total = 0 with open('input.txt') as f: for li in f: total += calc_fuel(int(li), recurse) print(total)...
19
48
0.558897
def calc_fuel(mass, recurse=True): n = mass/3-2 if n <= 0: return 0 elif recurse: return n + calc_fuel(n) else: return n def solve(recurse=True): total = 0 with open('input.txt') as f: for li in f: total += calc_fuel(int(li), recurse) print(total)...
true
true
f75d3870bd72074bc7de490bc3c32db19bafa243
1,520
py
Python
simple_linear_regression_template.py
Skywalker-official/Salary-vs-Experience-Prediction-SLR-
e55167f29e91111f716bab2b6f7f23e6efb50827
[ "MIT" ]
2
2018-12-28T02:01:09.000Z
2018-12-29T12:08:48.000Z
simple_linear_regression_template.py
Skywalker-official/Salary-vs-Experience-Prediction-SLR-
e55167f29e91111f716bab2b6f7f23e6efb50827
[ "MIT" ]
null
null
null
simple_linear_regression_template.py
Skywalker-official/Salary-vs-Experience-Prediction-SLR-
e55167f29e91111f716bab2b6f7f23e6efb50827
[ "MIT" ]
6
2019-02-27T18:13:02.000Z
2021-07-15T10:56:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 28 04:56:05 2018 @author: skywalker """ # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Salary_Data.csv') X = dataset.iloc[:, :-1].values y = dataset.i...
28.679245
92
0.757237
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('Salary_Data.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, 1].values from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 1/3, random_state = ...
true
true
f75d38fe45191992f19ed7496c1d5a2efe06562f
799
py
Python
TD2/Server/get_html.py
Natsukooh/eiin839
ec56a76ecc2a49794c46dfad496c97aa6c2338de
[ "MIT" ]
null
null
null
TD2/Server/get_html.py
Natsukooh/eiin839
ec56a76ecc2a49794c46dfad496c97aa6c2338de
[ "MIT" ]
null
null
null
TD2/Server/get_html.py
Natsukooh/eiin839
ec56a76ecc2a49794c46dfad496c97aa6c2338de
[ "MIT" ]
null
null
null
import sys def main(): operations = { "add": lambda a, b: a + b, "substract": lambda a, b: a - b, "multiply": lambda a, b: a * b } result = "" args = [] for i in range(1, len(sys.argv)): if sys.argv[i] != "undefined": args.append(sys.argv[i]) if len(args) == 0: result = "U...
21.594595
80
0.563204
import sys def main(): operations = { "add": lambda a, b: a + b, "substract": lambda a, b: a - b, "multiply": lambda a, b: a * b } result = "" args = [] for i in range(1, len(sys.argv)): if sys.argv[i] != "undefined": args.append(sys.argv[i]) if len(args) == 0: result = "U...
true
true
f75d3900b9a81dd14a41a436fd76bd4ab2af5380
1,339
py
Python
app/core/tests/test_admin.py
SakibAbrar/food-recipe-app-api
92ec79b9e99d3a84bd0cf4c0db1ccddd719860e6
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
SakibAbrar/food-recipe-app-api
92ec79b9e99d3a84bd0cf4c0db1ccddd719860e6
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
SakibAbrar/food-recipe-app-api
92ec79b9e99d3a84bd0cf4c0db1ccddd719860e6
[ "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@gmail.com', ...
31.139535
68
0.637043
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@gmail.com', ...
true
true
f75d393d7e69b7c9d39d1b5df2350ebf29974573
1,529
py
Python
valence/api/controllers/v1/storages.py
mshubian/valence
d65d74858051d2f63fd2f9109c3c5dc863ff193c
[ "Apache-1.1" ]
null
null
null
valence/api/controllers/v1/storages.py
mshubian/valence
d65d74858051d2f63fd2f9109c3c5dc863ff193c
[ "Apache-1.1" ]
null
null
null
valence/api/controllers/v1/storages.py
mshubian/valence
d65d74858051d2f63fd2f9109c3c5dc863ff193c
[ "Apache-1.1" ]
null
null
null
# Copyright (c) 2016 Intel, 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...
33.977778
78
0.705036
from oslo_config import cfg from oslo_log import log as logging import pecan from pecan import expose from pecan import request from valence.controller import api as controller_api CONF = cfg.CONF LOG = logging.getLogger(__name__) class StoragesController(object): def __init__(self, *args, **kwargs): s...
true
true
f75d3c089a89a7dee6f819765c84f2e6b70e76e2
6,566
py
Python
tests/integration/test_service.py
neuro-inc/platform-secrets
6760cbd14ed71f60f7b4522ef0cc382cf81ebc0e
[ "Apache-2.0" ]
null
null
null
tests/integration/test_service.py
neuro-inc/platform-secrets
6760cbd14ed71f60f7b4522ef0cc382cf81ebc0e
[ "Apache-2.0" ]
null
null
null
tests/integration/test_service.py
neuro-inc/platform-secrets
6760cbd14ed71f60f7b4522ef0cc382cf81ebc0e
[ "Apache-2.0" ]
null
null
null
import base64 import pytest from neuro_auth_client import User from platform_secrets.kube_client import KubeClient from platform_secrets.service import Secret, SecretNotFound, Service from tests.integration.conftest import random_name class TestService: @pytest.fixture def service(self, kube_client: KubeCl...
39.554217
88
0.634785
import base64 import pytest from neuro_auth_client import User from platform_secrets.kube_client import KubeClient from platform_secrets.service import Secret, SecretNotFound, Service from tests.integration.conftest import random_name class TestService: @pytest.fixture def service(self, kube_client: KubeCl...
true
true
f75d3c6f1c6ad0349fe1d4fb8e4285ac6df2ff51
1,193
py
Python
sisgep1/base.py
ArthurPBressan/sisgep1
d11151353b895a1a7b7673f90248ea3a0c209da6
[ "MIT" ]
null
null
null
sisgep1/base.py
ArthurPBressan/sisgep1
d11151353b895a1a7b7673f90248ea3a0c209da6
[ "MIT" ]
null
null
null
sisgep1/base.py
ArthurPBressan/sisgep1
d11151353b895a1a7b7673f90248ea3a0c209da6
[ "MIT" ]
null
null
null
# coding: UTF-8 from __future__ import absolute_import from datetime import datetime from flask import current_app from flask.json import JSONEncoder from flask.ext.assets import Environment from flask.ext.migrate import Migrate from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() class JSONSerializationM...
24.346939
72
0.663034
from __future__ import absolute_import from datetime import datetime from flask import current_app from flask.json import JSONEncoder from flask.ext.assets import Environment from flask.ext.migrate import Migrate from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() class JSONSerializationMixin(object): ...
true
true
f75d3dffbb3a762890fa0d423c537562f1cf8f18
6,958
py
Python
browserhistory.py
encima/browserhistory
9fec355db00c049a1d59f5a14376684927f97cb0
[ "MIT" ]
null
null
null
browserhistory.py
encima/browserhistory
9fec355db00c049a1d59f5a14376684927f97cb0
[ "MIT" ]
null
null
null
browserhistory.py
encima/browserhistory
9fec355db00c049a1d59f5a14376684927f97cb0
[ "MIT" ]
null
null
null
import csv import os import sqlite3 import sys import platform from datetime import datetime # platform_table maps the name of user's OS to a platform code platform_table = { 'linux': 0, 'linux2': 0, 'darwin': 1, 'cygwin': 2, 'win32': 2, } # it supports Linux, MacOS, a...
42.169697
158
0.621443
import csv import os import sqlite3 import sys import platform from datetime import datetime platform_table = { 'linux': 0, 'linux2': 0, 'darwin': 1, 'cygwin': 2, 'win32': 2, } # it supports Linux, MacOS, and Windows platforms. try: user_platformcode = platform_tab...
true
true
f75d3eb313280d7b1c0afe88dc0e7029b7cfdc89
60,252
py
Python
home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py
qwertzy-antonio-godinho/dots
65cd657f785e7da3a3ccb1a808c0fc1b8496e5b1
[ "Apache-2.0" ]
6
2021-12-26T13:34:32.000Z
2022-02-08T22:09:38.000Z
src/ptvsd/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py
ev3dev/ptvsd
cea22767dd78a812a14e2330a540a368f615224e
[ "MIT" ]
12
2015-10-30T19:20:28.000Z
2021-04-23T15:59:58.000Z
src/ptvsd/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py
ev3dev/ptvsd
cea22767dd78a812a14e2330a540a368f615224e
[ "MIT" ]
5
2015-09-16T07:50:06.000Z
2019-09-09T14:33:46.000Z
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 source c...
39.023316
94
0.573757
__revision__ = "$Id$" __all__ = [ 'Debug', 'MixedBitsWarning' ] import sys from winappdbg import win32 from winappdbg.system import System from winappdbg.process import Process from winappdbg.thread import Thread from winappdbg.module import Module from winappdbg.window import Window from winappdbg.b...
true
true
f75d3fbccdf01a12531790f82c3e3b4a7f3a1631
583
py
Python
test/testComment.py
jLuseno161/pitches
315245862922927752312b02c5c5e72198c33a8d
[ "MIT" ]
null
null
null
test/testComment.py
jLuseno161/pitches
315245862922927752312b02c5c5e72198c33a8d
[ "MIT" ]
null
null
null
test/testComment.py
jLuseno161/pitches
315245862922927752312b02c5c5e72198c33a8d
[ "MIT" ]
null
null
null
import unittest from app.models import Comments class CommentTest(unittest.TestCase): """ Test Class to test the behaviour of the Comment class """ def setUp(self): """ Set up method that will run before every Test """ self.comment= Comments(opinion = 'testing testing'...
22.423077
65
0.663808
import unittest from app.models import Comments class CommentTest(unittest.TestCase): def setUp(self): self.comment= Comments(opinion = 'testing testing') def tearDown(self): Comments.query.delete() def test_instance(self): self.assertTrue(isinstance(self.comment, Comments)) ...
true
true
f75d4313fc73a967cb88335bc30409721931243d
1,498
py
Python
boomerang/tests/test_apiroot.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
1
2021-12-09T10:44:47.000Z
2021-12-09T10:44:47.000Z
boomerang/tests/test_apiroot.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
34
2017-05-04T00:16:18.000Z
2020-06-05T17:09:20.000Z
boomerang/tests/test_apiroot.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
1
2021-09-22T08:12:24.000Z
2021-09-22T08:12:24.000Z
from django.test import TestCase from django.urls import reverse from rest_framework.test import RequestsClient class TestApiRoot(TestCase): url = reverse('index') def test_allows_unauthenticated(self): response = self.client.get(self.url) self.assertTrue(response.status_code < 400) def...
35.666667
143
0.70761
from django.test import TestCase from django.urls import reverse from rest_framework.test import RequestsClient class TestApiRoot(TestCase): url = reverse('index') def test_allows_unauthenticated(self): response = self.client.get(self.url) self.assertTrue(response.status_code < 400) def...
true
true
f75d433b0e922f73fa6041a41405f69f778366dc
150
py
Python
spider/helper/prettyprint.py
xiaodongxiexie/movieNeo4j
db797df0b99c5c15e40527bcd1d4b4f55ec8912a
[ "MIT" ]
null
null
null
spider/helper/prettyprint.py
xiaodongxiexie/movieNeo4j
db797df0b99c5c15e40527bcd1d4b4f55ec8912a
[ "MIT" ]
null
null
null
spider/helper/prettyprint.py
xiaodongxiexie/movieNeo4j
db797df0b99c5c15e40527bcd1d4b4f55ec8912a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: xiaodong # @Date : 2021/8/28 import json def pp(out): print(json.dumps(out, indent=2, ensure_ascii=False))
15
56
0.626667
import json def pp(out): print(json.dumps(out, indent=2, ensure_ascii=False))
true
true
f75d4396f96236472ae731ad024c134167bc0e4f
4,568
py
Python
core/dr_utils/dib_renderer_x/renderer/texrender_batch.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
90
2020-08-15T16:14:45.000Z
2022-01-22T10:24:13.000Z
core/dr_utils/dib_renderer_x/renderer/texrender_batch.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
11
2020-09-07T17:31:18.000Z
2021-11-25T12:07:30.000Z
core/dr_utils/dib_renderer_x/renderer/texrender_batch.py
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
408330a9c7d7010a5af0a5b0b469f1ef695d18de
[ "Apache-2.0" ]
13
2020-09-03T04:25:50.000Z
2021-12-23T08:23:33.000Z
from __future__ import print_function from __future__ import division from ..rasterizer import linear_rasterizer from ..utils import datanormalize from .fragment_shaders.frag_tex import fragmentshader from .vertex_shaders.perpsective import perspective_projection import torch import torch.nn as nn import numpy as np ...
39.042735
118
0.55648
from __future__ import print_function from __future__ import division from ..rasterizer import linear_rasterizer from ..utils import datanormalize from .fragment_shaders.frag_tex import fragmentshader from .vertex_shaders.perpsective import perspective_projection import torch import torch.nn as nn import numpy as np ...
true
true
f75d4448837bfb93995918d0ff59a7247a02cc9b
1,144
py
Python
spacy/lang/uk/examples.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
22,040
2016-10-03T11:58:15.000Z
2022-03-31T21:08:19.000Z
spacy/lang/uk/examples.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
6,927
2016-10-03T13:11:11.000Z
2022-03-31T17:01:25.000Z
spacy/lang/uk/examples.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
4,403
2016-10-04T03:36:33.000Z
2022-03-31T14:12:34.000Z
""" Example sentences to test spaCy and its language models. >>> from spacy.lang.uk.examples import sentences >>> docs = nlp.pipe(sentences) """ sentences = [ "Ніч на середу буде морозною.", "Чим кращі книги ти читав, тим гірше спиш.", # Serhiy Zhadan "Найстаріші ґудзики, відомі людству, археологи знайш...
57.2
261
0.749126
sentences = [ "Ніч на середу буде морозною.", "Чим кращі книги ти читав, тим гірше спиш.", "Найстаріші ґудзики, відомі людству, археологи знайшли в долині ріки Інд.", "Слов'янське слово «Україна» вперше згадується у Київському літописному зводі за Іпатіївським списком під 1187 роком.", # wikipedia ...
true
true
f75d459a0316144e4cd21c46a7a427a92ee111b8
3,868
py
Python
src/metadata/features.py
maximecharpentierdata/link-prediction
0c68ba7047b233c193541125711bdbf75b639907
[ "MIT" ]
null
null
null
src/metadata/features.py
maximecharpentierdata/link-prediction
0c68ba7047b233c193541125711bdbf75b639907
[ "MIT" ]
null
null
null
src/metadata/features.py
maximecharpentierdata/link-prediction
0c68ba7047b233c193541125711bdbf75b639907
[ "MIT" ]
null
null
null
from typing import List, Tuple import networkx as nx import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from tqdm import tqdm # Metadata based features def metadata_features_extractor( graph: nx.Graph, samples: List[Tuple[str, str]], path: str ) -> np.ndarray: ...
29.526718
88
0.641675
from typing import List, Tuple import networkx as nx import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from tqdm import tqdm def metadata_features_extractor( graph: nx.Graph, samples: List[Tuple[str, str]], path: str ) -> np.ndarray: feature_vector = [] df...
true
true
f75d45f9c5d0de212de2f63603282d3ba1993815
5,864
py
Python
posts/032016/BatchProcessingOpenCV.py
ytirahc/mobile-dev-trek
336602fbc6f91776b6a3e8b845dc2c87d5f4e592
[ "Apache-2.0" ]
2
2020-10-06T06:44:51.000Z
2020-10-06T06:48:40.000Z
posts/032016/BatchProcessingOpenCV.py
ytirahc/mobile-dev-trek
336602fbc6f91776b6a3e8b845dc2c87d5f4e592
[ "Apache-2.0" ]
null
null
null
posts/032016/BatchProcessingOpenCV.py
ytirahc/mobile-dev-trek
336602fbc6f91776b6a3e8b845dc2c87d5f4e592
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # ------------------------------------------------------------------------------------- # # Copyright (c) 2016, ytirahc, www.mobiledevtrek.com # All rights reserved. Copyright holder cannot be held liable for any damages. # # Distributed under the Apache License (ASL). # http://www.ap...
35.325301
239
0.680423
import os import numpy as np import cv2 def SoftLight(inTopImg,inBottomImg): topImgArray = np.asarray(inTopImg) / 255.0 bottomImgArray = np.asarray(inBottomImg) / 255.0 softLightImgArray = SoftLightF(topImgArray, bottomImgArray) softLightImgArray = softLightI...
true
true
f75d461d4ed1d50900740ff106f98e5cd1797eeb
1,208
py
Python
src/dots.py
XxHundredShellsxX/zelda-paint
fac12b66b0028dbc4e9435b61e7d573a7f27ff24
[ "MIT" ]
null
null
null
src/dots.py
XxHundredShellsxX/zelda-paint
fac12b66b0028dbc4e9435b61e7d573a7f27ff24
[ "MIT" ]
null
null
null
src/dots.py
XxHundredShellsxX/zelda-paint
fac12b66b0028dbc4e9435b61e7d573a7f27ff24
[ "MIT" ]
2
2017-09-27T03:34:25.000Z
2020-09-01T17:51:13.000Z
from math import * from random import* from pygame import* x=800 y=600 size= width, height = x, y screen = display.set_mode(size) screen.fill((255,255,255)) running=True while running: for evnt in event.get(): if evnt.type == QUIT: running = False mx,my=mouse.get_pos()#mouse position ...
36.606061
103
0.550497
from math import * from random import* from pygame import* x=800 y=600 size= width, height = x, y screen = display.set_mode(size) screen.fill((255,255,255)) running=True while running: for evnt in event.get(): if evnt.type == QUIT: running = False mx,my=mouse.get_pos() mb=mouse.ge...
true
true
f75d465c233f7a127edb2c3fd98260011bcb5f3c
609
py
Python
oops_fhir/r4/value_set/contract_type_codes.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/contract_type_codes.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/contract_type_codes.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.contract_type_codes import ( ContractTypeCodes as ContractTypeCodes_, ) __all__ = ["ContractTypeCodes"] _resource = _ValueSet.parse_file(Path(__file__).with_su...
19.645161
69
0.740558
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.contract_type_codes import ( ContractTypeCodes as ContractTypeCodes_, ) __all__ = ["ContractTypeCodes"] _resource = _ValueSet.parse_file(Path(__file__).with_su...
true
true
f75d47714dc545c4ab9179cba62ecd7a597b9d8b
3,040
py
Python
tests/providers/google/cloud/sensors/test_bigquery_dts.py
robertoea/airflow
e0389c0d476ebf24ca795962e087f5c678c6c416
[ "Apache-2.0" ]
null
null
null
tests/providers/google/cloud/sensors/test_bigquery_dts.py
robertoea/airflow
e0389c0d476ebf24ca795962e087f5c678c6c416
[ "Apache-2.0" ]
null
null
null
tests/providers/google/cloud/sensors/test_bigquery_dts.py
robertoea/airflow
e0389c0d476ebf24ca795962e087f5c678c6c416
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
36.626506
108
0.708224
import unittest from unittest import mock from unittest.mock import MagicMock as MM import pytest from google.api_core.gapic_v1.method import DEFAULT from google.cloud.bigquery_datatransfer_v1 import TransferState from airflow.exceptions import AirflowException from airflow.providers.google.cloud.sensors.bigquery_dt...
true
true
f75d4946497b90d1d45189cf79c02cb741b3338a
502
py
Python
osf/migrations/0234_auto_20210610_1812.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf/migrations/0234_auto_20210610_1812.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf/migrations/0234_auto_20210610_1812.py
Johnetordoff/osf.io
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2021-06-10 18:12 from __future__ import unicode_literals from django.db import migrations import osf.utils.fields class Migration(migrations.Migration): dependencies = [ ('osf', '0233_auto_20210608_1816'), ] operations = [ migrati...
22.818182
80
0.641434
from __future__ import unicode_literals from django.db import migrations import osf.utils.fields class Migration(migrations.Migration): dependencies = [ ('osf', '0233_auto_20210608_1816'), ] operations = [ migrations.AddField( model_name='institution', name='deac...
true
true
f75d4968a9b8dd8517cdaf776b6bc00e412c7cea
2,971
py
Python
src/udsf/rtta.py
TU-Berlin-DIMA/ARTC
07f945d1cf976e948c9f2687a8f1a68f79e66c0c
[ "Apache-2.0" ]
null
null
null
src/udsf/rtta.py
TU-Berlin-DIMA/ARTC
07f945d1cf976e948c9f2687a8f1a68f79e66c0c
[ "Apache-2.0" ]
null
null
null
src/udsf/rtta.py
TU-Berlin-DIMA/ARTC
07f945d1cf976e948c9f2687a8f1a68f79e66c0c
[ "Apache-2.0" ]
1
2021-07-10T23:50:44.000Z
2021-07-10T23:50:44.000Z
# Contains read interval (diameter) suggestion algorithms from util.PID import PID from util.pewma import Pewma from math import * import numpy as np class IntervalSuggestion: def __init__(self): pass def next(self, time, value, t_d): raise NotImplementedError("next(...) not implemented.") ...
28.84466
98
0.552003
from util.PID import PID from util.pewma import Pewma from math import * import numpy as np class IntervalSuggestion: def __init__(self): pass def next(self, time, value, t_d): raise NotImplementedError("next(...) not implemented.") class Fixed(IntervalSuggestion): def reset(self): p...
true
true
f75d49970731351320fdf5738863d87bc2fa637f
1,464
py
Python
up_direction/game.py
ramalho/arcade_tutorial
0950e8c1694f5b35cda8a7e268609c8cbd921481
[ "Apache-2.0" ]
null
null
null
up_direction/game.py
ramalho/arcade_tutorial
0950e8c1694f5b35cda8a7e268609c8cbd921481
[ "Apache-2.0" ]
null
null
null
up_direction/game.py
ramalho/arcade_tutorial
0950e8c1694f5b35cda8a7e268609c8cbd921481
[ "Apache-2.0" ]
1
2019-03-18T11:17:22.000Z
2019-03-18T11:17:22.000Z
import arcade class MyGame(arcade.Window): def __init__(self, width, height, title, bg_color): super().__init__(width, height, title) arcade.set_background_color(bg_color) self.width = width self.height = height self.x = 0 self.y = 0 self.velocity = 1 ...
27.111111
77
0.59153
import arcade class MyGame(arcade.Window): def __init__(self, width, height, title, bg_color): super().__init__(width, height, title) arcade.set_background_color(bg_color) self.width = width self.height = height self.x = 0 self.y = 0 self.velocity = 1 ...
true
true
f75d49a595036eed4c4a4c08bd32805e54aecc1b
153,777
py
Python
saleor/graphql/account/tests/test_account.py
burhan/saleor
4e6c4fe10476508e6b5c06fb1f38f9dc1dfc81a5
[ "CC-BY-4.0" ]
1
2021-05-18T17:20:08.000Z
2021-05-18T17:20:08.000Z
saleor/graphql/account/tests/test_account.py
Niranjoyyengkhom/saleor
4e6c4fe10476508e6b5c06fb1f38f9dc1dfc81a5
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/account/tests/test_account.py
Niranjoyyengkhom/saleor
4e6c4fe10476508e6b5c06fb1f38f9dc1dfc81a5
[ "CC-BY-4.0" ]
null
null
null
import re import uuid from collections import defaultdict from datetime import timedelta from unittest.mock import ANY, MagicMock, Mock, patch from urllib.parse import urlencode import graphene import pytest from django.contrib.auth.models import Group from django.contrib.auth.tokens import default_token_generator fro...
32.401391
88
0.665295
import re import uuid from collections import defaultdict from datetime import timedelta from unittest.mock import ANY, MagicMock, Mock, patch from urllib.parse import urlencode import graphene import pytest from django.contrib.auth.models import Group from django.contrib.auth.tokens import default_token_generator fro...
true
true
f75d49d8edbde187b0b71238f82a52756d1e0f64
13,905
py
Python
test/test_Settings.py
nogebour/PereBlaiseBot
d648993780672bab53d1c5bab418054dd9e2a200
[ "Apache-2.0" ]
null
null
null
test/test_Settings.py
nogebour/PereBlaiseBot
d648993780672bab53d1c5bab418054dd9e2a200
[ "Apache-2.0" ]
6
2018-04-27T18:11:50.000Z
2018-05-04T15:14:07.000Z
test/test_Settings.py
nogebour/PereBlaiseBot
d648993780672bab53d1c5bab418054dd9e2a200
[ "Apache-2.0" ]
null
null
null
import mongomock from unittest.mock import MagicMock import src.Settings import src.CharacterDBHandler import src.Database.DbHandler import src.CharacterDBHandler import src.Error.ErrorManager import discord import datetime def test_filldata_and_init_ok(): src.Error.ErrorManager.ErrorManager().cle...
44.854839
122
0.651061
import mongomock from unittest.mock import MagicMock import src.Settings import src.CharacterDBHandler import src.Database.DbHandler import src.CharacterDBHandler import src.Error.ErrorManager import discord import datetime def test_filldata_and_init_ok(): src.Error.ErrorManager.ErrorManager().cle...
true
true
f75d4b4a93a05d56ad77feeb1bc08a4713d56daa
495
py
Python
test/test_del_group.py
galarina1880/python_training
f8fefdd484f4409cb6f43be1d791b50306e5bb2d
[ "Apache-2.0" ]
null
null
null
test/test_del_group.py
galarina1880/python_training
f8fefdd484f4409cb6f43be1d791b50306e5bb2d
[ "Apache-2.0" ]
null
null
null
test/test_del_group.py
galarina1880/python_training
f8fefdd484f4409cb6f43be1d791b50306e5bb2d
[ "Apache-2.0" ]
null
null
null
from model.group import Group from random import randrange def test_delete_some_group(app): if app.group.count() == 0: app.group.create(Group(name="test", header="headr", footer="footr")) old_groups = app.group.get_group_list() index = randrange(len(old_groups)) app.group.delete_group_by_index...
33
76
0.70303
from model.group import Group from random import randrange def test_delete_some_group(app): if app.group.count() == 0: app.group.create(Group(name="test", header="headr", footer="footr")) old_groups = app.group.get_group_list() index = randrange(len(old_groups)) app.group.delete_group_by_index...
true
true
f75d4ba3dc81fe81004b37d8c65e9a4495739051
1,725
py
Python
p3_collab-compet/MADDPG/networks/maddpg_critic_version_1.py
Brandon-HY-Lin/deep-reinforcement-learning
d809851b6f98d1089379392d4687e2acaf1c0c79
[ "MIT" ]
null
null
null
p3_collab-compet/MADDPG/networks/maddpg_critic_version_1.py
Brandon-HY-Lin/deep-reinforcement-learning
d809851b6f98d1089379392d4687e2acaf1c0c79
[ "MIT" ]
null
null
null
p3_collab-compet/MADDPG/networks/maddpg_critic_version_1.py
Brandon-HY-Lin/deep-reinforcement-learning
d809851b6f98d1089379392d4687e2acaf1c0c79
[ "MIT" ]
1
2019-12-11T06:21:57.000Z
2019-12-11T06:21:57.000Z
import torch import torch.nn as nn import torch.nn.functional as F from networks.network_utils import hidden_init class MADDPGCriticVersion1(nn.Module): def __init__(self, num_agents, state_size, action_size, fcs1_units, fc2_units, seed=0): """Initialize parameters and build model. Params ...
36.702128
91
0.60058
import torch import torch.nn as nn import torch.nn.functional as F from networks.network_utils import hidden_init class MADDPGCriticVersion1(nn.Module): def __init__(self, num_agents, state_size, action_size, fcs1_units, fc2_units, seed=0): super().__init__() self.seed = torch.manual_seed...
true
true
f75d4d85d24550fe865d7be6b9d9ebb126f3e3ca
3,435
py
Python
piplapis/data/available_data.py
waqaraqeel/piplapis-python3
81a06cda51211d1e176522b564157768e6c6294c
[ "Apache-2.0" ]
null
null
null
piplapis/data/available_data.py
waqaraqeel/piplapis-python3
81a06cda51211d1e176522b564157768e6c6294c
[ "Apache-2.0" ]
1
2017-08-17T12:24:39.000Z
2017-08-17T12:24:39.000Z
piplapis/data/available_data.py
waqaraqeel/piplapis-python3
81a06cda51211d1e176522b564157768e6c6294c
[ "Apache-2.0" ]
null
null
null
from piplapis.data.utils import Serializable class AvailableData(Serializable): children = ('basic', 'premium') def __init__(self, basic=None, premium=None, *args, **kwargs): self.basic = basic self.premium = premium def to_dict(self): d = {} if self.basic is not None an...
36.935484
108
0.609025
from piplapis.data.utils import Serializable class AvailableData(Serializable): children = ('basic', 'premium') def __init__(self, basic=None, premium=None, *args, **kwargs): self.basic = basic self.premium = premium def to_dict(self): d = {} if self.basic is not None an...
true
true
f75d4e1e2dd1ad98d99d163fc82289cf9d724333
494
py
Python
redly/redweb/consumers.py
redlytcc/redlysite
ae1f2476bf58e7bbf3b91baaf7bf1d16777ca939
[ "Apache-2.0" ]
null
null
null
redly/redweb/consumers.py
redlytcc/redlysite
ae1f2476bf58e7bbf3b91baaf7bf1d16777ca939
[ "Apache-2.0" ]
6
2020-02-11T23:30:28.000Z
2022-03-11T23:34:45.000Z
redly/redweb/consumers.py
redlytcc/redlysite
ae1f2476bf58e7bbf3b91baaf7bf1d16777ca939
[ "Apache-2.0" ]
null
null
null
from channels import Group import ast from .models import Chat def ws_add(message): print('recibida') message.reply_channel.send({'accept':True}) Group('chat').add(message.reply_channel) def ws_message(message): to_model=ast.literal_eval(message.content['text']) print(to_model) md=Chat(nome=to_model['nome'],tex...
24.7
54
0.740891
from channels import Group import ast from .models import Chat def ws_add(message): print('recibida') message.reply_channel.send({'accept':True}) Group('chat').add(message.reply_channel) def ws_message(message): to_model=ast.literal_eval(message.content['text']) print(to_model) md=Chat(nome=to_model['nome'],tex...
true
true
f75d4e24faed9441222d516727ed90dfb50f00d1
1,391
py
Python
tests/registries/test_curve_override.py
pmdaly/yearn-lens
f0f9326d9beb48c2f128d6bf9dd1b0ad9c0787fe
[ "MIT" ]
null
null
null
tests/registries/test_curve_override.py
pmdaly/yearn-lens
f0f9326d9beb48c2f128d6bf9dd1b0ad9c0787fe
[ "MIT" ]
null
null
null
tests/registries/test_curve_override.py
pmdaly/yearn-lens
f0f9326d9beb48c2f128d6bf9dd1b0ad9c0787fe
[ "MIT" ]
1
2022-02-07T05:15:48.000Z
2022-02-07T05:15:48.000Z
import brownie import pytest from brownie import ZERO_ADDRESS from ..addresses import * def test_lp_pool_override(curve_registry_override): curve_registry_override.setPoolForLp( threeCrvPoolAddress, sushiswapLpTokenAddress # random pool ) override_pool = curve_registry_override.poolByLp(sushiswa...
34.775
80
0.811646
import brownie import pytest from brownie import ZERO_ADDRESS from ..addresses import * def test_lp_pool_override(curve_registry_override): curve_registry_override.setPoolForLp( threeCrvPoolAddress, sushiswapLpTokenAddress ) override_pool = curve_registry_override.poolByLp(sushiswapLpTokenAddres...
true
true
f75d4f431eb1ddad990607ae99e1a7b5157f14a9
8,960
py
Python
themes/default/base16-spacemacs.config.py
knezi/base16-qutebrowser
d1d63d1e2f16fd03cd88ec7006c0d885da06dcb8
[ "MIT" ]
null
null
null
themes/default/base16-spacemacs.config.py
knezi/base16-qutebrowser
d1d63d1e2f16fd03cd88ec7006c0d885da06dcb8
[ "MIT" ]
null
null
null
themes/default/base16-spacemacs.config.py
knezi/base16-qutebrowser
d1d63d1e2f16fd03cd88ec7006c0d885da06dcb8
[ "MIT" ]
null
null
null
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) # Base16 qutebrowser template by theova # Spacemacs scheme by Nasser Alshammari (https://github.com/nashamri/spacemacs-theme) base00 = "#1f2022" base01 = "#282828" base02 = "#444155" base03 = "#585858" base04 = "#b8b8b8" base05 = "#a3a3a3" base06 = "#...
30.067114
95
0.771652
base00 = "#1f2022" base01 = "#282828" base02 = "#444155" base03 = "#585858" base04 = "#b8b8b8" base05 = "#a3a3a3" base06 = "#e8e8e8" base07 = "#f8f8f8" base08 = "#f2241f" base09 = "#ffa500" base0A = "#b1951d" base0B = "#67b11d" base0C = "#2d9574" base0D = "#4f97d7" base0E = "#a31db1" base0F = "#b03060" c.colors.comp...
true
true
f75d4ffa8615c70aca513877a6eef2716bad9d88
3,189
py
Python
cumulusci/tasks/salesforce/BaseRetrieveMetadata.py
mrcmac/CumulusCI
f71d06dc7950148c8c6c8fa4d19b1a221d55be2b
[ "BSD-3-Clause" ]
1
2020-08-08T03:55:21.000Z
2020-08-08T03:55:21.000Z
cumulusci/tasks/salesforce/BaseRetrieveMetadata.py
Julian88Tex/CumulusCI
82d5fab71b61fbab53c1b5fc6001452fa3f97da8
[ "BSD-3-Clause" ]
null
null
null
cumulusci/tasks/salesforce/BaseRetrieveMetadata.py
Julian88Tex/CumulusCI
82d5fab71b61fbab53c1b5fc6001452fa3f97da8
[ "BSD-3-Clause" ]
null
null
null
import functools from cumulusci.core.utils import process_bool_arg from cumulusci.tasks.salesforce import BaseSalesforceMetadataApiTask from cumulusci.utils import inject_namespace from cumulusci.utils import strip_namespace from cumulusci.utils import process_text_in_zipfile from cumulusci.utils import tokenize_names...
40.367089
295
0.601129
import functools from cumulusci.core.utils import process_bool_arg from cumulusci.tasks.salesforce import BaseSalesforceMetadataApiTask from cumulusci.utils import inject_namespace from cumulusci.utils import strip_namespace from cumulusci.utils import process_text_in_zipfile from cumulusci.utils import tokenize_names...
true
true
f75d5082d3c57904caa6ff5aac868f5f43aba08d
223
py
Python
main/SteeringVolumeFlex/Simulation/SteeringVolumeFlex.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteeringVolumeFlex/Simulation/SteeringVolumeFlex.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteeringVolumeFlex/Simulation/SteeringVolumeFlex.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
1
2021-02-26T21:50:29.000Z
2021-02-26T21:50:29.000Z
import cc3d.CompuCellSetup as CompuCellSetup from .SteeringVolumeFlexSteppables import SteeringVolumeFlexSteppable CompuCellSetup.register_steppable(steppable=SteeringVolumeFlexSteppable(frequency=1)) CompuCellSetup.run()
37.166667
85
0.896861
import cc3d.CompuCellSetup as CompuCellSetup from .SteeringVolumeFlexSteppables import SteeringVolumeFlexSteppable CompuCellSetup.register_steppable(steppable=SteeringVolumeFlexSteppable(frequency=1)) CompuCellSetup.run()
true
true
f75d514b1823f6947dcfac8530c74298f03c392c
4,780
py
Python
DataLogger_WoGUI.py
masthan549/RCT_TAXIBOT_ASSYSTEM
d896cdb2422828601170e42a91b88bbc52a80fd6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
DataLogger_WoGUI.py
masthan549/RCT_TAXIBOT_ASSYSTEM
d896cdb2422828601170e42a91b88bbc52a80fd6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
DataLogger_WoGUI.py
masthan549/RCT_TAXIBOT_ASSYSTEM
d896cdb2422828601170e42a91b88bbc52a80fd6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import datetime import csv import pprint #import wx import DataDictionary import sys ModelSpace = 30 RuleSpace = 30 RemarksSpace = 30 class DataLogger(object): # Open the file to log the data. def __init__( self, fileName, fPtr,filePath): self.__fileName = fileName self.filePtr = fPtr ...
43.853211
175
0.572385
import datetime import csv import pprint import DataDictionary import sys ModelSpace = 30 RuleSpace = 30 RemarksSpace = 30 class DataLogger(object): def __init__( self, fileName, fPtr,filePath): self.__fileName = fileName self.filePtr = fPtr csv.register_dialect('rulcheckres', del...
false
true
f75d514f5d04596b415cf0cb7851ade59a79cc3e
2,305
py
Python
compiler/bitcells/replica_bitcell_2port.py
ycyang0508/OpenRAM
54c6043cb81c51f5f4a2f77e91145545ce0ed6d6
[ "BSD-3-Clause" ]
1
2022-02-17T22:12:46.000Z
2022-02-17T22:12:46.000Z
compiler/bitcells/replica_bitcell_2port.py
ycyang0508/OpenRAM
54c6043cb81c51f5f4a2f77e91145545ce0ed6d6
[ "BSD-3-Clause" ]
null
null
null
compiler/bitcells/replica_bitcell_2port.py
ycyang0508/OpenRAM
54c6043cb81c51f5f4a2f77e91145545ce0ed6d6
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2016-2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import debug import bitcell_base from tech impor...
44.326923
113
0.701085
import debug import bitcell_base from tech import cell_properties as props from tech import parameter, drc import logical_effort class replica_bitcell_2port(bitcell_base.bitcell_base): def __init__(self, name): super().__init__(name, prop=props.bitcell_2port) debug.info(2, "Create replica bitcell...
true
true
f75d517a6a07c31ca5c2554b4265fd97ee0ba86e
6,776
py
Python
venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/attrs.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/attrs.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/attrs.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Most of this work is copyright (C) 2013-2021 David R. MacIver # (david@drmaciver.com), but it contains contributions by others. See # CONTRIBUTING.rst for a full list of people who may hold copyright, and # con...
42.35
80
0.669421
from functools import reduce from itertools import chain import attr from hypothesis import strategies as st from hypothesis.errors import ResolutionFailed from hypothesis.internal.compat import get_type_hints from hypothesis.strategies._internal.types import is_a_type, type_sorting_key from hypothesis.utils.convent...
true
true
f75d52cc5a9b1115a3ff7c07fc58ce42728ac4b3
559
py
Python
setup.py
sashgorokhov/pyqt-async
8f555d05ac9f1f1dcafc7fa9033678057b1d45bc
[ "MIT" ]
4
2018-09-07T22:37:01.000Z
2021-05-19T23:55:41.000Z
setup.py
sashgorokhov/pyqt-async
8f555d05ac9f1f1dcafc7fa9033678057b1d45bc
[ "MIT" ]
null
null
null
setup.py
sashgorokhov/pyqt-async
8f555d05ac9f1f1dcafc7fa9033678057b1d45bc
[ "MIT" ]
1
2017-08-09T13:33:14.000Z
2017-08-09T13:33:14.000Z
from distutils.core import setup with open('README.rst') as file: long_description = file.read() setup( name='pyqt-async', version='0.1', py_modules=['pyqt_async'], url='https://github.com/sashgorokhov/pyqt-async', download_url='https://github.com/sashgorokhov/pyqt-async/archive/master.zip', ...
29.421053
81
0.694097
from distutils.core import setup with open('README.rst') as file: long_description = file.read() setup( name='pyqt-async', version='0.1', py_modules=['pyqt_async'], url='https://github.com/sashgorokhov/pyqt-async', download_url='https://github.com/sashgorokhov/pyqt-async/archive/master.zip', ...
true
true
f75d5358b2ed54590cffec5fc4d6ef8da6aad328
7,154
py
Python
synapse/server.py
iot-factory/synapse
d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0
[ "Apache-2.0" ]
null
null
null
synapse/server.py
iot-factory/synapse
d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0
[ "Apache-2.0" ]
null
null
null
synapse/server.py
iot-factory/synapse
d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # 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.795556
86
0.668577
from twisted.web.client import BrowserLikePolicyForHTTPS from synapse.federation import initialize_http_replication from synapse.http.client import SimpleHttpClient, InsecureInterceptableContextFactory from synapse.notifier import Notifier from synapse.api.auth import Auth from synapse.handlers import Handlers from...
true
true
f75d53ca1d84c55defbda828708c79f2a91da7f5
3,184
py
Python
kit_django/contact/serializers.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
6
2020-06-29T20:36:15.000Z
2021-09-08T23:34:01.000Z
kit_django/contact/serializers.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
9
2021-03-30T13:46:29.000Z
2022-03-12T00:38:27.000Z
kit_django/contact/serializers.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
1
2020-07-20T18:40:24.000Z
2020-07-20T18:40:24.000Z
# # ---------------------------------------------------------------------------------------------------- # DESCRIPTION # ---------------------------------------------------------------------------------------------------- # # --------------------------------------------------------------------------------------------...
32.161616
102
0.47299
from restAPICore.serializers import ModelSerializer from contact.models import Address, Contact, Email, Phone, SocialMedia class AddressSerializer(ModelSerializer): class Meta: model = Address exclude = () read_onl...
true
true
f75d54535403a3b4666237708955b05923ca5dac
9,644
py
Python
nova/tests/virt/hyperv/test_vmutilsv2.py
yuyuyu101/nova
0f3776d036be5c2174eb848af1e312f7df35de26
[ "Apache-2.0" ]
null
null
null
nova/tests/virt/hyperv/test_vmutilsv2.py
yuyuyu101/nova
0f3776d036be5c2174eb848af1e312f7df35de26
[ "Apache-2.0" ]
null
null
null
nova/tests/virt/hyperv/test_vmutilsv2.py
yuyuyu101/nova
0f3776d036be5c2174eb848af1e312f7df35de26
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # # 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/LICE...
40.351464
79
0.642576
import mock from nova import test from nova.virt.hyperv import vmutilsv2 class VMUtilsV2TestCase(test.NoDBTestCase): _FAKE_VM_NAME = 'fake_vm' _FAKE_MEMORY_MB = 2 _FAKE_VCPUS_NUM = 4 _FAKE_JOB_PATH = 'fake_job_path' _FAKE_RET_VAL = 0 _FAKE_CTRL_PATH = 'fake_ctrl_path' _FAKE_CTRL_ADDR ...
true
true
f75d55b6ab31cf1e6fb21b15623f64ab394c5434
522
py
Python
test/conftest.py
wolfQK/CheckV-fork
3519bf4bf07fb73806225946a5629ddc542b4252
[ "BSD-3-Clause-LBNL" ]
null
null
null
test/conftest.py
wolfQK/CheckV-fork
3519bf4bf07fb73806225946a5629ddc542b4252
[ "BSD-3-Clause-LBNL" ]
null
null
null
test/conftest.py
wolfQK/CheckV-fork
3519bf4bf07fb73806225946a5629ddc542b4252
[ "BSD-3-Clause-LBNL" ]
null
null
null
import shutil import pytest def pytest_addoption(parser): parser.addoption("--database", action="store", help="Path to CheckV's database") parser.addoption( "--threads", default=1, type=int, action="store", help="Threads to use" ) @pytest.fixture def database(request): return request.config...
20.88
84
0.712644
import shutil import pytest def pytest_addoption(parser): parser.addoption("--database", action="store", help="Path to CheckV's database") parser.addoption( "--threads", default=1, type=int, action="store", help="Threads to use" ) @pytest.fixture def database(request): return request.config...
true
true
f75d560e602ecacff61274adaa5bf80e262f5608
6,626
py
Python
src/task3/1_hindi_bengali_bilstm_sa_jdil/bengali_data.py
shahrukhx01/nnti_hindi_bengali_sentiment_analysis
94cd0c335e5ff592a2b09f95adc183dac2b54d9f
[ "MIT" ]
null
null
null
src/task3/1_hindi_bengali_bilstm_sa_jdil/bengali_data.py
shahrukhx01/nnti_hindi_bengali_sentiment_analysis
94cd0c335e5ff592a2b09f95adc183dac2b54d9f
[ "MIT" ]
null
null
null
src/task3/1_hindi_bengali_bilstm_sa_jdil/bengali_data.py
shahrukhx01/nnti_hindi_bengali_sentiment_analysis
94cd0c335e5ff592a2b09f95adc183dac2b54d9f
[ "MIT" ]
1
2021-09-10T20:57:53.000Z
2021-09-10T20:57:53.000Z
import pandas as pd import numpy as np from bengali_preprocess import Preprocess import logging import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler from bengali_dataset import BengaliDataset logging.basicConfig(level=logging.INFO) """ For loading Bengali data l...
49.447761
139
0.674917
import pandas as pd import numpy as np from bengali_preprocess import Preprocess import logging import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler from bengali_dataset import BengaliDataset logging.basicConfig(level=logging.INFO) class BengaliData: def __i...
true
true
f75d56b28f9df82e7db594cb742922ef7fc668a4
397
py
Python
app/models/users.py
pyVarad/fast-api-auth0-recepie
453a1e05b76cb10829a4991ce60a1a0afb112803
[ "Apache-2.0" ]
null
null
null
app/models/users.py
pyVarad/fast-api-auth0-recepie
453a1e05b76cb10829a4991ce60a1a0afb112803
[ "Apache-2.0" ]
null
null
null
app/models/users.py
pyVarad/fast-api-auth0-recepie
453a1e05b76cb10829a4991ce60a1a0afb112803
[ "Apache-2.0" ]
null
null
null
""" UserModel """ from sqlalchemy import Column, Integer, String from sqlalchemy.orm import relationship from db.database import Base class UserModel(Base): __tablename__ = "users" _id = Column(Integer, primary_key=True, autoincrement=True) username = Column(String(50), unique=True) group = Column(S...
24.8125
65
0.732997
from sqlalchemy import Column, Integer, String from sqlalchemy.orm import relationship from db.database import Base class UserModel(Base): __tablename__ = "users" _id = Column(Integer, primary_key=True, autoincrement=True) username = Column(String(50), unique=True) group = Column(String(50)) ans...
true
true
f75d57004cbf85cf4012b9c141e16797c91cd91b
10,911
py
Python
venv/Lib/site-packages/behave/api/async_step.py
Jason-3350/flaskProject_YingLiang
c64f1c9e9b6b19a909a75982a3cdbe8ca797a277
[ "Unlicense" ]
1
2022-03-28T16:37:17.000Z
2022-03-28T16:37:17.000Z
venv/Lib/site-packages/behave/api/async_step.py
Jason-3350/flaskProject_YingLiang
c64f1c9e9b6b19a909a75982a3cdbe8ca797a277
[ "Unlicense" ]
4
2021-06-02T00:35:24.000Z
2022-01-13T01:47:56.000Z
venv/Lib/site-packages/behave/api/async_step.py
Jason-3350/flaskProject_YingLiang
c64f1c9e9b6b19a909a75982a3cdbe8ca797a277
[ "Unlicense" ]
1
2020-01-14T22:41:57.000Z
2020-01-14T22:41:57.000Z
# -*- coding: UTF-8 -*- # pylint: disable=line-too-long """ This module provides functionality to support "async steps" (coroutines) in a step-module with behave. This functionality simplifies to test frameworks and protocols that make use of `asyncio.coroutines`_ or provide `asyncio.coroutines`_. EXAMPLE: .. code-bl...
38.419014
88
0.615067
from __future__ import print_function import functools from six import string_types try: import asyncio has_asyncio = True except ImportError: has_asyncio = False def async_run_until_complete(astep_func=None, loop=None, timeout=None, async_context=None, should_close=False): ...
true
true
f75d57b921f4ce892e2a156a0ec56205170f377f
782
py
Python
31entropy.py
Jan-Wignall/Homework
48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb
[ "MIT" ]
null
null
null
31entropy.py
Jan-Wignall/Homework
48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb
[ "MIT" ]
null
null
null
31entropy.py
Jan-Wignall/Homework
48ec6bc58bd1facf7199ed8b66bcf8fbe67315eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Write a Shannon entropy calculator: H = -sum(pi * log(pi)) # The values should come from the command line # E.g. python3 entropy.py 0.4 0.3 0.2 0.1 # Put the probabilities into a new list # Don't forget to convert them to numbers import math import sys if len(sys.argv)== 1: print('Requires N...
21.135135
65
0.677749
import math import sys if len(sys.argv)== 1: print('Requires Numerical Input (Separate Numbers with Spaces)') sys.exit probs = [] sum = 0 tolerance = 0.01 for i in range (1, len(sys.argv)): probs.append(float(sys.argv[i])) sum += float(sys.argv[i]) if abs(sum -1.0) > tolerance: print('Probabilities do not su...
true
true
f75d58d07a85730691112432a924c2d5e1fe6252
55,816
py
Python
cst_modeling/foil.py
YangYunjia/cst-modeling3d
4d997015afd12b9b049f21c4b6c3c350e9f6a91c
[ "MIT" ]
null
null
null
cst_modeling/foil.py
YangYunjia/cst-modeling3d
4d997015afd12b9b049f21c4b6c3c350e9f6a91c
[ "MIT" ]
null
null
null
cst_modeling/foil.py
YangYunjia/cst-modeling3d
4d997015afd12b9b049f21c4b6c3c350e9f6a91c
[ "MIT" ]
null
null
null
''' This is a module containing functions to construct an airfoil ''' import copy import numpy as np from numpy.linalg import lstsq from scipy import spatial from scipy.interpolate import interp1d from scipy.special import factorial from .naca import naca import matplotlib.pyplot as plt class Basic...
28.98027
115
0.524867
import copy import numpy as np from numpy.linalg import lstsq from scipy import spatial from scipy.interpolate import interp1d from scipy.special import factorial from .naca import naca import matplotlib.pyplot as plt class BasicSection(): def __init__(self, thick=None, chord=1.0, twist=0.0): ...
true
true
f75d58e8b1929f8717d98368f3cb9ce425345c04
61,303
py
Python
synapse/tests/test_lib_layer.py
enadjoe/synapse
e0d828b376915a1110468ce6590b9a9ea151848b
[ "Apache-2.0" ]
null
null
null
synapse/tests/test_lib_layer.py
enadjoe/synapse
e0d828b376915a1110468ce6590b9a9ea151848b
[ "Apache-2.0" ]
null
null
null
synapse/tests/test_lib_layer.py
enadjoe/synapse
e0d828b376915a1110468ce6590b9a9ea151848b
[ "Apache-2.0" ]
null
null
null
import os import math import asyncio import synapse.exc as s_exc import synapse.common as s_common import synapse.telepath as s_telepath import synapse.lib.time as s_time import synapse.lib.layer as s_layer import synapse.lib.msgpack as s_msgpack import synapse.tools.backup as s_tools_backup import synapse.tests.ut...
40.304405
139
0.531197
import os import math import asyncio import synapse.exc as s_exc import synapse.common as s_common import synapse.telepath as s_telepath import synapse.lib.time as s_time import synapse.lib.layer as s_layer import synapse.lib.msgpack as s_msgpack import synapse.tools.backup as s_tools_backup import synapse.tests.ut...
true
true
f75d593cc638bc8959e81ee779359c2bb78579de
682
py
Python
instaclone/email.py
morrisonGithinji/morris-Instagram
a0145452c8ea05b0d2818989c36aa409c23b3ad2
[ "MIT" ]
null
null
null
instaclone/email.py
morrisonGithinji/morris-Instagram
a0145452c8ea05b0d2818989c36aa409c23b3ad2
[ "MIT" ]
null
null
null
instaclone/email.py
morrisonGithinji/morris-Instagram
a0145452c8ea05b0d2818989c36aa409c23b3ad2
[ "MIT" ]
null
null
null
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string def send_welcome_email(name,receiver): # Creating message subject and sender subject = 'Welcome to Morrisinsta,for allyour Photo uploads and also get to view your friends photos' sender = 'morrison.githi...
45.466667
105
0.771261
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string def send_welcome_email(name,receiver): subject = 'Welcome to Morrisinsta,for allyour Photo uploads and also get to view your friends photos' sender = 'morrison.githinji@student.moringaschool.com' ...
true
true
f75d59db44e478df521e0291cc4fe2973a05849d
5,149
py
Python
tests/unit/dataactvalidator/validation_handlers/test_validationManager.py
dael-victoria-reyes/data-act-broker-backend
f83c7cad29cac24d95f45a262710dc1564de7dc1
[ "CC0-1.0" ]
1
2019-06-22T21:53:16.000Z
2019-06-22T21:53:16.000Z
tests/unit/dataactvalidator/validation_handlers/test_validationManager.py
dael-victoria-reyes/data-act-broker-backend
f83c7cad29cac24d95f45a262710dc1564de7dc1
[ "CC0-1.0" ]
null
null
null
tests/unit/dataactvalidator/validation_handlers/test_validationManager.py
dael-victoria-reyes/data-act-broker-backend
f83c7cad29cac24d95f45a262710dc1564de7dc1
[ "CC0-1.0" ]
null
null
null
from datetime import date from unittest.mock import Mock import pytest from dataactcore.config import CONFIG_BROKER from dataactcore.utils.responseException import ResponseException from dataactvalidator.validation_handlers import validationManager from dataactvalidator.validation_handlers.errorInterface import Error...
39.607692
114
0.745582
from datetime import date from unittest.mock import Mock import pytest from dataactcore.config import CONFIG_BROKER from dataactcore.utils.responseException import ResponseException from dataactvalidator.validation_handlers import validationManager from dataactvalidator.validation_handlers.errorInterface import Error...
true
true
f75d5a0d2f4ddfdc478268708ed537df7fd612e1
7,631
py
Python
test/functional/feature_assumevalid.py
barrystyle/nyc3
43a15d192e23602d2d5d97d458efbc1cb7a4da7d
[ "MIT" ]
1
2019-06-06T22:44:39.000Z
2019-06-06T22:44:39.000Z
test/functional/feature_assumevalid.py
barrystyle/nyc3
43a15d192e23602d2d5d97d458efbc1cb7a4da7d
[ "MIT" ]
null
null
null
test/functional/feature_assumevalid.py
barrystyle/nyc3
43a15d192e23602d2d5d97d458efbc1cb7a4da7d
[ "MIT" ]
3
2019-06-05T22:50:07.000Z
2021-04-19T22:59:55.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The NYC3 Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for skipping signature validation on old blocks. Test logic for skipping signature validation ...
39.744792
107
0.655222
import time from test_framework.blocktools import (create_block, create_coinbase) from test_framework.key import CECKey from test_framework.messages import ( CBlockHeader, COutPoint, CTransaction, CTxIn, CTxOut, msg_block, msg_headers ) from test_framework.mininode import P2PInterface from ...
true
true
f75d5a4c985191b400835244b4f56c21b555f752
1,526
py
Python
audits/models.py
workingyifei/supplier-portal
b6bf133d238a75f96d3c214c031df5c989aa0b81
[ "Apache-2.0" ]
null
null
null
audits/models.py
workingyifei/supplier-portal
b6bf133d238a75f96d3c214c031df5c989aa0b81
[ "Apache-2.0" ]
null
null
null
audits/models.py
workingyifei/supplier-portal
b6bf133d238a75f96d3c214c031df5c989aa0b81
[ "Apache-2.0" ]
null
null
null
from django.db import models from datetime import date # Create your models here. class Audit(models.Model): SYSTEM_CHOICE = ( ('ADAS', 'ADAS' ), ('BIW', 'BIW'), ('Chassis', 'Chassis'), ('Exterior', 'Exterior'), ('Interior', 'Interior'), ('Powertrain', 'Powertrain'...
32.468085
86
0.651376
from django.db import models from datetime import date class Audit(models.Model): SYSTEM_CHOICE = ( ('ADAS', 'ADAS' ), ('BIW', 'BIW'), ('Chassis', 'Chassis'), ('Exterior', 'Exterior'), ('Interior', 'Interior'), ('Powertrain', 'Powertrain'), ('Thermal', 'The...
true
true
f75d5a6890384089192d351f39a5d3cf23c80c2f
11,023
py
Python
nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
5
2017-06-23T07:37:39.000Z
2020-10-21T07:07:50.000Z
nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
4
2017-06-23T07:37:43.000Z
2020-12-28T09:57:22.000Z
# Copyright 2011 OpenStack Foundation # 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 requ...
37.62116
79
0.569718
import datetime import iso8601 from oslo_utils import timeutils import six import six.moves.urllib.parse as urlparse from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova.i18n import _ from nova import objects ALIAS = "os-simple-tena...
true
true
f75d5abfbf3398571889f116a8e5c54baeac8074
12,390
py
Python
nipyapi/nifi/models/version_control_information_dto.py
esecules/nipyapi
e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1
[ "Apache-2.0" ]
null
null
null
nipyapi/nifi/models/version_control_information_dto.py
esecules/nipyapi
e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1
[ "Apache-2.0" ]
null
null
null
nipyapi/nifi/models/version_control_information_dto.py
esecules/nipyapi
e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ NiFi Rest Api The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ...
30.072816
479
0.609282
from pprint import pformat from six import iteritems import re class VersionControlInformationDTO(object): swagger_types = { 'group_id': 'str', 'registry_id': 'str', 'registry_name': 'str', 'bucket_id': 'str', 'bucket_name': 'str', 'flow_id': 'str', 'fl...
true
true
f75d5c495a26900589f9ebea0ae2ff27245493d0
680
py
Python
mock_server.py
Lameaux/mock_server
c387af54d1b974ce1ed5f841de214a45d07fe901
[ "MIT" ]
null
null
null
mock_server.py
Lameaux/mock_server
c387af54d1b974ce1ed5f841de214a45d07fe901
[ "MIT" ]
null
null
null
mock_server.py
Lameaux/mock_server
c387af54d1b974ce1ed5f841de214a45d07fe901
[ "MIT" ]
null
null
null
import os import click from dotenv import load_dotenv from app import create_app dotenv_path = os.path.join(os.path.dirname(__file__), '.env') if os.path.exists(dotenv_path): load_dotenv(dotenv_path) app = create_app(os.getenv('FLASK_CONFIG') or 'default') @app.shell_context_processor def make_shell_context()...
21.935484
68
0.722059
import os import click from dotenv import load_dotenv from app import create_app dotenv_path = os.path.join(os.path.dirname(__file__), '.env') if os.path.exists(dotenv_path): load_dotenv(dotenv_path) app = create_app(os.getenv('FLASK_CONFIG') or 'default') @app.shell_context_processor def make_shell_context()...
true
true
f75d5c4bd6c81b750ba0903a9aa3812c5ec8e1ea
200
py
Python
src/pretix/plugins/statistics/urls.py
pajowu/pretix
d6985123b4528f134ead71ce0a4613c9a309fd2c
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-25T00:11:00.000Z
2020-04-25T00:11:00.000Z
src/pretix/plugins/statistics/urls.py
pajowu/pretix
d6985123b4528f134ead71ce0a4613c9a309fd2c
[ "ECL-2.0", "Apache-2.0" ]
7
2019-07-08T10:29:54.000Z
2020-01-08T17:32:07.000Z
src/pretix/plugins/statistics/urls.py
pajowu/pretix
d6985123b4528f134ead71ce0a4613c9a309fd2c
[ "ECL-2.0", "Apache-2.0" ]
1
2017-08-09T17:11:28.000Z
2017-08-09T17:11:28.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/statistics/', views.IndexView.as_view(), name='index'), ]
22.222222
103
0.625
from django.conf.urls import url from . import views urlpatterns = [ url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/statistics/', views.IndexView.as_view(), name='index'), ]
true
true
f75d5c85bdc4a6c438fd297da853a66018931e2c
9,489
py
Python
scikits/cuda/cufft.py
nouiz/scikits.cuda
371296d1f69edfa2b86073480e128e5ee1a71707
[ "BSD-3-Clause" ]
null
null
null
scikits/cuda/cufft.py
nouiz/scikits.cuda
371296d1f69edfa2b86073480e128e5ee1a71707
[ "BSD-3-Clause" ]
null
null
null
scikits/cuda/cufft.py
nouiz/scikits.cuda
371296d1f69edfa2b86073480e128e5ee1a71707
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Python interface to CUFFT functions. Note: this module does not explicitly depend on PyCUDA. """ import ctypes, platform, sys # Load library: _version_list = [6.5, 6.0, 5.5, 5.0, 4.0] if 'linux' in sys.platform: _libcufft_libname_list = ['libcufft.so'] + \ ...
32.608247
86
0.598061
import ctypes, platform, sys _version_list = [6.5, 6.0, 5.5, 5.0, 4.0] if 'linux' in sys.platform: _libcufft_libname_list = ['libcufft.so'] + \ ['libcufft.so.%s' % v for v in _version_list] elif sys.platform == 'darwin': _libcufft_libname_list = ['libcufft.dylib'] elif sys.platfo...
true
true
f75d5ca76f099bb3afe2011d477fa4d5b1928051
392
py
Python
_maintance/read_pack_list.py
TheDuriel/Moonwards-Virtual-Moon
028b3c98ff6b8d7196cf9d3145b45fe50e1a1f5a
[ "CC-BY-4.0" ]
1
2019-08-24T00:27:32.000Z
2019-08-24T00:27:32.000Z
_maintance/read_pack_list.py
TheDuriel/Moonwards-Virtual-Moon
028b3c98ff6b8d7196cf9d3145b45fe50e1a1f5a
[ "CC-BY-4.0" ]
null
null
null
_maintance/read_pack_list.py
TheDuriel/Moonwards-Virtual-Moon
028b3c98ff6b8d7196cf9d3145b45fe50e1a1f5a
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python import sys import struct fname = sys.argv[1] print("open %s" % fname) pack = open(fname, 'rb') pack.read(0x54) # Skip the empty padding file_count = struct.unpack('<I', pack.read(4))[0] name_len = struct.unpack('<I', pack.read(4))[0] for i in range(file_count): name_len = struct.unpack('<I', pac...
21.777778
49
0.668367
import sys import struct fname = sys.argv[1] print("open %s" % fname) pack = open(fname, 'rb') pack.read(0x54) file_count = struct.unpack('<I', pack.read(4))[0] name_len = struct.unpack('<I', pack.read(4))[0] for i in range(file_count): name_len = struct.unpack('<I', pack.read(4))[0] name = pack.read(name_len) ...
true
true
f75d5caf71f40f210458b85e2a678429b8d45bdb
1,715
py
Python
suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py
runtest007/dpdk_surcata_4.1.1
5abf91f483b418b5d9c2dd410b5c850d6ed95c5f
[ "MIT" ]
77
2019-06-17T07:05:07.000Z
2022-03-07T03:26:27.000Z
suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py
clockdad/DPDK_SURICATA-4_1_1
974cc9eb54b0b1ab90eff12a95617e3e293b77d3
[ "MIT" ]
22
2019-07-18T02:32:10.000Z
2022-03-24T03:39:11.000Z
suricata-4.1.4/suricata-update/suricata/update/commands/removesource.py
clockdad/DPDK_SURICATA-4_1_1
974cc9eb54b0b1ab90eff12a95617e3e293b77d3
[ "MIT" ]
49
2019-06-18T03:31:56.000Z
2022-03-13T05:23:10.000Z
# Copyright (C) 2017 Open Information Security Foundation # # You can copy, redistribute or modify this Program under the terms of # the GNU General Public License version 2 as published by the Free # Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
34.3
73
0.749271
from __future__ import print_function import os import logging from suricata.update import config from suricata.update import sources logger = logging.getLogger() def register(parser): parser.add_argument("name") parser.set_defaults(func=remove_source) def remove_source(): name = config.args().name ...
true
true
f75d5e58da3320538a63dc02c655aa153be921cd
1,520
py
Python
ros_ws/build/catkin_generated/generate_cached_setup.py
Rooholla-KhorramBakht/RaspiTrack
3c0ad5d0ad40dfb94d110fe4700fed072dd0adb4
[ "MIT" ]
null
null
null
ros_ws/build/catkin_generated/generate_cached_setup.py
Rooholla-KhorramBakht/RaspiTrack
3c0ad5d0ad40dfb94d110fe4700fed072dd0adb4
[ "MIT" ]
null
null
null
ros_ws/build/catkin_generated/generate_cached_setup.py
Rooholla-KhorramBakht/RaspiTrack
3c0ad5d0ad40dfb94d110fe4700fed072dd0adb4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import os import stat import sys # find the import for catkin's python package - either from source space or from an installed underlay if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')): sys.path.insert(0, ...
43.428571
115
0.733553
from __future__ import print_function import os import stat import sys if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')): sys.path.insert(0, os.path.join('/opt/ros/melodic/share/catkin/cmake', '..', 'python')) try: from catkin.environment_cache import generate_env...
false
true
f75d5ef67f7a9e30719e6109c1bb82394a6dbd6b
417
py
Python
docs/src/auto_spec/decorator/publish.py
dutradda/doodle
b9d3a9656e0da8230cffd462441e01b0fef19c93
[ "Unlicense" ]
34
2020-09-04T16:14:14.000Z
2022-01-29T12:18:46.000Z
docs/src/auto_spec/decorator/publish.py
dutradda/doodle
b9d3a9656e0da8230cffd462441e01b0fef19c93
[ "Unlicense" ]
6
2020-07-07T09:39:35.000Z
2021-02-04T20:00:17.000Z
docs/src/auto_spec/decorator/publish.py
dutradda/doodle
b9d3a9656e0da8230cffd462441e01b0fef19c93
[ "Unlicense" ]
2
2021-01-21T18:33:47.000Z
2021-01-31T12:41:10.000Z
# publish.py import asyncio from asyncapi import build_api_auto_spec api = build_api_auto_spec('user_events') channel_id = 'user/update' message = api.payload(channel_id, id='fake-user', name='Fake User', age=33) async def publish() -> None: await api.connect() await api.publish(channel_id, message) a...
18.954545
75
0.729017
import asyncio from asyncapi import build_api_auto_spec api = build_api_auto_spec('user_events') channel_id = 'user/update' message = api.payload(channel_id, id='fake-user', name='Fake User', age=33) async def publish() -> None: await api.connect() await api.publish(channel_id, message) await api.disc...
true
true
f75d5f2eeeabd9e8b89b7a5239eeafbbfd37d72d
4,550
py
Python
src/django_agent_trust/middleware.py
zerolab/django-agent-trust
f269f5d88bc10f427658550407d1d72d167f2ea8
[ "BSD-2-Clause" ]
null
null
null
src/django_agent_trust/middleware.py
zerolab/django-agent-trust
f269f5d88bc10f427658550407d1d72d167f2ea8
[ "BSD-2-Clause" ]
null
null
null
src/django_agent_trust/middleware.py
zerolab/django-agent-trust
f269f5d88bc10f427658550407d1d72d167f2ea8
[ "BSD-2-Clause" ]
null
null
null
from base64 import b64decode, b64encode from datetime import datetime from hashlib import md5 import json import logging from django.core.exceptions import ImproperlyConfigured from .conf import settings from .models import SESSION_TOKEN_KEY, Agent, AgentSettings logger = logging.getLogger(__name__) class AgentMi...
33.211679
101
0.635385
from base64 import b64decode, b64encode from datetime import datetime from hashlib import md5 import json import logging from django.core.exceptions import ImproperlyConfigured from .conf import settings from .models import SESSION_TOKEN_KEY, Agent, AgentSettings logger = logging.getLogger(__name__) class AgentMi...
true
true
f75d5fb7dcf284bef4b806660d336186f0bda556
672
py
Python
ulfenkarn/app.py
zer0tonin/Ulfenkarn
8bf634a9de824b9ac0e20b6f91058456ac07fd10
[ "MIT" ]
null
null
null
ulfenkarn/app.py
zer0tonin/Ulfenkarn
8bf634a9de824b9ac0e20b6f91058456ac07fd10
[ "MIT" ]
null
null
null
ulfenkarn/app.py
zer0tonin/Ulfenkarn
8bf634a9de824b9ac0e20b6f91058456ac07fd10
[ "MIT" ]
null
null
null
import asyncio import logging import yaml from discord.ext.commands import Bot from ulfenkarn.dices.cog import Dices logger = logging.getLogger(__name__) async def start_bot(config): bot = Bot(command_prefix="!", description="Warhammer Quest: Cursed City Helper") bot.add_cog(Dices(bot)) await bot.start...
24
84
0.66369
import asyncio import logging import yaml from discord.ext.commands import Bot from ulfenkarn.dices.cog import Dices logger = logging.getLogger(__name__) async def start_bot(config): bot = Bot(command_prefix="!", description="Warhammer Quest: Cursed City Helper") bot.add_cog(Dices(bot)) await bot.start...
true
true
f75d60329f18d659552a6ad0d5f1e0129cad8b62
3,783
py
Python
regionip.py
xfan1024/regionip
71837ccf1952f85ee517031303b82e00458b2b63
[ "MIT" ]
null
null
null
regionip.py
xfan1024/regionip
71837ccf1952f85ee517031303b82e00458b2b63
[ "MIT" ]
null
null
null
regionip.py
xfan1024/regionip
71837ccf1952f85ee517031303b82e00458b2b63
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import argparse import re import netaddr from os import path from urllib import request def report_progress(count, blockSize, totalSize): percent = int(count*blockSize*100/totalSize) percent = min(100, percent) print("\rUpdating: %d%%" % percent, end='', file=sys.stderr) ...
35.027778
116
0.626751
import sys import argparse import re import netaddr from os import path from urllib import request def report_progress(count, blockSize, totalSize): percent = int(count*blockSize*100/totalSize) percent = min(100, percent) print("\rUpdating: %d%%" % percent, end='', file=sys.stderr) def update(file_name): ...
true
true
f75d60f6c9fcdd9729730decbcad631e98b4dee9
8,344
py
Python
training_ac.py
breno-aberle/rl-pong-project
9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d
[ "MIT" ]
1
2021-11-16T08:41:59.000Z
2021-11-16T08:41:59.000Z
training_ac.py
breno-aberle/rl-pong-project
9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d
[ "MIT" ]
null
null
null
training_ac.py
breno-aberle/rl-pong-project
9dc0d12e4bbcdb2905d46f66e84fac6d70c7831d
[ "MIT" ]
null
null
null
import torch import gym import numpy as np import argparse import cv2 import matplotlib.pyplot as plt from agent_ac import Agent, Policy from wimblepong import Wimblepong # import wimblepong-environment import pandas as pd from PIL import Image from collections import deque import os from torch.utils.tensorboard impor...
44.382979
192
0.657958
import torch import gym import numpy as np import argparse import cv2 import matplotlib.pyplot as plt from agent_ac import Agent, Policy from wimblepong import Wimblepong import pandas as pd from PIL import Image from collections import deque import os from torch.utils.tensorboard import SummaryWriter def train(env...
true
true
f75d64734f8e302c63dcec6c694e32b27009b3cd
1,932
py
Python
tests/test_integrate_corr.py
zhaotingchen/halomod
0da45ac482f7d11cf3f6382bf19021e0344ecb7f
[ "MIT" ]
null
null
null
tests/test_integrate_corr.py
zhaotingchen/halomod
0da45ac482f7d11cf3f6382bf19021e0344ecb7f
[ "MIT" ]
null
null
null
tests/test_integrate_corr.py
zhaotingchen/halomod
0da45ac482f7d11cf3f6382bf19021e0344ecb7f
[ "MIT" ]
null
null
null
""" Simple tests for the integration scheme for ProjectedCF (thus far). Doesn't work as yet, since it tries to import the libraries from *this* folder, rather than installation (which doesn't work because the fortran code isn't installed.) """ import inspect import os #LOCATION = "/".join(os.path.dirname(os.path.abspa...
37.153846
111
0.65528
import inspect import os import sys import numpy as np from halomod import ProjectedCF from halomod.integrate_corr import projected_corr_gal from astropy.units import Mpc from mpmath import gamma,hyp2f1 hyp2f1A = np.frompyfunc(lambda a,b,c,z: float(hyp2f1(a,b,c,z)), 4, 1) def wprp_pl(rp,r0,g): return rp*(rp/r0)*...
true
true
f75d6615905d7d759a2fd7dd4443a435d28a5521
2,349
py
Python
configs/database_names.py
vsJoao/bci_project
f6ebf35b002adbf5cb83fc303b3917b06f8b56e6
[ "MIT" ]
null
null
null
configs/database_names.py
vsJoao/bci_project
f6ebf35b002adbf5cb83fc303b3917b06f8b56e6
[ "MIT" ]
null
null
null
configs/database_names.py
vsJoao/bci_project
f6ebf35b002adbf5cb83fc303b3917b06f8b56e6
[ "MIT" ]
null
null
null
"""Variáveis que caracterizam o banco de dados""" import os __all__ = [ 'f_names_train', 'f_names_test', 'ch_names', 'e_dict', 'e_classes', 'n_runs', 'base_folder', 'epoch_train_loc', 'epoch_test_loc', 'raw_folder', 'raw_fif_folder', 'csp_folder', 'features_test_folder', 'features_train_folder', 'originals...
40.5
97
0.709238
import os __all__ = [ 'f_names_train', 'f_names_test', 'ch_names', 'e_dict', 'e_classes', 'n_runs', 'base_folder', 'epoch_train_loc', 'epoch_test_loc', 'raw_folder', 'raw_fif_folder', 'csp_folder', 'features_test_folder', 'features_train_folder', 'originals_folder' ] f_names_train = ["A01T", "A02T", "A03T...
true
true
f75d662ee4aca4a771bc1fb63528f3becb8228cb
2,510
py
Python
galaxy/settings/testing.py
thadguidry/galaxy
25c1c577f3d08a798951b3e48530287dcbc07dce
[ "Apache-2.0" ]
null
null
null
galaxy/settings/testing.py
thadguidry/galaxy
25c1c577f3d08a798951b3e48530287dcbc07dce
[ "Apache-2.0" ]
null
null
null
galaxy/settings/testing.py
thadguidry/galaxy
25c1c577f3d08a798951b3e48530287dcbc07dce
[ "Apache-2.0" ]
null
null
null
# This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Ansible Galaxy is distributed in the...
28.522727
78
0.553386
import os import dj_database_url from .default import * DEBUG = True ALLOWED_HOSTS = ['*'] DATABASES = { 'default': dj_database_url.config( env='GALAXY_DB_URL', conn_max_age=None ) } assert DATABASES["default"]["USER"] != "galaxy" DATABASES['logging'] = DATABASES['default'].copy() DATABASES...
true
true
f75d66ef5b5bd7628845c69e45421f4d10058503
290
py
Python
apps/stores/manager.py
AJAkimana/py-store
f190bd5c2728ca80a1c0efcf199781ed5ca83645
[ "MIT" ]
null
null
null
apps/stores/manager.py
AJAkimana/py-store
f190bd5c2728ca80a1c0efcf199781ed5ca83645
[ "MIT" ]
3
2020-02-25T12:19:53.000Z
2021-06-10T19:52:29.000Z
apps/stores/manager.py
AJAkimana/py-store
f190bd5c2728ca80a1c0efcf199781ed5ca83645
[ "MIT" ]
null
null
null
from d2dstore.manager import BaseManager class StoreManager(BaseManager): """ Custom manager store model """ def __init__(self, *args, **kwargs): super(StoreManager, self).__init__(*args, **kwargs) def get_query_set(self): query_set = super().get_queryset() return query_set
19.333333
53
0.731034
from d2dstore.manager import BaseManager class StoreManager(BaseManager): def __init__(self, *args, **kwargs): super(StoreManager, self).__init__(*args, **kwargs) def get_query_set(self): query_set = super().get_queryset() return query_set
true
true
f75d67657e419edfe4324c8eb3f60744768812ed
522
py
Python
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/__MY_OPRIGINAL_DS/Arrays/python/sum-arr-dir/sum-arr.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
13
2021-03-11T00:25:22.000Z
2022-03-19T00:19:23.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/__MY_OPRIGINAL_DS/Arrays/python/sum-arr-dir/sum-arr.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
160
2021-04-26T19:04:15.000Z
2022-03-26T20:18:37.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/__MY_OPRIGINAL_DS/Arrays/python/sum-arr-dir/sum-arr.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
12
2021-04-26T19:43:01.000Z
2022-01-31T08:36:29.000Z
def sum_arr(n): res = 0 for x in n: res += x return res nums = [52345, 746587, 98589, 54398, 9348, 45887, 49856] test = sum_arr(nums) # sum() is Pythons built in method of adding all the elements in a list if test == sum(nums): print("Sum of arr: {}".format(test)) else: print("Func dosen'...
27.473684
168
0.662835
def sum_arr(n): res = 0 for x in n: res += x return res nums = [52345, 746587, 98589, 54398, 9348, 45887, 49856] test = sum_arr(nums) if test == sum(nums): print("Sum of arr: {}".format(test)) else: print("Func dosen't work!") # [Running] python -u "c:\0-a-A-October\00-weeks\08-my-websit...
true
true
f75d67a67e857fd16da532b5525c2391bb842cd0
12,691
py
Python
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:39:52.000Z
2021-03-21T11:39:52.000Z
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:37:33.000Z
2021-03-21T11:37:33.000Z
# Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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 ...
36.573487
79
0.550942
import webob from nova.api.openstack import common from nova.api.openstack.compute import create_backup \ as create_backup_v21 from nova.api.openstack.compute.legacy_v2.contrib import admin_actions \ as create_backup_v2 from nova import exception from nova import test from nova.tests.unit.api.openstac...
true
true
f75d67a819d938089a5e9922c0710243d8ee884e
1,067
py
Python
europython/__init__.py
arugifa/EuroPython-2018-Workshop
862e3e8c3687f0036a716c54e0ad847d695cdda9
[ "MIT" ]
8
2018-07-23T17:15:28.000Z
2019-01-24T15:05:52.000Z
europython/__init__.py
arugifa/EuroPython-2018-Workshop
862e3e8c3687f0036a716c54e0ad847d695cdda9
[ "MIT" ]
14
2018-07-23T17:31:53.000Z
2019-02-13T21:45:33.000Z
europython/__init__.py
arugifa/EuroPython-2018-Workshop
862e3e8c3687f0036a716c54e0ad847d695cdda9
[ "MIT" ]
2
2018-07-24T00:32:47.000Z
2018-07-24T08:53:51.000Z
import inspect from pathlib import Path from apistar import App, Route from apistar_sqlalchemy.components import SQLAlchemySessionComponent from apistar_sqlalchemy.event_hooks import SQLAlchemyTransactionHook from europython import api, blog from europython.config import DefaultConfig TEMPLATES_DIR = Path(__file__)....
27.358974
77
0.726336
import inspect from pathlib import Path from apistar import App, Route from apistar_sqlalchemy.components import SQLAlchemySessionComponent from apistar_sqlalchemy.event_hooks import SQLAlchemyTransactionHook from europython import api, blog from europython.config import DefaultConfig TEMPLATES_DIR = Path(__file__)....
true
true
f75d6809ac82c07c03de28b08d95ea40fca0f315
105
py
Python
talons/auth/oauth/__init__.py
swistakm/talons-oauth
5d8264f721b6118456506f3cc023ac2bde60178b
[ "Apache-2.0" ]
4
2015-04-07T10:52:25.000Z
2017-03-23T16:05:32.000Z
talons/auth/oauth/__init__.py
swistakm/talons-oauth
5d8264f721b6118456506f3cc023ac2bde60178b
[ "Apache-2.0" ]
null
null
null
talons/auth/oauth/__init__.py
swistakm/talons-oauth
5d8264f721b6118456506f3cc023ac2bde60178b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- VERSION = (0, 0, 1) # PEP 386 __version__ = ".".join([str(x) for x in VERSION])
26.25
49
0.552381
VERSION = (0, 0, 1) __version__ = ".".join([str(x) for x in VERSION])
true
true
f75d683dea3b5e93325736cbb044e4ec6d36d8f2
1,867
py
Python
server.py
MananUpadhyay/alexacast
fc4a8c849a54a50916b942542f5275848df38c83
[ "BSD-2-Clause" ]
null
null
null
server.py
MananUpadhyay/alexacast
fc4a8c849a54a50916b942542f5275848df38c83
[ "BSD-2-Clause" ]
null
null
null
server.py
MananUpadhyay/alexacast
fc4a8c849a54a50916b942542f5275848df38c83
[ "BSD-2-Clause" ]
null
null
null
# References : https://github.com/erik/alexandra import sys import alexandra import click import pychromecast device_name = None cast = None app = alexandra.Application() @click.command() @click.option('--device', help='name of chromecast device', required=True) def server(device): global cast global devi...
20.744444
74
0.688806
import sys import alexandra import click import pychromecast device_name = None cast = None app = alexandra.Application() @click.command() @click.option('--device', help='name of chromecast device', required=True) def server(device): global cast global device_name print('>> trying to connect to {}'.f...
true
true
f75d6cc12e40263f2919bcc2b8b4c516b63ad3f7
1,763
py
Python
backend/chat/migrations/0001_initial.py
A-Yu-cn/sqq
29d6127c38d7b9f7e9a8d609fc0448943118e6cb
[ "MIT" ]
null
null
null
backend/chat/migrations/0001_initial.py
A-Yu-cn/sqq
29d6127c38d7b9f7e9a8d609fc0448943118e6cb
[ "MIT" ]
null
null
null
backend/chat/migrations/0001_initial.py
A-Yu-cn/sqq
29d6127c38d7b9f7e9a8d609fc0448943118e6cb
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-16 10:50 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', fields=[ ...
32.648148
110
0.508792
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.IntegerField(primary_key=Tru...
true
true
f75d6d4327a2d773ab6adda92dd21b4e65ee6e1c
3,967
py
Python
user_credentials_test.py
timmyworldboss/Password-locker
7b62e48f5eb1649d19acfcda366df421f895e8b1
[ "MIT" ]
null
null
null
user_credentials_test.py
timmyworldboss/Password-locker
7b62e48f5eb1649d19acfcda366df421f895e8b1
[ "MIT" ]
null
null
null
user_credentials_test.py
timmyworldboss/Password-locker
7b62e48f5eb1649d19acfcda366df421f895e8b1
[ "MIT" ]
null
null
null
import unittest import pyperclip from user_credentials import User, Credential class TestUser(unittest.TestCase): ''' Test class that defines test cases for the user class behaviours. Args: unittest.TestCase: helps in creating test cases ''' def setUp(self): ''' Function to create a user account before ...
30.751938
90
0.74666
import unittest import pyperclip from user_credentials import User, Credential class TestUser(unittest.TestCase): def setUp(self): self.new_user = User('Mary','Ng\'ang\'a','pswd100') def test__init__(self): self.assertEqual(self.new_user.first_name,'Mary') self.assertEqual(self.new_user.last_name,'Ng\'ang\'a'...
true
true
f75d6db86208975c5c1a2e4b1e8f9a4652e6ec49
1,915
py
Python
cirq-google/cirq_google/engine/simulated_local_program.py
LLcat1217/Cirq
b88069f7b01457e592ad69d6b413642ef11a56b8
[ "Apache-2.0" ]
1
2022-02-02T07:13:54.000Z
2022-02-02T07:13:54.000Z
cirq-google/cirq_google/engine/simulated_local_program.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
4
2022-01-16T14:12:15.000Z
2022-02-24T03:58:46.000Z
cirq-google/cirq_google/engine/simulated_local_program.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
34.196429
84
0.714883
from typing import Optional, TYPE_CHECKING from cirq_google.engine.abstract_local_program import AbstractLocalProgram from cirq_google.engine.local_simulation_type import LocalSimulationType if TYPE_CHECKING: from cirq_google.engine.abstract_job import AbstractJob from cirq_google.engine.abstract_engine impor...
true
true
f75d6e5a3cbc904f52f5b2edb5c66eb2227ab086
2,849
py
Python
heron/dsl/src/python/reducebykeyandwindowbolt.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
1
2017-11-06T08:23:43.000Z
2017-11-06T08:23:43.000Z
heron/dsl/src/python/reducebykeyandwindowbolt.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
heron/dsl/src/python/reducebykeyandwindowbolt.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Twitter. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
39.569444
80
0.736399
import collections from heron.api.src.python import SlidingWindowBolt, Stream from heron.api.src.python.custom_grouping import ICustomGrouping class ReduceByKeyAndWindowBolt(SlidingWindowBolt): outputs = [Stream(fields=['_output_'], name='output')] FUNCTION = 'function' WINDOWDURATION = SlidingWindowBolt.WIND...
true
true
f75d6e9df540b5bd677ba5021c8d376b62f838cd
8,071
py
Python
python/paddle/fluid/tests/unittests/test_pixel_shuffle.py
OuyangChao/Paddle
cac9635a6733ffbbd816b33e21c3054e0cd81ab1
[ "Apache-2.0" ]
10
2021-05-12T07:20:32.000Z
2022-03-04T08:21:56.000Z
python/paddle/fluid/tests/unittests/test_pixel_shuffle.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
1
2021-01-25T09:40:19.000Z
2021-01-25T09:40:19.000Z
python/paddle/fluid/tests/unittests/test_pixel_shuffle.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
18
2021-05-19T08:01:49.000Z
2022-02-11T03:11:32.000Z
# Copyright (c) 2019 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...
36.686364
83
0.591253
from __future__ import print_function import unittest import numpy as np from op_test import OpTest import paddle import paddle.nn.functional as F import paddle.fluid.core as core import paddle.fluid as fluid def pixel_shuffle_np(x, up_factor, data_format="NCHW"): if data_format == "NCHW": n, c, h, w =...
true
true
f75d6ea39b666a857ecc8ab30026edd66cafef58
803
py
Python
client_apis/python/test/test_tags_page.py
alikins/galaxy-api-swaggerhub
5d6d4070cd6964c6d6217cad6743de89cf4eac24
[ "MIT" ]
null
null
null
client_apis/python/test/test_tags_page.py
alikins/galaxy-api-swaggerhub
5d6d4070cd6964c6d6217cad6743de89cf4eac24
[ "MIT" ]
3
2020-07-17T10:18:45.000Z
2022-01-22T05:24:05.000Z
client_apis/python/test/test_tags_page.py
alikins/galaxy-api-swaggerhub
5d6d4070cd6964c6d6217cad6743de89cf4eac24
[ "MIT" ]
null
null
null
# coding: utf-8 """ Galaxy 3.2 API (wip) Galaxy 3.2 API (wip) # noqa: E501 The version of the OpenAPI document: 1.2.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import openapi_client from openapi_client.models.tags_page import TagsPage...
20.075
79
0.676214
from __future__ import absolute_import import unittest import openapi_client from openapi_client.models.tags_page import TagsPage from openapi_client.rest import ApiException class TestTagsPage(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testTagsPage(sel...
true
true
f75d703bcc7a13fd1c651613c8b8f324c7a55dca
792
py
Python
venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/raw/GL/ARB/texture_gather.py
temelkirci/Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
1
2022-03-02T17:07:20.000Z
2022-03-02T17:07:20.000Z
venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/raw/GL/ARB/texture_gather.py
temelkirci/RealTime_6DOF_Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/raw/GL/ARB/texture_gather.py
temelkirci/RealTime_6DOF_Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
null
null
null
'''OpenGL extension ARB.texture_gather Automatically generated by the get_gl_extensions script, do not edit! ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_texture_gather' _DEPRECATED = False GL_MIN_PROGRAM_T...
41.684211
114
0.837121
from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_texture_gather' _DEPRECATED = False GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = constant.Constant( 'GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET', 0x8E5E ) GL_MAX_PROGRAM_TEXTURE_...
true
true
f75d70702bbab10c8906dbaebc5592c8b9e4c1df
10,337
py
Python
rlkit/rlkit/torch/sac/policies.py
martius-lab/SMORL
d23eda9d6a72baa3ab1f4d729b2e4f742e4dd9db
[ "MIT" ]
9
2021-06-16T11:15:12.000Z
2022-02-02T04:42:07.000Z
rlkit/rlkit/torch/sac/policies.py
martius-lab/SMORL
d23eda9d6a72baa3ab1f4d729b2e4f742e4dd9db
[ "MIT" ]
3
2021-08-17T08:07:44.000Z
2022-03-07T10:48:38.000Z
rlkit/rlkit/torch/sac/policies.py
martius-lab/SMORL
d23eda9d6a72baa3ab1f4d729b2e4f742e4dd9db
[ "MIT" ]
3
2021-12-09T06:48:39.000Z
2022-03-28T07:38:36.000Z
import numpy as np import torch from torch import nn from rlkit.policies.base import ExplorationPolicy, Policy from rlkit.torch.core import eval_np from rlkit.torch.distributions import TanhNormal from rlkit.torch.networks import Mlp from rlkit.torch.modules import Attention, preprocess_attention_input LOG_SIG_MAX =...
34.456667
80
0.531876
import numpy as np import torch from torch import nn from rlkit.policies.base import ExplorationPolicy, Policy from rlkit.torch.core import eval_np from rlkit.torch.distributions import TanhNormal from rlkit.torch.networks import Mlp from rlkit.torch.modules import Attention, preprocess_attention_input LOG_SIG_MAX =...
true
true
f75d70e02ed89f3f565fc6e62512d07dc1c7e649
2,443
py
Python
basecam/actor/commands/reconnect.py
sdss/baseCam
d5222f2c93df8e5b6ef894f32eca28b1cd3b3616
[ "BSD-3-Clause" ]
null
null
null
basecam/actor/commands/reconnect.py
sdss/baseCam
d5222f2c93df8e5b6ef894f32eca28b1cd3b3616
[ "BSD-3-Clause" ]
18
2020-01-13T20:57:48.000Z
2021-06-22T14:43:16.000Z
basecam/actor/commands/reconnect.py
sdss/basecam
526f8be1b7c83e087e8f78484e63ba18531dce87
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: José Sánchez-Gallego (gallegoj@uw.edu) # @Date: 2021-02-14 # @Filename: reconnect.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) import asyncio import click from basecam.exceptions import CameraConnectionError from ..tools im...
28.741176
84
0.593942
import asyncio import click from basecam.exceptions import CameraConnectionError from ..tools import get_cameras from .base import camera_parser __all__ = ["reconnect"] @camera_parser.command() @click.argument("CAMERAS", nargs=-1, type=str, required=False) @click.option( "--timeout", "-t", type=flo...
true
true
f75d70fc98e75a96a748cfa45ef6bbb06cf42efd
3,458
py
Python
tests/test_raw.py
jm66/home-assistant-cli
2c17482d0d02c66b43b820b1b49fcd077720de7a
[ "Apache-2.0" ]
null
null
null
tests/test_raw.py
jm66/home-assistant-cli
2c17482d0d02c66b43b820b1b49fcd077720de7a
[ "Apache-2.0" ]
null
null
null
tests/test_raw.py
jm66/home-assistant-cli
2c17482d0d02c66b43b820b1b49fcd077720de7a
[ "Apache-2.0" ]
null
null
null
"""Tests file for Home Assistant CLI (hass-cli).""" import json import unittest.mock as mocker from unittest.mock import ANY from click.testing import CliRunner import requests_mock import homeassistant_cli.autocompletion as autocompletion import homeassistant_cli.cli as cli from homeassistant_cli.config import Confi...
27.015625
75
0.569983
import json import unittest.mock as mocker from unittest.mock import ANY from click.testing import CliRunner import requests_mock import homeassistant_cli.autocompletion as autocompletion import homeassistant_cli.cli as cli from homeassistant_cli.config import Configuration def test_raw_get() -> None: with requ...
true
true
f75d7154f023667a4ec3d1811a1a2b530da5b1ad
1,956
py
Python
Programa/persistencia/peranalisis.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
Programa/persistencia/peranalisis.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
Programa/persistencia/peranalisis.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .basededatos import BaseDeDatos class PerAnalisis(BaseDeDatos): def obtener_uno(self, id_): """ Obtiene y retorna un objeto según el id dado. :param id_: int >= 0 :return: tuple """ if id_ >= 0: id_ = (id_,) sql ...
32.065574
80
0.542945
from .basededatos import BaseDeDatos class PerAnalisis(BaseDeDatos): def obtener_uno(self, id_): """ Obtiene y retorna un objeto según el id dado. :param id_: int >= 0 :return: tuple """ if id_ >= 0: id_ = (id_,) sql = 'SELECT * FROM reserva...
false
true
f75d715ae8127d6113b2d400dde3fccb1fd8a13a
13,555
py
Python
kmc/rates.py
LeonardoESousa/xcharge
89342cd6ad00d7a767ed8e058a3ee8037af5e52f
[ "MIT" ]
2
2021-11-11T19:19:17.000Z
2021-12-19T19:56:50.000Z
kmc/rates.py
LeonardoESousa/xcharge
89342cd6ad00d7a767ed8e058a3ee8037af5e52f
[ "MIT" ]
1
2021-10-20T17:00:05.000Z
2021-10-20T17:00:05.000Z
kmc/rates.py
LeonardoESousa/xcharge
89342cd6ad00d7a767ed8e058a3ee8037af5e52f
[ "MIT" ]
null
null
null
import numpy as np import random from kmc.particles import * epsilon_vaccum = 8.854187e-12 #Permitivity in C/Vm e = -1.60217662e-19 #Electron charge kb = 8.617e-5 #Boltzmann constant hbar = 6.582e-16 #Reduced Planck's constant ###RATES#########################...
34.935567
139
0.462929
import numpy as np import random from kmc.particles import * epsilon_vaccum = 8.854187e-12 e = -1.60217662e-19 kb = 8.617e-5 hbar = 6.582e-16 ###RATES################################################################################# ##FUNCTION FOR SETTING RADI...
true
true
f75d71f7d0795bc2ef87cc356a7d37154db6f4a3
967
py
Python
tests/test_wrangler.py
vikasgorur/ebooks_controller
06c74d907306a1609c59656ab29d921fd8c348de
[ "MIT" ]
null
null
null
tests/test_wrangler.py
vikasgorur/ebooks_controller
06c74d907306a1609c59656ab29d921fd8c348de
[ "MIT" ]
null
null
null
tests/test_wrangler.py
vikasgorur/ebooks_controller
06c74d907306a1609c59656ab29d921fd8c348de
[ "MIT" ]
null
null
null
from datetime import datetime from freezegun import freeze_time from unittest.mock import Mock import wrangler.wrangler as w def test_validate_run_times(): valid_run_times = [ [(11, 23), (0, 0)], [(1, 2), (23, 59)], [(0, 60)] ] for rt in valid_run_times: conf = Mock(RUN_AT=...
27.628571
69
0.597725
from datetime import datetime from freezegun import freeze_time from unittest.mock import Mock import wrangler.wrangler as w def test_validate_run_times(): valid_run_times = [ [(11, 23), (0, 0)], [(1, 2), (23, 59)], [(0, 60)] ] for rt in valid_run_times: conf = Mock(RUN_AT=...
true
true