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
f7167dafa438abb972d4d287944bf016ae2c3bf7
15,655
py
Python
MuJoCo/modules/utils.py
mosesnah-shared/whip-project-targeting
7f47598635f027e2cb05ad33b66ed67627d20329
[ "BSD-3-Clause" ]
null
null
null
MuJoCo/modules/utils.py
mosesnah-shared/whip-project-targeting
7f47598635f027e2cb05ad33b66ed67627d20329
[ "BSD-3-Clause" ]
null
null
null
MuJoCo/modules/utils.py
mosesnah-shared/whip-project-targeting
7f47598635f027e2cb05ad33b66ed67627d20329
[ "BSD-3-Clause" ]
null
null
null
# [Built-in modules] import os import re import sys import shutil import time, datetime import math as myMath import glob # [3rd party modules] import cv2 import numpy as np import xml.etree.ElementTree as ET import sympy as sp from sympy.utilities.lambdify import lambdify, implemented_function from...
42.196765
846
0.570808
import os import re import sys import shutil import time, datetime import math as myMath import glob import cv2 import numpy as np import xml.etree.ElementTree as ET import sympy as sp from sympy.utilities.lambdify import lambdify, implemented_function from scipy.special import lambertw from scip...
true
true
f7167e61cefc29e05e76cf5f35782284b46a20aa
4,682
py
Python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.757009
133
0.65912
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline ...
true
true
f7167ea0d6c0f9e11b4a88a19c5af9d2c9a92a69
17,093
py
Python
intersight/model/niatelemetry_supervisor_module_details.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/niatelemetry_supervisor_module_details.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/niatelemetry_supervisor_module_details.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
54.091772
1,678
0.639677
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7167ec21a6a129bda61142db392f78aae4d6960
271
py
Python
tests/database.py
tophat/ormar-postgres-extensions
88fcab5a73bc89090739c38f063191d8473957a5
[ "Apache-2.0" ]
6
2021-08-02T22:24:34.000Z
2022-03-21T08:59:22.000Z
tests/database.py
tophat/ormar-postgres-extensions
88fcab5a73bc89090739c38f063191d8473957a5
[ "Apache-2.0" ]
14
2021-08-03T00:03:55.000Z
2022-02-17T02:10:08.000Z
tests/database.py
tophat/ormar-postgres-extensions
88fcab5a73bc89090739c38f063191d8473957a5
[ "Apache-2.0" ]
2
2022-01-28T20:10:12.000Z
2022-02-09T16:49:01.000Z
import databases import sqlalchemy DB_HOST = "localhost" DB_NAME = "TEST_DATABASE" DATABASE_URL = databases.DatabaseURL( f"postgres://DEV_USER:DEV_PASSWORD@{DB_HOST}:5432/{DB_NAME}" ) database = databases.Database(str(DATABASE_URL)) metadata = sqlalchemy.MetaData()
24.636364
64
0.782288
import databases import sqlalchemy DB_HOST = "localhost" DB_NAME = "TEST_DATABASE" DATABASE_URL = databases.DatabaseURL( f"postgres://DEV_USER:DEV_PASSWORD@{DB_HOST}:5432/{DB_NAME}" ) database = databases.Database(str(DATABASE_URL)) metadata = sqlalchemy.MetaData()
true
true
f71680e22b485ad498455c52808137f6caab7e0c
910
py
Python
gammapy/stats/tests/test_significance.py
qpiel/gammapy
cfb976909e63f4d5d578e1495245c0baad69482b
[ "BSD-3-Clause" ]
null
null
null
gammapy/stats/tests/test_significance.py
qpiel/gammapy
cfb976909e63f4d5d578e1495245c0baad69482b
[ "BSD-3-Clause" ]
1
2020-10-29T19:55:46.000Z
2020-10-29T19:55:46.000Z
gammapy/stats/tests/test_significance.py
qpiel/gammapy
cfb976909e63f4d5d578e1495245c0baad69482b
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals from numpy.testing import assert_allclose from ...stats import ( significance_to_probability_normal, probability_to_significance_normal, probability_to_significa...
32.5
82
0.806593
from __future__ import absolute_import, division, print_function, unicode_literals from numpy.testing import assert_allclose from ...stats import ( significance_to_probability_normal, probability_to_significance_normal, probability_to_significance_normal_limit, significance_to_probability_normal_limit, ...
true
true
f716815fb86995f906bd4284b72bbcf1851ecedc
9,243
py
Python
ros_pkg/dock/scripts/dock_generator.py
introlab/securbot
0652ddf3e2dbcf0bb6ffcf76898749b67e443327
[ "Apache-2.0" ]
20
2019-03-13T13:37:51.000Z
2022-01-25T16:56:35.000Z
ros_pkg/dock/scripts/dock_generator.py
introlab/securbot
0652ddf3e2dbcf0bb6ffcf76898749b67e443327
[ "Apache-2.0" ]
15
2019-02-27T20:29:34.000Z
2020-08-24T19:44:20.000Z
ros_pkg/dock/scripts/dock_generator.py
introlab/securbot
0652ddf3e2dbcf0bb6ffcf76898749b67e443327
[ "Apache-2.0" ]
13
2019-07-31T00:47:49.000Z
2021-04-15T01:33:02.000Z
#!/usr/bin/env python """Provide docking motivation layer node.""" import rospy import json import math from enum import Enum from threading import Lock import tf from tf.transformations import euler_from_quaternion from std_msgs.msg import Bool from std_msgs.msg import Empty from geometry_msgs.msg import PoseStamped...
33.48913
80
0.612896
import rospy import json import math from enum import Enum from threading import Lock import tf from tf.transformations import euler_from_quaternion from std_msgs.msg import Bool from std_msgs.msg import Empty from geometry_msgs.msg import PoseStamped from sensor_msgs.msg import BatteryState from hbba_msgs.msg import...
true
true
f716825448eb20eaa87e600968288d77efb47ddf
14,659
py
Python
dataReader.py
tsfw/yolov3
bf6d03d9a84a0ac1e94bcc4f9a026f7d32dfbdab
[ "Apache-2.0" ]
null
null
null
dataReader.py
tsfw/yolov3
bf6d03d9a84a0ac1e94bcc4f9a026f7d32dfbdab
[ "Apache-2.0" ]
null
null
null
dataReader.py
tsfw/yolov3
bf6d03d9a84a0ac1e94bcc4f9a026f7d32dfbdab
[ "Apache-2.0" ]
null
null
null
import os import config import json import tensorflow as tf import numpy as np from collections import defaultdict class Reader: def __init__(self, mode, data_dir, anchors_path, num_classes, tfrecord_num = 12, input_shape = 416, max_boxes = 20): """ Introduction ------------ 构造函...
44.966258
209
0.548469
import os import config import json import tensorflow as tf import numpy as np from collections import defaultdict class Reader: def __init__(self, mode, data_dir, anchors_path, num_classes, tfrecord_num = 12, input_shape = 416, max_boxes = 20): self.data_dir = data_dir self.input_shape = input_sha...
true
true
f71684275afc20018793ca67d49712a2693a0850
10,212
py
Python
a3c_master_sewak.py
sebtac/MLxE
93baa6b7c9fd14e54abd7199e868fb828e9a7c52
[ "Apache-2.0" ]
1
2020-12-15T17:19:33.000Z
2020-12-15T17:19:33.000Z
a3c_master_sewak.py
sebtac/MLxE
93baa6b7c9fd14e54abd7199e868fb828e9a7c52
[ "Apache-2.0" ]
null
null
null
a3c_master_sewak.py
sebtac/MLxE
93baa6b7c9fd14e54abd7199e868fb828e9a7c52
[ "Apache-2.0" ]
null
null
null
""" A3C in Code - Centralized/ Gobal Network Parameter Server/ Controller Based On: A3C Code as in the book Deep Reinforcement Learning, Chapter 12. Runtime: Python 3.6.5 Dependencies: numpy, matplotlib, tensorflow (/ tensorflow-gpu), gym DocStrings: GoogleStyle Author : Mohit Sewak (p20150023@goa-bits-pilani.a...
39.890625
158
0.665785
Agent_Type = 3 learning_rate = 0.0001 import multiprocessing cores = multiprocessing.cpu_count() import sys sys.path.append(r'C:\Users\surface\Documents\Python\RL\MLxE\Mohit Sewak RL\Mohit12_A3C') import time import winsound import logging import os import numpy as np import matplotlib.pyplot as plt logging.basic...
true
true
f716847b7e7f2b74e68a21c9fff18732128dc20b
1,196
py
Python
examples/cdv/plttraj.py
geflaspohler/deep-OTD
0daec276669776952b5142149007175b8a3c4d87
[ "MIT" ]
1
2020-07-18T02:00:50.000Z
2020-07-18T02:00:50.000Z
examples/cdv/plttraj.py
geflaspohler/deep-OTD
0daec276669776952b5142149007175b8a3c4d87
[ "MIT" ]
null
null
null
examples/cdv/plttraj.py
geflaspohler/deep-OTD
0daec276669776952b5142149007175b8a3c4d87
[ "MIT" ]
3
2019-11-28T04:15:59.000Z
2020-03-27T16:15:36.000Z
import numpy as np import matplotlib from matplotlib import pyplot as plt matplotlib.rcParams['mathtext.fontset'] = 'stix' matplotlib.rcParams['font.size'] = 9 ndim = 6 data = np.genfromtxt('dOTD_tst1.out') xticks = [900, 1100, 1300] yticks = [[0.7, 0.8, 0.9, 1], [-0.2, 0, 0.2, 0.4], [-0.5, 0, 0....
29.170732
64
0.591137
import numpy as np import matplotlib from matplotlib import pyplot as plt matplotlib.rcParams['mathtext.fontset'] = 'stix' matplotlib.rcParams['font.size'] = 9 ndim = 6 data = np.genfromtxt('dOTD_tst1.out') xticks = [900, 1100, 1300] yticks = [[0.7, 0.8, 0.9, 1], [-0.2, 0, 0.2, 0.4], [-0.5, 0, 0....
true
true
f7168651a64c6d1d8e833e8659ea210c7750b724
662
py
Python
exercicio55Corrigido.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
exercicio55Corrigido.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
exercicio55Corrigido.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
'''maior = 0 menor = 0 for p in range(1, 6): peso = float(input('digite o {}o peso '.format(p))) if p == 1: menor = peso maior = peso else: if peso >= maior: maior = peso if peso < menor: menor = peso print('O maior peso registrado foi {:.1f}kg \nO men...
28.782609
105
0.575529
lst=[] for c in range(1, 6): peso=float(input('Peso da {}ª pessoa: '.format(c))) lst+=[peso] print('') print('O Maior peso foi:', max(lst)) print('O Menor peso foi:', min(lst))
true
true
f71686608991387d6cf7844d049a4fbe7531d303
1,071
py
Python
learning/set-background-image-v2.py
CrtomirJuren/pyfirmata-arduino
020873972d119955e80387f44bcc193ad0b460a6
[ "MIT" ]
null
null
null
learning/set-background-image-v2.py
CrtomirJuren/pyfirmata-arduino
020873972d119955e80387f44bcc193ad0b460a6
[ "MIT" ]
null
null
null
learning/set-background-image-v2.py
CrtomirJuren/pyfirmata-arduino
020873972d119955e80387f44bcc193ad0b460a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jan 25 15:21:34 2021 @author: crtjur """ import tkinter as tk from PIL import Image, ImageTk root = tk.Tk() root.title("Title") root.geometry("280x350") root.configure(background="black") class Example(tk.Frame): def __init__(self, master, *pargs): tk.Frame.__i...
24.340909
69
0.674136
import tkinter as tk from PIL import Image, ImageTk root = tk.Tk() root.title("Title") root.geometry("280x350") root.configure(background="black") class Example(tk.Frame): def __init__(self, master, *pargs): tk.Frame.__init__(self, master, *pargs) self.image = Image.open("diagram-v2.png") ...
true
true
f716868e337d9c56b7761e3167f53df728c5c6c1
4,185
py
Python
tools/train.py
nikhilrayaprolu/food-version2
5fe558ba96be34e52e48ee60bdde2298245a769e
[ "Apache-2.0" ]
null
null
null
tools/train.py
nikhilrayaprolu/food-version2
5fe558ba96be34e52e48ee60bdde2298245a769e
[ "Apache-2.0" ]
null
null
null
tools/train.py
nikhilrayaprolu/food-version2
5fe558ba96be34e52e48ee60bdde2298245a769e
[ "Apache-2.0" ]
1
2020-12-22T08:38:56.000Z
2020-12-22T08:38:56.000Z
from __future__ import division import argparse import os import os.path as osp import time import mmcv import torch from mmcv import Config from mmcv.runner import init_dist from mmdet import __version__ from mmdet.apis import set_random_seed, train_detector from mmdet.datasets import build_dataset from mmdet.models...
32.952756
77
0.6681
from __future__ import division import argparse import os import os.path as osp import time import mmcv import torch from mmcv import Config from mmcv.runner import init_dist from mmdet import __version__ from mmdet.apis import set_random_seed, train_detector from mmdet.datasets import build_dataset from mmdet.models...
true
true
f71687e21d8ea9780570ef161a23f33fdc061d2f
2,837
py
Python
samples/basic/executor/models/cisco-ios-xr/Cisco-IOS-XR-snmp-test-trap-act/nc-execute-xr-snmp-test-trap-act-115-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
1
2021-07-08T14:02:12.000Z
2021-07-08T14:02:12.000Z
samples/basic/executor/models/cisco-ios-xr/Cisco-IOS-XR-snmp-test-trap-act/nc-execute-xr-snmp-test-trap-act-115-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
null
null
null
samples/basic/executor/models/cisco-ios-xr/Cisco-IOS-XR-snmp-test-trap-act/nc-execute-xr-snmp-test-trap-act-115-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
34.180723
87
0.673599
from argparse import ArgumentParser from urlparse import urlparse from ydk.services import ExecutorService from ydk.providers import NetconfServiceProvider from ydk.models.cisco_ios_xr import Cisco_IOS_XR_snmp_test_trap_act \ as xr_snmp_test_trap_act import logging def prepare_sonet_line_status_rpc(sonet_line_...
true
true
f7168881dda3037f1831c4695a51ad6b12964680
963
py
Python
membership/forms.py
carpentries/membershipdb
9f6270cea7251c490686926f041e21a929218e6c
[ "MIT" ]
3
2018-05-31T16:09:52.000Z
2018-09-30T21:35:06.000Z
membership/forms.py
carpentries/membershipdb
9f6270cea7251c490686926f041e21a929218e6c
[ "MIT" ]
5
2018-06-19T21:51:16.000Z
2020-01-19T20:18:48.000Z
membership/forms.py
carpentries/membershipdb
9f6270cea7251c490686926f041e21a929218e6c
[ "MIT" ]
1
2020-07-07T03:23:34.000Z
2020-07-07T03:23:34.000Z
"""Membership forms module """ from django.forms import ModelForm from .models import Note, Term, Organization, Contact, Membership class NoteForm(ModelForm): """Note Form """ class Meta: model = Note fields = ['title', 'content', 'date_time'] class TermForm(ModelForm): """Term Form ...
19.26
65
0.553479
from django.forms import ModelForm from .models import Note, Term, Organization, Contact, Membership class NoteForm(ModelForm): class Meta: model = Note fields = ['title', 'content', 'date_time'] class TermForm(ModelForm): class Meta: model = Term fields = ['mem_type', 'n_wor...
true
true
f71688edd94f6768ac57dec0eba3a526f1529856
28,910
py
Python
sdk/python/pulumi_azure_native/insights/v20150501/component.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/insights/v20150501/component.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/insights/v20150501/component.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
46.779935
651
0.661397
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * __all__ = ['ComponentArgs', 'Component'] @pulumi.input_type class ComponentArgs: def __init__(__self__, *, ...
true
true
f7168a4422b050f7d1300a0db6bbaf4282e7bd75
1,953
py
Python
jungle/code/sorting.py
nate-russell/Jungle
114d744ed66fec11b8d5e62444253892a7ffa5cd
[ "MIT" ]
null
null
null
jungle/code/sorting.py
nate-russell/Jungle
114d744ed66fec11b8d5e62444253892a7ffa5cd
[ "MIT" ]
4
2017-12-28T02:07:33.000Z
2018-01-04T06:38:43.000Z
jungle/code/sorting.py
nate-russell/Jungle
114d744ed66fec11b8d5e62444253892a7ffa5cd
[ "MIT" ]
null
null
null
''' Sorting Examples for showcasing and developing Jungle features ''' import inspect from jungle import JungleExperiment, JungleProfiler import numpy as np print('Finished Loading Modules') class Sorting_Prototype: print('\n---Test Sort N---') @JungleExperiment(reps=1, n=[100, 500]) def test_sort_n(self...
24.721519
100
0.63236
import inspect from jungle import JungleExperiment, JungleProfiler import numpy as np print('Finished Loading Modules') class Sorting_Prototype: print('\n---Test Sort N---') @JungleExperiment(reps=1, n=[100, 500]) def test_sort_n(self, n=100, seed=1234): np.random.seed(seed) list_...
true
true
f7168a45d1129bfe9f7ee66ee3c14b06f2b75b19
432
py
Python
exercicios/ex052.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex052.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex052.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
n = int(input('Digite um número inteiro: ')) cont = 0 for c in range(1, n + 1): if n % c == 0: print('\033[034m{}\033[m'.format(c), end=' ') cont += 1 else: print('\033[031m{}\033[m'.format(c), end=' ') print('\nO número {} foi divisível {} vezes '.format(n, cont)) if cont == 2: ...
24
62
0.546296
n = int(input('Digite um número inteiro: ')) cont = 0 for c in range(1, n + 1): if n % c == 0: print('\033[034m{}\033[m'.format(c), end=' ') cont += 1 else: print('\033[031m{}\033[m'.format(c), end=' ') print('\nO número {} foi divisível {} vezes '.format(n, cont)) if cont == 2: ...
true
true
f7168a487b6bc455015981782fb336330a0490cd
26,905
py
Python
src/sage/rings/polynomial/flatten.py
nikmihale/sage
e2dcdeeabb578c37bcf0361c0be3079315e9252c
[ "BSL-1.0" ]
null
null
null
src/sage/rings/polynomial/flatten.py
nikmihale/sage
e2dcdeeabb578c37bcf0361c0be3079315e9252c
[ "BSL-1.0" ]
null
null
null
src/sage/rings/polynomial/flatten.py
nikmihale/sage
e2dcdeeabb578c37bcf0361c0be3079315e9252c
[ "BSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- r""" Class to flatten polynomial rings over polynomial ring For example ``QQ['a','b'],['x','y']`` flattens to ``QQ['a','b','x','y']``. EXAMPLES:: sage: R = QQ['x']['y']['s','t']['X'] sage: from sage.rings.polynomial.flatten import FlatteningMorphism sage: phi = FlatteningMorphism(...
39.918398
179
0.55551
from __future__ import absolute_import, print_function import itertools from sage.categories.homset import Homset from sage.categories.morphism import Morphism from sage.misc.cachefunc import cached_method from .polynomial_ring_constructor import PolynomialRing from .polynomial_ring import is_PolynomialRing from .mu...
true
true
f7168ba8849334a57d1b394944e515d207126631
19,617
py
Python
main.py
gmathez/Project_ADA_2018_Bruttin_Mathez_Petitpierre
e237300b3d9fb966b0eb747dd66816cc6cfc11b3
[ "Apache-2.0" ]
1
2018-12-01T12:17:58.000Z
2018-12-01T12:17:58.000Z
main.py
gmathez/Project_ADA_2018_Bruttin_Mathez_Petitpierre
e237300b3d9fb966b0eb747dd66816cc6cfc11b3
[ "Apache-2.0" ]
null
null
null
main.py
gmathez/Project_ADA_2018_Bruttin_Mathez_Petitpierre
e237300b3d9fb966b0eb747dd66816cc6cfc11b3
[ "Apache-2.0" ]
null
null
null
# Import kivy tools from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.recycleboxlayout import RecycleBoxLayout from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.checkbox import CheckBox from kivy.uix.spinner import ...
39.470825
116
0.568181
from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.recycleboxlayout import RecycleBoxLayout from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.checkbox import CheckBox from kivy.uix.spinner import Spinner from kivy.ui...
true
true
f7168bb426ad7afb8dbd70d8b80b3ec7a14dbc4b
28,177
py
Python
sppas/sppas/src/ui/phoenix/page_files/associate.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/ui/phoenix/page_files/associate.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/ui/phoenix/page_files/associate.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
""" .. --------------------------------------------------------------------- ___ __ __ __ ___ / | \ | \ | \ / the automatic \__ |__/ |__/ |___| \__ annotation and \ | | | | \ analysis ___/...
35.894268
119
0.509245
import wx import logging from sppas import sppasTypeError from sppas import sg from sppas.src.config import ui_translation from sppas.src.files import FileData from sppas.src.files import States from sppas.src.files import sppasFileDataFilters from ..dialogs import Information, Error from ..windows import sppasStati...
true
true
f7168c18be9b4f3d5729f54a2173850564c1755b
617
py
Python
src/DoorControl_manual.py
oulkaid/MoSIG-SystemDesign-WCET
bbe640ebbad7a372e4bd826a3334a69f3aca28e7
[ "MIT" ]
null
null
null
src/DoorControl_manual.py
oulkaid/MoSIG-SystemDesign-WCET
bbe640ebbad7a372e4bd826a3334a69f3aca28e7
[ "MIT" ]
null
null
null
src/DoorControl_manual.py
oulkaid/MoSIG-SystemDesign-WCET
bbe640ebbad7a372e4bd826a3334a69f3aca28e7
[ "MIT" ]
null
null
null
start_addr = [] next_addr = [] start_addr.append(['8478']) next_addr.append(['84a4','8498']) start_addr.append(['8498']) next_addr.append(['84b0','84a4']) start_addr.append(['84a4']) next_addr.append(['84b0']) start_addr.append(['84b0']) next_addr.append(['84e0','84d4']) start_addr.append(['84d4']) next_addr.app...
20.566667
117
0.648298
start_addr = [] next_addr = [] start_addr.append(['8478']) next_addr.append(['84a4','8498']) start_addr.append(['8498']) next_addr.append(['84b0','84a4']) start_addr.append(['84a4']) next_addr.append(['84b0']) start_addr.append(['84b0']) next_addr.append(['84e0','84d4']) start_addr.append(['84d4']) next_addr.app...
true
true
f7168c43af7fe79343018a0288432cf66f89741a
1,124
py
Python
app/auth/views.py
0xff-dev/SutAcmDRA
f3e744c19f66f930deb3f921b75d5f1189354b41
[ "MIT" ]
2
2018-07-16T16:14:32.000Z
2018-07-23T06:48:29.000Z
app/auth/views.py
0xff-dev/SutAcmDRA
f3e744c19f66f930deb3f921b75d5f1189354b41
[ "MIT" ]
3
2021-06-08T19:23:40.000Z
2021-12-13T19:56:54.000Z
app/auth/views.py
stevenshuang/SutAcmDRA
f3e744c19f66f930deb3f921b75d5f1189354b41
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 from flask import render_template, request from flask import redirect, url_for, flash from flask_login import login_user from flask_login import login_required from flask_login import logout_user from . import auth from ..models import User from .. import logger @auth.route('/log...
28.1
72
0.6379
from flask import render_template, request from flask import redirect, url_for, flash from flask_login import login_user from flask_login import login_required from flask_login import logout_user from . import auth from ..models import User from .. import logger @auth.route('/login', methods=['GET', 'POST']) def log...
true
true
f7168e80f5e8ed5edf7f7288316f9a3d0d8192e3
5,675
py
Python
nimiqclient/models/block.py
rraallvv/python-client
65d0c3f835ed8ce3ba6bfa2565cac61f7da6b748
[ "Apache-2.0" ]
4
2020-11-03T21:13:13.000Z
2022-01-18T08:40:27.000Z
nimiqclient/models/block.py
rraallvv/python-client
65d0c3f835ed8ce3ba6bfa2565cac61f7da6b748
[ "Apache-2.0" ]
1
2020-08-09T21:36:02.000Z
2020-08-09T21:36:02.000Z
nimiqclient/models/block.py
rraallvv/python-client
65d0c3f835ed8ce3ba6bfa2565cac61f7da6b748
[ "Apache-2.0" ]
1
2020-08-03T01:05:44.000Z
2020-08-03T01:05:44.000Z
__all__ = ["Block", "BlockTemplateHeader", "BlockTemplateBody", "BlockTemplate"] from .transaction import Transaction class Block: """ Block returned by the server. :param number: Height of the block. :type number: int :param hash: Hex-encoded 32-byte hash of the block. :type hash: str :...
34.815951
166
0.66185
__all__ = ["Block", "BlockTemplateHeader", "BlockTemplateBody", "BlockTemplate"] from .transaction import Transaction class Block: def __init__( self, number, hash, pow, parentHash, nonce, bodyHash, accountsHash, difficulty, timesta...
true
true
f7168f6333b407972ae83a3eb73553f078b2cd44
7,304
py
Python
src/sage/combinat/kazhdan_lusztig.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/kazhdan_lusztig.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/kazhdan_lusztig.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
r""" Kazhdan-Lusztig Polynomials AUTHORS: - Daniel Bump (2008): initial version - Alan J.X. Guo (2014-03-18): ``R_tilde()`` method. """ #***************************************************************************** # Copyright (C) 2008 Daniel Bump <bump at match.stanford.edu> # # This program is free softwar...
32.035088
92
0.529299
from __future__ import absolute_import, print_function, division from sage.rings.polynomial.polynomial_element import is_Polynomial from sage.misc.cachefunc import cached_method from sage.rings.polynomial.laurent_polynomial import LaurentPolynomial from sage.structure.sage_object import SageObject from sage.structur...
true
true
f716900640c20a86067bea4f88ec8a40a962d91a
1,771
py
Python
server/apps/widgets/serializers/widget.py
Sergey-x/SibdevPractice
12e3f7e704af93911a0c4a66aad60733d2121e15
[ "MIT" ]
null
null
null
server/apps/widgets/serializers/widget.py
Sergey-x/SibdevPractice
12e3f7e704af93911a0c4a66aad60733d2121e15
[ "MIT" ]
null
null
null
server/apps/widgets/serializers/widget.py
Sergey-x/SibdevPractice
12e3f7e704af93911a0c4a66aad60733d2121e15
[ "MIT" ]
null
null
null
from datetime import timedelta from rest_framework import serializers from ..models.widget import Widget class BaseWidgetSerializer(serializers.ModelSerializer): """ This is the base serializer class for Widget model. Other widget serializers must be inherited from it. """ class Meta: m...
24.943662
79
0.579898
from datetime import timedelta from rest_framework import serializers from ..models.widget import Widget class BaseWidgetSerializer(serializers.ModelSerializer): class Meta: model = Widget fields = ( 'id', 'category', 'limit', 'duration', ...
true
true
f716900a4d34d8a8bb3af91bb18c52ab94dfe78e
2,563
py
Python
src/server.py
alamminsalo/lua-webshop
2f0f1123a9d693103c4dbaef02836777e779844c
[ "MIT" ]
1
2016-09-12T16:16:33.000Z
2016-09-12T16:16:33.000Z
src/server.py
alamminsalo/py-webshop
2f0f1123a9d693103c4dbaef02836777e779844c
[ "MIT" ]
null
null
null
src/server.py
alamminsalo/py-webshop
2f0f1123a9d693103c4dbaef02836777e779844c
[ "MIT" ]
null
null
null
# Restfull api using falcon framework from wsgiref import simple_server import falcon import json #Resource endpoints import from cartsResource import * from productsResource import * # Check that client has application/json in Accept header # and Content-Type, if request has body class RequireJSON(object): d...
29.802326
81
0.60359
from wsgiref import simple_server import falcon import json from cartsResource import * from productsResource import * class RequireJSON(object): def process_request(self, req, resp): if not req.client_accepts_json: raise falcon.HTTPNotAcceptable( 'This API only supports re...
true
true
f7169146ec3baeb91915b19f26b91545909663f8
149
py
Python
foundation/migrate.py
shreyashah115/foundation
42f19d23cfda77bae533f4884aecc15b3cd07f14
[ "MIT" ]
null
null
null
foundation/migrate.py
shreyashah115/foundation
42f19d23cfda77bae533f4884aecc15b3cd07f14
[ "MIT" ]
null
null
null
foundation/migrate.py
shreyashah115/foundation
42f19d23cfda77bae533f4884aecc15b3cd07f14
[ "MIT" ]
null
null
null
import frappe from frappe.database import Database from markdown2 import markdown from frappe.utils import validate_email_add def migrate(): pass
16.555556
43
0.832215
import frappe from frappe.database import Database from markdown2 import markdown from frappe.utils import validate_email_add def migrate(): pass
true
true
f716914b86089ef9a2f697d9a1dfeb32bd90f95f
599
py
Python
HelloWorld/Models/admin.py
xautshuanglong/PythonWebApp
68ae417121740e4115f0e56c12a2a4831df30fc1
[ "MIT" ]
null
null
null
HelloWorld/Models/admin.py
xautshuanglong/PythonWebApp
68ae417121740e4115f0e56c12a2a4831df30fc1
[ "MIT" ]
null
null
null
HelloWorld/Models/admin.py
xautshuanglong/PythonWebApp
68ae417121740e4115f0e56c12a2a4831df30fc1
[ "MIT" ]
null
null
null
from django.contrib import admin from Models.models import UserInfo, Question, Choice admin.site.register(UserInfo) # admin.site.register(Question) # admin.site.register(Choice) class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fi...
23.038462
80
0.661102
from django.contrib import admin from Models.models import UserInfo, Question, Choice admin.site.register(UserInfo) class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ...
true
true
f71693818cb726573e4d1f282b8d61fe8a87df6b
678
py
Python
resource-timing/resources/fake_responses.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2022-03-19T09:43:35.000Z
2022-03-19T09:43:35.000Z
resource-timing/resources/fake_responses.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-12-13T19:49:45.000Z
2021-12-13T19:49:45.000Z
resource-timing/resources/fake_responses.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-04-06T20:06:58.000Z
2021-04-06T20:06:58.000Z
# /xhr/resources/conditional.py -- to fake a 304 response def main(request, response): tag = request.GET.first("tag", None) match = request.headers.get("If-None-Match", None) date = request.GET.first("date", "") modified = request.headers.get("If-Modified-Since", None) if tag: response.head...
35.684211
61
0.613569
def main(request, response): tag = request.GET.first("tag", None) match = request.headers.get("If-None-Match", None) date = request.GET.first("date", "") modified = request.headers.get("If-Modified-Since", None) if tag: response.headers.set("ETag", '"%s"' % tag) elif date: respo...
true
true
f71695c7f499b72a9e1e239c8622fe0294a9c60f
3,752
py
Python
personal/Ervin/run_knn_collaborative_item.py
edervishaj/spotify-recsys-challenge
4077201ac7e4ed9da433bd10a92c183614182437
[ "Apache-2.0" ]
3
2018-10-12T20:19:57.000Z
2019-12-11T01:11:38.000Z
personal/Ervin/run_knn_collaborative_item.py
kiminh/spotify-recsys-challenge
5e7844a77ce3c26658400f161d2d74d682f30e69
[ "Apache-2.0" ]
null
null
null
personal/Ervin/run_knn_collaborative_item.py
kiminh/spotify-recsys-challenge
5e7844a77ce3c26658400f161d2d74d682f30e69
[ "Apache-2.0" ]
4
2018-10-27T20:30:18.000Z
2020-10-14T07:43:27.000Z
from utils.datareader import Datareader from utils.evaluator import Evaluator from utils.submitter import Submitter from utils.post_processing import eurm_to_recommendation_list_submission from utils.post_processing import eurm_to_recommendation_list from utils.pre_processing import norm_l1_row, norm_max_row, norm_ma...
32.912281
140
0.676972
from utils.datareader import Datareader from utils.evaluator import Evaluator from utils.submitter import Submitter from utils.post_processing import eurm_to_recommendation_list_submission from utils.post_processing import eurm_to_recommendation_list from utils.pre_processing import norm_l1_row, norm_max_row, norm_ma...
true
true
f71695f6ec0e1e0a59e525bb30d5fb132322b04b
564
py
Python
wagtail/core/migrations/0036_populate_page_last_published_at.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
8,851
2016-12-09T19:01:45.000Z
2022-03-31T04:45:06.000Z
wagtail/core/migrations/0036_populate_page_last_published_at.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
5,197
2016-12-09T19:24:37.000Z
2022-03-31T22:17:55.000Z
wagtail/core/migrations/0036_populate_page_last_published_at.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
2,548
2016-12-09T18:16:55.000Z
2022-03-31T21:34:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-01 11:03 from django.db import migrations from django.db.models import F def forwards_func(apps, schema_editor): Page = apps.get_model("wagtailcore", "Page") Page.objects.filter(has_unpublished_changes=False).update(last_published_at=F('latest_re...
26.857143
112
0.719858
from django.db import migrations from django.db.models import F def forwards_func(apps, schema_editor): Page = apps.get_model("wagtailcore", "Page") Page.objects.filter(has_unpublished_changes=False).update(last_published_at=F('latest_revision_created_at')) class Migration(migrations.Migration): depend...
true
true
f71696347edb214d95d4dd5dbb9b50d0df5285c4
5,287
py
Python
integration-testing/test/test_multiple_deploys.py
ArturGajowy/rchain
7785a9195a4863a89f8aa22743e245c3e5f7940c
[ "Apache-2.0" ]
null
null
null
integration-testing/test/test_multiple_deploys.py
ArturGajowy/rchain
7785a9195a4863a89f8aa22743e245c3e5f7940c
[ "Apache-2.0" ]
null
null
null
integration-testing/test/test_multiple_deploys.py
ArturGajowy/rchain
7785a9195a4863a89f8aa22743e245c3e5f7940c
[ "Apache-2.0" ]
1
2018-09-12T10:26:23.000Z
2018-09-12T10:26:23.000Z
import logging import contextlib import threading from typing import ( TYPE_CHECKING, Generator, ) import pytest import conftest from rnode_testing.common import TestingContext from rnode_testing.rnode import ( docker_network_with_started_bootstrap, started_peer, ) from rnode_testing.wait import ( ...
44.058333
200
0.635521
import logging import contextlib import threading from typing import ( TYPE_CHECKING, Generator, ) import pytest import conftest from rnode_testing.common import TestingContext from rnode_testing.rnode import ( docker_network_with_started_bootstrap, started_peer, ) from rnode_testing.wait import ( ...
true
true
f716972ac65d7ac3dcdcd16d28ba7fac85854f2f
4,791
py
Python
estonian_learner/verb.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
estonian_learner/verb.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
estonian_learner/verb.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
""" @author: Nathanael Jöhrmann """ import json import textwrap class Conjugations: def __init__(self): self.person = {} self.negative = ["", ""] self.passive = ["", ""] self.passive_negative = ["", ""] @property def summary(self) -> str: result = "" sep ...
33.041379
107
0.557921
import json import textwrap class Conjugations: def __init__(self): self.person = {} self.negative = ["", ""] self.passive = ["", ""] self.passive_negative = ["", ""] @property def summary(self) -> str: result = "" sep = " " for i in range(1, 7):...
true
true
f71697bced2a9b09c787e7d1ea296be902ceb742
2,498
py
Python
src/cobald/daemon/runners/asyncio_runner.py
thoto/cobald
27f7a0b5208383e8a7a386f358009a433084908e
[ "MIT" ]
7
2019-06-11T12:57:10.000Z
2019-10-07T17:46:41.000Z
src/cobald/daemon/runners/asyncio_runner.py
thoto/cobald
27f7a0b5208383e8a7a386f358009a433084908e
[ "MIT" ]
76
2019-03-01T08:24:08.000Z
2022-03-24T20:37:23.000Z
src/cobald/daemon/runners/asyncio_runner.py
thoto/cobald
27f7a0b5208383e8a7a386f358009a433084908e
[ "MIT" ]
8
2019-06-27T13:06:12.000Z
2022-02-15T15:27:58.000Z
import asyncio from functools import partial from .base_runner import BaseRunner from .async_tools import raise_return, AsyncExecution class AsyncioRunner(BaseRunner): """Runner for coroutines with :py:mod:`asyncio`""" flavour = asyncio def __init__(self): super().__init__() self.event_...
30.463415
64
0.583667
import asyncio from functools import partial from .base_runner import BaseRunner from .async_tools import raise_return, AsyncExecution class AsyncioRunner(BaseRunner): flavour = asyncio def __init__(self): super().__init__() self.event_loop = asyncio.new_event_loop() self._tasks = s...
true
true
f71697bcf73bda98b7059ee2d3fd8ac5e69857ec
2,881
py
Python
tests/test_fuzzy_completion.py
vijayraavi/mssql-cli
bc16073e371314b970479c2830266ff24d63bd16
[ "BSD-3-Clause" ]
null
null
null
tests/test_fuzzy_completion.py
vijayraavi/mssql-cli
bc16073e371314b970479c2830266ff24d63bd16
[ "BSD-3-Clause" ]
null
null
null
tests/test_fuzzy_completion.py
vijayraavi/mssql-cli
bc16073e371314b970479c2830266ff24d63bd16
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import pytest @pytest.fixture def completer(): import mssqlcli.mssqlcompleter as mssqlcompleter return mssqlcompleter.MssqlCompleter() def test_ranking_ignores_identifier_quotes(completer): """When calculating result rank, identifier quotes should be ignored. ...
32.370787
78
0.72579
from __future__ import unicode_literals import pytest @pytest.fixture def completer(): import mssqlcli.mssqlcompleter as mssqlcompleter return mssqlcompleter.MssqlCompleter() def test_ranking_ignores_identifier_quotes(completer): text = 'user' collection = ['user_action', '"user"'] matches = co...
true
true
f71697d88f48702950eaef9afcbbc278acd2b761
606
py
Python
codewars/7 kyu/string-ends-with.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/7 kyu/string-ends-with.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/7 kyu/string-ends-with.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
from Test import Test, Test as test ''' Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). Examples: solution('abc', 'bc') # returns true solution('abc', 'd') # returns false ''' def solution(string, ending): return True if string[-l...
28.857143
129
0.714521
from Test import Test, Test as test def solution(string, ending): return True if string[-len(ending):] == ending or len(ending) == 0 else False def solution(string, ending): return string.endswith(ending) test.assert_equals(solution('abcde', 'cde'), True) test.assert_equals(solution('abcde', 'abc'), False) ...
true
true
f7169805436b5cf887fbf1c99fd59f5c2e43d93c
7,209
py
Python
ros/src/styx/bridge.py
Valentinkvn/Udacity-Full-Autonomous-Vehicle-Project
b1313345a09f84c122a91c1145230fe69da0d20f
[ "MIT" ]
null
null
null
ros/src/styx/bridge.py
Valentinkvn/Udacity-Full-Autonomous-Vehicle-Project
b1313345a09f84c122a91c1145230fe69da0d20f
[ "MIT" ]
6
2021-02-22T08:44:36.000Z
2022-03-12T00:13:46.000Z
ros/src/styx/bridge.py
Valentinkvn/Udacity-Full-Autonomous-Vehicle-Project
b1313345a09f84c122a91c1145230fe69da0d20f
[ "MIT" ]
null
null
null
import rospy import tf from geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped from dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd from std_msgs.msg import Float32 as Float from std_msgs.msg import Bool from sensor_msgs.msg import PointCloud2 from sensor_msgs.msg import Image i...
34.004717
129
0.627688
import rospy import tf from geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped from dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd from std_msgs.msg import Float32 as Float from std_msgs.msg import Bool from sensor_msgs.msg import PointCloud2 from sensor_msgs.msg import Image i...
true
true
f716984bca20b513662e2e393027677207b388b1
1,954
py
Python
mfr2.py
HeegyuKim/face_recognition
d96d2c94225e49d3dd8f2cae4444d35d5c88d13b
[ "MIT" ]
null
null
null
mfr2.py
HeegyuKim/face_recognition
d96d2c94225e49d3dd8f2cae4444d35d5c88d13b
[ "MIT" ]
null
null
null
mfr2.py
HeegyuKim/face_recognition
d96d2c94225e49d3dd8f2cae4444d35d5c88d13b
[ "MIT" ]
null
null
null
import os import shutil import os from glob import glob import pandas as pd import random from collections import defaultdict from PIL import Image from torch.utils.data import Dataset, DataLoader def get_all_images(dir): types = ["jpeg", "jpg", "png"] files = [] for t in types: path = os.path.join(dir, "**...
22.45977
75
0.592119
import os import shutil import os from glob import glob import pandas as pd import random from collections import defaultdict from PIL import Image from torch.utils.data import Dataset, DataLoader def get_all_images(dir): types = ["jpeg", "jpg", "png"] files = [] for t in types: path = os.path.join(dir, "**...
true
true
f716985e68c4ca47db77d1c2d95da2329e93bfc9
1,483
py
Python
official/nlp/modeling/networks/__init__.py
akineeic/models
2912042352009c9993dc05403624100bfe42d9c1
[ "Apache-2.0" ]
15
2018-08-15T19:29:39.000Z
2021-11-05T02:14:59.000Z
official/nlp/modeling/networks/__init__.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
5
2020-10-01T09:02:34.000Z
2021-02-21T12:50:11.000Z
official/nlp/modeling/networks/__init__.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
8
2019-06-06T20:37:15.000Z
2022-03-04T13:54:38.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
54.925926
92
0.784895
from official.nlp.modeling.networks.albert_encoder import AlbertEncoder from official.nlp.modeling.networks.bert_encoder import BertEncoder from official.nlp.modeling.networks.classification import Classification from official.nlp.modeling.networks.encoder_scaffold import EncoderScaffold from official.nlp.modeling.netw...
true
true
f71698db8367f39cb85d20a59c8f5d11cc1b4ccc
4,301
py
Python
coding_problems/move_zeros.py
NescobarAlopLop/miscellaneous
8e33cb34ddc54dad233d2418d4a90a96ce3c393e
[ "MIT" ]
null
null
null
coding_problems/move_zeros.py
NescobarAlopLop/miscellaneous
8e33cb34ddc54dad233d2418d4a90a96ce3c393e
[ "MIT" ]
null
null
null
coding_problems/move_zeros.py
NescobarAlopLop/miscellaneous
8e33cb34ddc54dad233d2418d4a90a96ce3c393e
[ "MIT" ]
null
null
null
""" Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input: [0,1,0,3,12] Output: [1,3,12,0,0] Note: You must do this in-place without making a copy of the array. Minimize the total number of operations. """ from unit...
52.45122
1,044
0.681702
from unittest import TestCase class Solution: @staticmethod def get_next(nums, start, zero=True): for idx in range(start, len(nums)): if zero and nums[idx] == 0: return idx if not zero and nums[idx] != zero: return idx return len(nums) ...
true
true
f71699ccf4bde15c74f7288f21e09a3602fee877
4,755
py
Python
events/yukicon2015/management/commands/setup_yukicon2015.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
events/yukicon2015/management/commands/setup_yukicon2015.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
events/yukicon2015/management/commands/setup_yukicon2015.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
# encoding: utf-8 from datetime import datetime, timedelta from django.conf import settings from django.core.management.base import BaseCommand from django.utils.timezone import now from dateutil.tz import tzlocal from core.utils import slugify class Setup(object): def setup(self, test=False): self.te...
38.04
175
0.606519
from datetime import datetime, timedelta from django.conf import settings from django.core.management.base import BaseCommand from django.utils.timezone import now from dateutil.tz import tzlocal from core.utils import slugify class Setup(object): def setup(self, test=False): self.test = test ...
true
true
f7169a3697dd8cdb379fbd71762594e9c77e9d4a
5,784
py
Python
emerge.py
puiterwijk/dnf-plugins-emerge
fc5640a374fb9fbc5eb6c749e1f6f32617dd9532
[ "MIT" ]
2
2018-02-27T23:25:36.000Z
2018-03-01T09:18:47.000Z
emerge.py
puiterwijk/dnf-plugins-emerge
fc5640a374fb9fbc5eb6c749e1f6f32617dd9532
[ "MIT" ]
null
null
null
emerge.py
puiterwijk/dnf-plugins-emerge
fc5640a374fb9fbc5eb6c749e1f6f32617dd9532
[ "MIT" ]
null
null
null
import dnf import dnf.cli from glob import glob import logging import threading import tempfile import subprocess import shutil import os logger = logging.getLogger('dnf') class ErrorThread(threading.Thread): _my_exception = None def run(self, *args): try: self._run(*self._args) ...
32.494382
112
0.584198
import dnf import dnf.cli from glob import glob import logging import threading import tempfile import subprocess import shutil import os logger = logging.getLogger('dnf') class ErrorThread(threading.Thread): _my_exception = None def run(self, *args): try: self._run(*self._args) ...
true
true
f7169acccf677a901455907c655d4e12841b5f55
11,443
py
Python
tf_agents/experimental/examples/sac/haarnoja18/sac_train_eval.py
cmarlin/agents
1729e06f42237b34dab8bd9d8c01980c2d2b391c
[ "Apache-2.0" ]
1
2021-04-19T02:28:24.000Z
2021-04-19T02:28:24.000Z
tf_agents/experimental/examples/sac/haarnoja18/sac_train_eval.py
cmarlin/agents
1729e06f42237b34dab8bd9d8c01980c2d2b391c
[ "Apache-2.0" ]
null
null
null
tf_agents/experimental/examples/sac/haarnoja18/sac_train_eval.py
cmarlin/agents
1729e06f42237b34dab8bd9d8c01980c2d2b391c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
33.361516
79
0.733811
import functools import os from absl import app from absl import flags from absl import logging import gin import reverb import tensorflow as tf from tf_agents.agents.sac import sac_agent from tf_agents.agents.sac import tanh_normal_projection_network from tf_agents.environments import suite_mujoco from tf_agents.k...
true
true
f7169b0b69005cd6f9c943ebfaa084ff31332512
1,045
py
Python
parameter_tutorial_py/setup.py
JaehyunShim/ros2_tutorial_py
ed94477341ae6053dbd126fe5092b5cbf44ffa89
[ "Apache-2.0" ]
null
null
null
parameter_tutorial_py/setup.py
JaehyunShim/ros2_tutorial_py
ed94477341ae6053dbd126fe5092b5cbf44ffa89
[ "Apache-2.0" ]
null
null
null
parameter_tutorial_py/setup.py
JaehyunShim/ros2_tutorial_py
ed94477341ae6053dbd126fe5092b5cbf44ffa89
[ "Apache-2.0" ]
null
null
null
from glob import glob import os from setuptools import setup package_name = 'parameter_tutorial_py' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + pac...
29.027778
74
0.622967
from glob import glob import os from setuptools import setup package_name = 'parameter_tutorial_py' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + pac...
true
true
f7169bb6a32f8e404c1c0086cbe414701694aecd
2,198
py
Python
ros/src/twist_controller/twist_controller.py
ysavchenko/carnd-capstone
682eb7ed52153c667f63e7c7eb46f13584469888
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
ysavchenko/carnd-capstone
682eb7ed52153c667f63e7c7eb46f13584469888
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
ysavchenko/carnd-capstone
682eb7ed52153c667f63e7c7eb46f13584469888
[ "MIT" ]
null
null
null
from yaw_controller import YawController from pid import PID from lowpass import LowPassFilter import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, vehicle_mass, wheel_radius, decel_limit): self.yaw_controller = None self.throttle_controller = None ...
33.815385
125
0.674249
from yaw_controller import YawController from pid import PID from lowpass import LowPassFilter import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, vehicle_mass, wheel_radius, decel_limit): self.yaw_controller = None self.throttle_controller = None ...
true
true
f7169e22e550d5a34ea898f7d6792737a32dc834
2,050
py
Python
pyJCal.py
Geeknux/jalali-calendar-widget
034d6895cead2059825a931294ef9ffce7436caa
[ "MIT" ]
1
2015-09-01T03:57:05.000Z
2015-09-01T03:57:05.000Z
pyJCal.py
Geeknux/jalali-calendar-widget
034d6895cead2059825a931294ef9ffce7436caa
[ "MIT" ]
1
2015-09-01T03:56:35.000Z
2015-09-01T03:56:35.000Z
pyJCal.py
Geeknux/jalali-calendar-widget
034d6895cead2059825a931294ef9ffce7436caa
[ "MIT" ]
null
null
null
#! /usr/bin/python2 # coding=utf-8 class pyJCal: def __init__(self): pass def div(self, a, b): return a / b def gregorian_to_jalali(self, g_y, g_m, g_d): """ this function returns result of converting ye gregorian date to jalali """ g_days_in_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31...
19.711538
88
0.57122
class pyJCal: def __init__(self): pass def div(self, a, b): return a / b def gregorian_to_jalali(self, g_y, g_m, g_d): g_days_in_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) j_days_in_month = (31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29) gy = g_y - 1600 gm = g_m - 1 gd = g_d -...
true
true
f7169ea9d45728fbd3a7a434bf6954f50de55d91
8,833
py
Python
source/conf.py
abhivishal/website
5debb3bc7da05a018996a7fbf7d140ad8b91a66e
[ "Apache-2.0" ]
40
2015-07-24T14:11:25.000Z
2021-08-02T14:25:09.000Z
source/conf.py
abhivishal/website
5debb3bc7da05a018996a7fbf7d140ad8b91a66e
[ "Apache-2.0" ]
79
2015-01-07T20:46:42.000Z
2021-06-08T19:02:48.000Z
source/conf.py
abhivishal/website
5debb3bc7da05a018996a7fbf7d140ad8b91a66e
[ "Apache-2.0" ]
41
2015-01-29T00:10:00.000Z
2022-03-20T02:55:45.000Z
# -*- coding: utf-8 -*- # # OSU DevOps BootCamp documentation build configuration file, created by # sphinx-quickstart on Tue Oct 15 12:20:17 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
32.355311
81
0.709498
import sys, os extensions = ['sphinx.ext.todo',] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'OSU DevOps BootCamp' copyright = u'2013-2017, Oregon State Unviersity' # |version| and |release|, also used in various other places throughout the # built documents. # # Th...
true
true
f7169eeeb7b39a8b509cb6a7cc0f4ab643571126
331
py
Python
api/app/api/endpoints/bets.py
franloza/apiestas
46978f58858b1d3822b2f80eb8948009944aa005
[ "MIT" ]
53
2019-11-19T03:02:06.000Z
2022-01-13T15:29:38.000Z
api/app/api/endpoints/bets.py
franloza/apiestas
46978f58858b1d3822b2f80eb8948009944aa005
[ "MIT" ]
3
2019-12-27T22:49:11.000Z
2021-03-31T18:59:36.000Z
api/app/api/endpoints/bets.py
franloza/apiestas
46978f58858b1d3822b2f80eb8948009944aa005
[ "MIT" ]
5
2021-04-25T13:02:48.000Z
2022-02-16T13:57:21.000Z
from fastapi import APIRouter, Depends from ...api.dependencies.bets import get_bet_by_slug_from_path from ...models.bets import Bet router = APIRouter() @router.get( '/{slug}', response_model=Bet, name="bets:get-bet" ) async def get_bet(bet=Depends(get_bet_by_slug_from_path)) -> Bet: return Bet(**b...
20.6875
65
0.719033
from fastapi import APIRouter, Depends from ...api.dependencies.bets import get_bet_by_slug_from_path from ...models.bets import Bet router = APIRouter() @router.get( '/{slug}', response_model=Bet, name="bets:get-bet" ) async def get_bet(bet=Depends(get_bet_by_slug_from_path)) -> Bet: return Bet(**b...
true
true
f7169fa15e8d91d107ba43a0da61b69e67f59f1d
34,678
py
Python
networking_sfc/tests/unit/extensions/test_flowclassifier.py
huiweics/networking-sfc
e7675aa1a31769d55740c025a39644cc6e1ca8dd
[ "Apache-2.0" ]
null
null
null
networking_sfc/tests/unit/extensions/test_flowclassifier.py
huiweics/networking-sfc
e7675aa1a31769d55740c025a39644cc6e1ca8dd
[ "Apache-2.0" ]
null
null
null
networking_sfc/tests/unit/extensions/test_flowclassifier.py
huiweics/networking-sfc
e7675aa1a31769d55740c025a39644cc6e1ca8dd
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Futurewei. 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 appl...
41.630252
78
0.603639
import copy import mock from neutron.api.v2 import resource as api_res_log from neutron import manager from neutron.notifiers import nova as nova_log from neutron.tests.unit.api.v2 import test_base as test_api_v2 from neutron.tests.unit.extensions import base as test_api_v2_extension from neutron_lib import constants...
true
true
f716a0394e3827031c5c048b941822b24f227531
7,848
py
Python
research/compression/entropy_coder/core/entropy_coder_train.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
1
2021-05-17T01:42:29.000Z
2021-05-17T01:42:29.000Z
research/compression/entropy_coder/core/entropy_coder_train.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
research/compression/entropy_coder/core/entropy_coder_train.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
43.120879
87
0.605377
import time import tensorflow as tf from research.compression.entropy_coder.core import code_loader from research.compression.entropy_coder.core import config_helper from research.compression.entropy_coder.model import model_factory FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('master', '', ...
true
true
f716a0a3d08f1b810ae639fdca8086b153407a06
260,784
py
Python
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/48.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/48.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/48.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 26645 passenger_arriving = ( (9, 10, 5, 5, 3, 2, 2, 3, 3, 1, 1, 0, 0, 6, 9, 0, 8, 12, 3, 4, 1, 0, 2, 2, 2, 0), # 0 (5, 10, 9, 11, 6, 2, 0, 5, 1, 1, 1, 0, 0, 11, 5, 5, 6, 6, 1, 2, 2, 1, 4, 0, 0, 0), # 1 (7, 9, 3, 3, 3, 3, 3, 5, 4, 4, 2, 0, 0, 9, 6, 5, 7, 9, 1, 5, 4, 2, 2, 2, 2,...
278.913369
492
0.77175
numPassengers = 26645 passenger_arriving = ( (9, 10, 5, 5, 3, 2, 2, 3, 3, 1, 1, 0, 0, 6, 9, 0, 8, 12, 3, 4, 1, 0, 2, 2, 2, 0), (5, 10, 9, 11, 6, 2, 0, 5, 1, 1, 1, 0, 0, 11, 5, 5, 6, 6, 1, 2, 2, 1, 4, 0, 0, 0), (7, 9, 3, 3, 3, 3, 3, 5, 4, 4, 2, 0, 0, 9, 6, 5, 7, 9, 1, 5, 4, 2, 2, 2, 2, 0), (5, 10, 11, 9, 12, 3, 6...
true
true
f716a1a5f632f06075f249c2221bcd21beac3b38
657
py
Python
odc_gee/setup.py
admariner/data_cube_notebooks
984a84b2f92114040e36a533d3f476dcf384695e
[ "Apache-2.0" ]
null
null
null
odc_gee/setup.py
admariner/data_cube_notebooks
984a84b2f92114040e36a533d3f476dcf384695e
[ "Apache-2.0" ]
null
null
null
odc_gee/setup.py
admariner/data_cube_notebooks
984a84b2f92114040e36a533d3f476dcf384695e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='odc-gee', version='2.24', description='Google Earth Engine indexing tools for Open Data Cube', author='Andrew Lubawy', author_email='andrew.m.lubawy@ama-inc.com', install_requires=[ "google-auth>=1.11...
29.863636
74
0.564688
from setuptools import setup, find_packages setup(name='odc-gee', version='2.24', description='Google Earth Engine indexing tools for Open Data Cube', author='Andrew Lubawy', author_email='andrew.m.lubawy@ama-inc.com', install_requires=[ "google-auth>=1.11.0,<=1.32.0" ...
true
true
f716a22900c092bb89fd4f6f98a63d9202ab5429
7,980
py
Python
client/deploy_kafka.py
jzmq/minos
510b6e30758f4900a72fee1a5e6258bdc7c83f17
[ "Apache-2.0" ]
365
2015-01-26T13:56:42.000Z
2022-03-28T06:36:31.000Z
client/deploy_kafka.py
jzmq/minos
510b6e30758f4900a72fee1a5e6258bdc7c83f17
[ "Apache-2.0" ]
3
2015-12-29T07:44:24.000Z
2021-03-18T06:13:07.000Z
client/deploy_kafka.py
jzmq/minos
510b6e30758f4900a72fee1a5e6258bdc7c83f17
[ "Apache-2.0" ]
135
2015-01-31T00:46:51.000Z
2022-03-03T06:31:09.000Z
#!/usr/bin/env python import argparse import os import parallel_deploy import service_config import subprocess import sys import urlparse import deploy_utils from log import Log ALL_JOBS = ["kafka", "kafkascribe"] def _get_kafka_service_config(args): args.kafka_config = deploy_utils.get_service_config(args) def...
38.550725
97
0.773308
import argparse import os import parallel_deploy import service_config import subprocess import sys import urlparse import deploy_utils from log import Log ALL_JOBS = ["kafka", "kafkascribe"] def _get_kafka_service_config(args): args.kafka_config = deploy_utils.get_service_config(args) def generate_configs(args...
true
true
f716a2954dca50e0e1254eb1298f66d92f7eacbe
2,317
py
Python
scripts/sanity_chk/scl.py
cinlyooi-intel/zephyr
193fb971c24f827464982307b5b3bb34de0fa98d
[ "Apache-2.0" ]
null
null
null
scripts/sanity_chk/scl.py
cinlyooi-intel/zephyr
193fb971c24f827464982307b5b3bb34de0fa98d
[ "Apache-2.0" ]
null
null
null
scripts/sanity_chk/scl.py
cinlyooi-intel/zephyr
193fb971c24f827464982307b5b3bb34de0fa98d
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # # Zephyr's Sanity Check library # # Set of code that other projects can also import to do things on # Zephyr's sanity check testcases. import logging import yaml log = logging.getLogger("scl") # # def yaml_load(filename): """ Safely load a YAML document Follows recomendations from ...
32.180556
94
0.678032
# # Set of code that other projects can also import to do things on # Zephyr's sanity check testcases. import logging import yaml log = logging.getLogger("scl") def yaml_load(filename): try: with open(filename, 'r') as f: return yaml.safe_load(f) except yaml.scanner.ScannerError as e: ...
true
true
f716a3a44cd54534078de417bc370bb62502718a
68,239
py
Python
pandas/tests/groupby/test_groupby.py
gurukiran07/pandas
67c9385787c4d854b75a6f2c04fdf6886fdb1a06
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2017-12-14T19:50:52.000Z
2020-04-07T16:47:23.000Z
pandas/tests/groupby/test_groupby.py
zoehuang7/pandas
3cce96f515917170ea9bce731ffcc913750464b8
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/groupby/test_groupby.py
zoehuang7/pandas
3cce96f515917170ea9bce731ffcc913750464b8
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2018-01-26T08:33:54.000Z
2018-01-26T08:33:54.000Z
from datetime import datetime from decimal import Decimal from io import StringIO import numpy as np import pytest from pandas.compat import IS64 from pandas.errors import PerformanceWarning import pandas as pd from pandas import ( Categorical, DataFrame, Grouper, Index, MultiIndex, Series, ...
30.504694
88
0.587201
from datetime import datetime from decimal import Decimal from io import StringIO import numpy as np import pytest from pandas.compat import IS64 from pandas.errors import PerformanceWarning import pandas as pd from pandas import ( Categorical, DataFrame, Grouper, Index, MultiIndex, Series, ...
true
true
f716a3b6932792541e61b438e6424ea8e3b6dd6f
5,536
py
Python
src/modules/site/base/views/tools/heritability.py
AndersenLab/CAENDR
ce4cdb74db736db8226ffc90988959b71b0d5ff5
[ "MIT" ]
3
2022-02-09T07:04:37.000Z
2022-03-11T02:46:35.000Z
src/modules/site/base/views/tools/heritability.py
AndersenLab/CAENDR
ce4cdb74db736db8226ffc90988959b71b0d5ff5
[ "MIT" ]
4
2022-01-28T22:28:08.000Z
2022-02-11T21:47:15.000Z
src/modules/site/base/views/tools/heritability.py
AndersenLab/CAENDR
ce4cdb74db736db8226ffc90988959b71b0d5ff5
[ "MIT" ]
1
2022-01-11T03:39:02.000Z
2022-01-11T03:39:02.000Z
import io import pandas as pd import json from flask import (flash, request, redirect, url_for, jsonify, render_template, Blueprint, abort) from logzero import logger from datetime impor...
33.756098
164
0.684429
import io import pandas as pd import json from flask import (flash, request, redirect, url_for, jsonify, render_template, Blueprint, abort) from logzero import logger from datetime impor...
true
true
f716a488f4da02f72691c1194f86e83d967d3e2b
45,335
py
Python
test/test_sort_and_select.py
kbrose/pytorch
fc0b8e60337ae46b90ed5d2f6d1f623f0f8d6581
[ "Intel" ]
null
null
null
test/test_sort_and_select.py
kbrose/pytorch
fc0b8e60337ae46b90ed5d2f6d1f623f0f8d6581
[ "Intel" ]
null
null
null
test/test_sort_and_select.py
kbrose/pytorch
fc0b8e60337ae46b90ed5d2f6d1f623f0f8d6581
[ "Intel" ]
null
null
null
import torch import numpy as np import random from torch._six import nan from itertools import permutations, product from torch.testing import all_types, all_types_and from torch.testing._internal.common_utils import \ (TEST_WITH_ROCM, TestCase, run_tests, make_tensor, slowTest) from torch.testing._internal.commo...
45.28971
131
0.543179
import torch import numpy as np import random from torch._six import nan from itertools import permutations, product from torch.testing import all_types, all_types_and from torch.testing._internal.common_utils import \ (TEST_WITH_ROCM, TestCase, run_tests, make_tensor, slowTest) from torch.testing._internal.commo...
true
true
f716a4e754c3e3f35917e5279cd691b574a49a9b
798
py
Python
tests/test_api_v1_services_sshd_stop.py
pincher95/pfsense-api
001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45
[ "Apache-2.0" ]
null
null
null
tests/test_api_v1_services_sshd_stop.py
pincher95/pfsense-api
001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45
[ "Apache-2.0" ]
null
null
null
tests/test_api_v1_services_sshd_stop.py
pincher95/pfsense-api
001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Jared Hendrickson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
33.25
74
0.764411
import e2e_test_framework class APIE2ETestServicesSSHdStop(e2e_test_framework.APIE2ETest): uri = "/api/v1/services/sshd/stop" post_tests = [{"name": "Stop the SSHd service"}] APIE2ETestServicesSSHdStop()
true
true
f716a628b677fa7e5aaed86bc610566d88632de5
1,598
py
Python
mySpider/spiders/wangyi.py
songw831/mySpider
04312701e891e14ba7e470c3f2c0aa9997074096
[ "MIT" ]
null
null
null
mySpider/spiders/wangyi.py
songw831/mySpider
04312701e891e14ba7e470c3f2c0aa9997074096
[ "MIT" ]
null
null
null
mySpider/spiders/wangyi.py
songw831/mySpider
04312701e891e14ba7e470c3f2c0aa9997074096
[ "MIT" ]
null
null
null
import scrapy from selenium import webdriver from mySpider.items import MyspiderItem class FundSpider(scrapy.Spider): name = 'wangyi' #allowed_domains = ['www.xxx.com'] start_urls = ['http://news.163.com/'] modules_url = [] #存放五个版块的url def __init__(self): self.bro = webdriver.Chrome(execut...
38.97561
103
0.61577
import scrapy from selenium import webdriver from mySpider.items import MyspiderItem class FundSpider(scrapy.Spider): name = 'wangyi' start_urls = ['http://news.163.com/'] modules_url = [] def __init__(self): self.bro = webdriver.Chrome(executable_path='D:\PyCharm\mySpider\chromedriver.exe...
true
true
f716a6346eb2c4bb4c555f3cc80875549f7a88fc
1,780
py
Python
pandas_ta/performance/log_return.py
yssource/pandas-ta
0f975320684a91db3c04f6ea3dd739177dcb65aa
[ "MIT" ]
2
2021-03-30T01:23:14.000Z
2021-04-02T18:04:51.000Z
pandas_ta/performance/log_return.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
pandas_ta/performance/log_return.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from numpy import log as nplog from pandas_ta.utils import get_offset, verify_series def log_return(close, length=None, cumulative=False, offset=None, **kwargs): """Indicator: Log Return""" # Validate Arguments close = verify_series(close) length = int(length) if length and len...
27.8125
88
0.690449
from numpy import log as nplog from pandas_ta.utils import get_offset, verify_series def log_return(close, length=None, cumulative=False, offset=None, **kwargs): close = verify_series(close) length = int(length) if length and length > 0 else 1 offset = get_offset(offset) log_return = nplog(cl...
true
true
f716a738e6208427b79ad0f628bfff8e87f2f337
12,558
py
Python
recipe_modules/file/resources/fileutil.py
engeg/recipes-py
9dac536b55887262b4ce846f3db7a7f596542e5e
[ "Apache-2.0" ]
null
null
null
recipe_modules/file/resources/fileutil.py
engeg/recipes-py
9dac536b55887262b4ce846f3db7a7f596542e5e
[ "Apache-2.0" ]
null
null
null
recipe_modules/file/resources/fileutil.py
engeg/recipes-py
9dac536b55887262b4ce846f3db7a7f596542e5e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Utility exporting basic filesystem operations. This file was cut from "scripts/common/chromium_utils.py" at: 91310531c31...
35.078212
86
0.686495
"""Utility exporting basic filesystem operations. This file was cut from "scripts/common/chromium_utils.py" at: 91310531c31fa645256b4fb5d44b460c42b3e151 """ from __future__ import print_function import argparse import errno import fnmatch import glob import itertools import json import os import shutil import subpr...
false
true
f716a9d014c49a805a816c403771d17f603d78f9
5,119
py
Python
resolwe_bio/tools/basespace_download.py
JureZmrzlikar/resolwe-bio
54cde9b293abebad2db0564c9fefa33d6d2fe835
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/basespace_download.py
JureZmrzlikar/resolwe-bio
54cde9b293abebad2db0564c9fefa33d6d2fe835
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/basespace_download.py
JureZmrzlikar/resolwe-bio
54cde9b293abebad2db0564c9fefa33d6d2fe835
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Tool to download files from BaseSpace.""" import sys import traceback import atexit import argparse import requests class BaseSpaceDownloadError(Exception): """BaseSpace download error.""" pass def main(): """Entry point.""" session = requests.Session() atexit.registe...
34.126667
117
0.632936
import sys import traceback import atexit import argparse import requests class BaseSpaceDownloadError(Exception): pass def main(): session = requests.Session() atexit.register(on_exit, session) parser = argparse.ArgumentParser(description='Download file from Illumina BaseSpace.') parser.add_...
true
true
f716aa1fd41279e8e408620b6f55302402277111
26,185
py
Python
tests/test_sdb.py
peppelinux/pyoidc
2e751ed84039259a2b138148eae204c877518950
[ "Apache-2.0" ]
1
2020-09-30T13:08:14.000Z
2020-09-30T13:08:14.000Z
tests/test_sdb.py
peppelinux/pyoidc
2e751ed84039259a2b138148eae204c877518950
[ "Apache-2.0" ]
null
null
null
tests/test_sdb.py
peppelinux/pyoidc
2e751ed84039259a2b138148eae204c877518950
[ "Apache-2.0" ]
null
null
null
import base64 import datetime import hashlib import hmac import json import random import time from unittest import TestCase import pytest from freezegun import freeze_time from oic.oic.message import AuthorizationRequest from oic.oic.message import OpenIDRequest from oic.utils.sdb import AccessCodeUsed from oic.util...
34.228758
88
0.586901
import base64 import datetime import hashlib import hmac import json import random import time from unittest import TestCase import pytest from freezegun import freeze_time from oic.oic.message import AuthorizationRequest from oic.oic.message import OpenIDRequest from oic.utils.sdb import AccessCodeUsed from oic.util...
true
true
f716aa23ec2670b3b6679f13ad0859e223f380ff
309
py
Python
dataset/proxies.py
unknown/reddit-aita
557fd67120e529db8b014b74a71e3b926b0ed528
[ "MIT" ]
null
null
null
dataset/proxies.py
unknown/reddit-aita
557fd67120e529db8b014b74a71e3b926b0ed528
[ "MIT" ]
null
null
null
dataset/proxies.py
unknown/reddit-aita
557fd67120e529db8b014b74a71e3b926b0ed528
[ "MIT" ]
null
null
null
import random proxy_list = [ 'http://p.webshare.io:19999' ] def random_proxy(): i = random.randint(0, len(proxy_list) - 1) p = { 'http': proxy_list[i] } return p def remove_proxy(proxy): proxy_list.remove(proxy) print(f'Removed {proxy}-- {len(proxy_list)} proxies left')
19.3125
62
0.621359
import random proxy_list = [ 'http://p.webshare.io:19999' ] def random_proxy(): i = random.randint(0, len(proxy_list) - 1) p = { 'http': proxy_list[i] } return p def remove_proxy(proxy): proxy_list.remove(proxy) print(f'Removed {proxy}-- {len(proxy_list)} proxies left')
true
true
f716ab6b8551b5a9bf03bfb3d99382d22fe6e166
30,230
py
Python
Scripts/simulation/interactions/utils/creation.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/interactions/utils/creation.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/interactions/utils/creation.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\interactions\utils\creation.py # Compiled at: 2019-12-03 21:37:40 # Size of source mod 2**32: 42011 ...
58.927875
452
0.673139
from animation.animation_utils import flush_all_animations from carry.carry_elements import enter_carry_while_holding from element_utils import build_critical_section from event_testing.resolver import SingleSimResolver from filters.sim_template import TunableSimTemplate from filters.tunable import TunableSimFilter fro...
true
true
f716ac0e3959c71c4d5608a0af8d5faae868b677
93
py
Python
src/bot.py
amirsafiee/template_telegram_bot
2dfaba93de6ff6066a8b2ac64e1ee95be19c1548
[ "MIT" ]
null
null
null
src/bot.py
amirsafiee/template_telegram_bot
2dfaba93de6ff6066a8b2ac64e1ee95be19c1548
[ "MIT" ]
null
null
null
src/bot.py
amirsafiee/template_telegram_bot
2dfaba93de6ff6066a8b2ac64e1ee95be19c1548
[ "MIT" ]
1
2022-01-24T12:59:19.000Z
2022-01-24T12:59:19.000Z
import os import telebot bot = telebot.TeleBot(os.environ['BOT_TOKEN'], parse_mode='HTML')
15.5
65
0.752688
import os import telebot bot = telebot.TeleBot(os.environ['BOT_TOKEN'], parse_mode='HTML')
true
true
f716ac52c89aa1029f08962d2e19db4bbf190274
796
py
Python
util/plaintext.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
25
2020-11-06T13:54:33.000Z
2022-03-18T18:53:37.000Z
util/plaintext.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
1
2021-04-04T17:49:00.000Z
2021-04-05T13:46:21.000Z
util/plaintext.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
6
2021-04-04T17:26:09.000Z
2022-03-28T19:26:29.000Z
"""A module to keep track of a plaintext.""" class Plaintext: """An instance of a plaintext. This is a wrapper class for a plaintext, which consists of one polynomial. Attributes: poly (Polynomial): Plaintext polynomial. scaling_factor (float): Scaling factor. """ def __init...
25.677419
59
0.614322
class Plaintext: def __init__(self, poly, scaling_factor=None): self.poly = poly self.scaling_factor = scaling_factor def __str__(self): return str(self.poly)
true
true
f716acb54b4962beca238b19ba8258573c3ffe65
766
py
Python
tst/util/chain_utils.py
TST-Group-BE/flax-blockchain
ed850df4f28ef4b6f71c175c8b6d07d27f7b3cd5
[ "Apache-2.0" ]
null
null
null
tst/util/chain_utils.py
TST-Group-BE/flax-blockchain
ed850df4f28ef4b6f71c175c8b6d07d27f7b3cd5
[ "Apache-2.0" ]
null
null
null
tst/util/chain_utils.py
TST-Group-BE/flax-blockchain
ed850df4f28ef4b6f71c175c8b6d07d27f7b3cd5
[ "Apache-2.0" ]
null
null
null
from typing import List from tst.types.blockchain_format.coin import Coin from tst.types.blockchain_format.program import SerializedProgram from tst.types.blockchain_format.sized_bytes import bytes32 from tst.util.condition_tools import ( conditions_dict_for_solution, created_outputs_for_conditions_dict, ) d...
34.818182
100
0.784595
from typing import List from tst.types.blockchain_format.coin import Coin from tst.types.blockchain_format.program import SerializedProgram from tst.types.blockchain_format.sized_bytes import bytes32 from tst.util.condition_tools import ( conditions_dict_for_solution, created_outputs_for_conditions_dict, ) d...
true
true
f716ada0abc16a0476ced0d0b57cf8389076e57f
7,206
py
Python
ABA_PY/CHK_2D_postp_part_A_v4.4.py
SunilAnandatheertha/ABAPYMAT
48d4d178de38c1f3c4510ad7f06fe1647ae6227c
[ "BSD-3-Clause" ]
1
2021-01-13T14:06:34.000Z
2021-01-13T14:06:34.000Z
ABA_PY/CHK_2D_postp_part_A_v4.4.py
SunilAnandatheertha/ABAPYMAT
48d4d178de38c1f3c4510ad7f06fe1647ae6227c
[ "BSD-3-Clause" ]
5
2020-12-21T14:51:57.000Z
2021-01-21T13:42:44.000Z
ABA_PY/CHK_2D_postp_part_A_v4.4.py
SunilAnandatheertha/ABAPYMAT-PXTAL-2D
48d4d178de38c1f3c4510ad7f06fe1647ae6227c
[ "BSD-3-Clause" ]
1
2022-02-25T20:03:18.000Z
2022-02-25T20:03:18.000Z
""" COMPLETE DESCRIPTION HERE """ #----------------------------------------------------------------- #1. Seperate this file for calibration models # MAKE THE PYTHON PRE, MATLAB AND PYTHON POST and SPYDER pipelines ready for calibrations # Set up the required folders # Set up the excel file where to store the file numb...
44.481481
156
0.664585
from abaqus import * from abaqusConstants import * from caeModules import * from driverUtils import executeOnCaeStartup import os import visualization import time import numpy as np executeOnCaeStartup() Mdb() from abaqus import getInputs fields = (('Model_origin_x:', '0'), ('Model_origin_y:', '0'), ...
true
true
f716adfe3834f0888422f74ed1401389c19dd141
21,995
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_vpn_connections_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_vpn_connections_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_vpn_connections_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.447248
220
0.672926
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f716ae18f7020711ec64646291e557f4c140c538
51
py
Python
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
if __name__ == '__main__': print('hi there!!')
25.5
27
0.588235
if __name__ == '__main__': print('hi there!!')
true
true
f716ae2b03112cbb59f032b586e1bf0f10e6bd85
11,973
py
Python
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
2
2020-09-03T21:48:33.000Z
2020-09-22T08:51:14.000Z
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
from django.shortcuts import ( render, redirect, reverse, get_object_or_404, get_list_or_404, ) from django.db.models import Q from django.urls import reverse_lazy from django.contrib.auth import authenti...
35.633929
106
0.664662
from django.shortcuts import ( render, redirect, reverse, get_object_or_404, get_list_or_404, ) from django.db.models import Q from django.urls import reverse_lazy from django.contrib.auth import authenti...
true
true
f716af95472fe7d7e24b2543ce0d6861fcc6249f
6,087
py
Python
src/main/resources/rally/RallyClient.py
xebialabs-community/xlr-rally-plugin
d513cf8253457ee540dd3fc714891f33f302ea77
[ "MIT" ]
null
null
null
src/main/resources/rally/RallyClient.py
xebialabs-community/xlr-rally-plugin
d513cf8253457ee540dd3fc714891f33f302ea77
[ "MIT" ]
8
2015-06-02T10:55:04.000Z
2020-11-19T12:47:47.000Z
src/main/resources/rally/RallyClient.py
xebialabs-community/xlr-rally-plugin
d513cf8253457ee540dd3fc714891f33f302ea77
[ "MIT" ]
4
2015-06-02T09:53:43.000Z
2020-02-13T04:38:19.000Z
# # Copyright 2021 XEBIALABS # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...
50.305785
462
0.693116
import ast import os import logging from pyral import Rally from xlrelease.CredentialsFallback import CredentialsFallback from java.net import URI import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class RallyCli...
false
true
f716af9d8b3eb607fff52cdc80c5efef400bad64
664
py
Python
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
20
2016-03-01T07:34:17.000Z
2021-09-06T11:08:11.000Z
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
103
2015-02-03T13:34:55.000Z
2020-07-13T11:21:22.000Z
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
14
2015-02-03T09:00:17.000Z
2021-12-15T11:26:30.000Z
#!/usr/bin/env python import sys from hunmisc.corpustools.tsv_tools import sentence_iterator from common import sanitize_word TEMPLATE = ('{0} -> {1}_{0}\n[graph] "({1}<root> / {1})"\n' + '[fourlang] "({1}<root> / {1})"\n') def main(): seen = set() with open(sys.argv[1]) as stream: for...
24.592593
67
0.536145
import sys from hunmisc.corpustools.tsv_tools import sentence_iterator from common import sanitize_word TEMPLATE = ('{0} -> {1}_{0}\n[graph] "({1}<root> / {1})"\n' + '[fourlang] "({1}<root> / {1})"\n') def main(): seen = set() with open(sys.argv[1]) as stream: for sentence in sentence_...
true
true
f716afd528fd4bac2c2ee7f4d45b47e27b40ca16
1,143
py
Python
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
1
2021-10-20T20:08:16.000Z
2021-10-20T20:08:16.000Z
from HDPython import * from HDPython.examples import * from .helpers import Folders_isSame, vhdl_conversion, do_simulation,printf from HDPython.test_handler import add_test class test_bench_axi_fifo(v_entity): def __init__(self): super().__init__() self.architecture() def architecture(self...
23.326531
74
0.707787
from HDPython import * from HDPython.examples import * from .helpers import Folders_isSame, vhdl_conversion, do_simulation,printf from HDPython.test_handler import add_test class test_bench_axi_fifo(v_entity): def __init__(self): super().__init__() self.architecture() def architecture(self...
true
true
f716b0186a220c17477a6aa6ebacf35273a20db8
1,161
py
Python
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import unittest from geopy.compat import u from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCa...
29.025
77
0.634798
import unittest from geopy.compat import u from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classmethod def setUpC...
true
true
f716b2f64bf5f1efd19c1fea7576ec774a9a9154
532
py
Python
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
#To accepts marks in 5 subjects and displays the total and average mark #Above 90% Grade A* #90 - 80 % Grade A #70 – 80 % Grade B #60 – 70 % Grade C #Less than 60 Grade D a=float(input("Enter Mark(1):")) b=float(input("Enter Mark(2):")) c=float(input("Enter Mark(3):")) d=float(input("Enter Mark(4):"...
22.166667
71
0.577068
a=float(input("Enter Mark(1):")) b=float(input("Enter Mark(2):")) c=float(input("Enter Mark(3):")) d=float(input("Enter Mark(4):")) e=float(input("Enter Mark(5):")) f=(a+b+c+d+e)/5 if f>=90: print ("A+") elif f<90 and f>=80: print ("A") elif f<80 and f>=70: print ("B") elif f<70 and f>=60: print ("C") ...
true
true
f716b6b7fe18e32ba821b081861b3329d11d7a78
1,125
py
Python
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
import csv def write_csv(write_out_path, name, headers, rows_to_write): """ Purpose ------- This writes out a csv file of row data with an optional header. If you don't want a header, pass None to headers Parameters ---------- :param name: The file name :type name: str :param wri...
28.846154
116
0.657778
import csv def write_csv(write_out_path, name, headers, rows_to_write): if type(rows_to_write[0]) != list: rows_to_write = [[row] for row in rows_to_write] with open(f"{write_out_path}/{name}.csv", "w", newline="", encoding="utf-8") as csv_reader: csv_writer = csv.writer(csv_reader) ...
true
true
f716b763cbd4d44af6bf17e00908e21772e85af9
851
py
Python
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
null
null
null
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
9
2020-03-24T16:55:25.000Z
2022-02-17T21:56:35.000Z
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test the ticket model being serviced on localhost:8080 """ __author__ = "John Hoff" __email__ = "john.hoff@braindonor.net" __copyright__ = "Copyright 2019, John Hoff" __license__ = "Creative Commons Attribution-ShareAlike 4.0 International License" __version__ = "...
26.59375
111
0.692127
__author__ = "John Hoff" __email__ = "john.hoff@braindonor.net" __copyright__ = "Copyright 2019, John Hoff" __license__ = "Creative Commons Attribution-ShareAlike 4.0 International License" __version__ = "1.0.0" import json import requests from utility import use_project_path from model import load_sample_data_fram...
true
true
f716b8d03170ced406cf21f6d4db40052bbb480d
2,560
py
Python
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
728
2018-09-21T03:51:04.000Z
2022-03-28T09:35:04.000Z
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
103
2018-09-02T12:26:32.000Z
2022-02-09T07:19:08.000Z
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
157
2018-09-02T08:00:50.000Z
2022-03-27T22:04:50.000Z
"""Generic script exporter class for any kernel language""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import entrypoints from .templateexporter import TemplateExporter from traitlets import Dict, default from .base import get_exporter class ScriptExporter(...
40.634921
82
0.664844
import entrypoints from .templateexporter import TemplateExporter from traitlets import Dict, default from .base import get_exporter class ScriptExporter(TemplateExporter): _exporters = Dict() _lang_exporters = Dict() @default('template_file') def _template_file_default(self): retu...
true
true
f716ba644f454c2eb8166dff1191bf0ce61c89b2
598
py
Python
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from django import forms # class username(forms.Form): # usernames = forms.CharField(max_length=100) class LoginForm(forms.Form): """ Лучше пользоваться формой и объявлять ее тут, тут можно менять сам тип поля, тест, число, визивик повесить на поле В самом html этого не сможем сде...
35.176471
122
0.727425
from django import forms class LoginForm(forms.Form): username = forms.CharField(label=u'Имя пользователя') password = forms.CharField(label=u'Пароль', widget=forms.PasswordInput()) class LogoutForm(forms.Form): logout = forms.BooleanField
true
true
f716ba93e72c41d843f4c01e2abc5c7f8996c487
148
py
Python
petstagram/common/urls.py
DimAntDim/SoftUni_Petstagram_Workshop
b4d6da5fa0d19de4b434046d0b7c73a40c8343b5
[ "MIT" ]
1
2021-06-14T19:50:52.000Z
2021-06-14T19:50:52.000Z
petstagram/common/urls.py
ArifRasim/Petstagram
dc754ecc2ee7184563b26d2ba3f795c2fc767b93
[ "MIT" ]
1
2021-08-09T16:31:13.000Z
2021-08-09T16:31:13.000Z
petstagram/common/urls.py
ArifRasim/Petstagram
dc754ecc2ee7184563b26d2ba3f795c2fc767b93
[ "MIT" ]
1
2022-03-15T13:50:30.000Z
2022-03-15T13:50:30.000Z
from django.urls import path from petstagram.common.views import LandingPage urlpatterns = [ path('', LandingPage.as_view(), name='index'), ]
18.5
50
0.72973
from django.urls import path from petstagram.common.views import LandingPage urlpatterns = [ path('', LandingPage.as_view(), name='index'), ]
true
true
f716bbce2341f6be93b2694916cecbdef85fba95
1,261
py
Python
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
aaronang/filepicker-django
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
15
2015-03-25T14:00:16.000Z
2021-04-15T17:47:02.000Z
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
aaronang/filepicker-django
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
3
2015-07-14T08:33:37.000Z
2018-12-15T12:58:52.000Z
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
Ink/django-filepicker
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
5
2015-07-14T13:30:38.000Z
2018-09-30T19:56:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_filepicker.models class Migration(migrations.Migration): dependencies = [ ('filepicker_demo', '0001_initial'), ] operations = [ migrations.CreateModel( name...
30.756098
114
0.552736
from __future__ import unicode_literals from django.db import models, migrations import django_filepicker.models class Migration(migrations.Migration): dependencies = [ ('filepicker_demo', '0001_initial'), ] operations = [ migrations.CreateModel( name='BasicFilesModel', ...
true
true
f716bc49f322c1fc8a1504767c31a6b027dcd198
583
py
Python
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
null
null
null
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
null
null
null
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
1
2021-06-08T18:02:53.000Z
2021-06-08T18:02:53.000Z
from object_detection.protos.string_int_label_map_pb2 import StringIntLabelMap, StringIntLabelMapItem from google.protobuf import text_format def convert_classes(classes, start=1): msg = StringIntLabelMap() for id, name in enumerate(classes, start=start): msg.item.append(StringIntLabelMapItem(i...
30.684211
102
0.698113
from object_detection.protos.string_int_label_map_pb2 import StringIntLabelMap, StringIntLabelMapItem from google.protobuf import text_format def convert_classes(classes, start=1): msg = StringIntLabelMap() for id, name in enumerate(classes, start=start): msg.item.append(StringIntLabelMapItem(i...
true
true
f716bc57ce244e895a0fbf1e2a341ecb30e07e9c
199
py
Python
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
1
2021-08-22T22:44:41.000Z
2021-08-22T22:44:41.000Z
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
null
null
null
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
null
null
null
from django.apps import AppConfig class ProfilesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'profiles' def ready(self): from . import signals
22.111111
56
0.713568
from django.apps import AppConfig class ProfilesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'profiles' def ready(self): from . import signals
true
true
f716bc7d927d8f7d83db1221db13eba13a2be4a7
958
py
Python
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
#Define a Point3D class that inherits from object #Inside the Point3D class, define an __init__() function that accepts self, x, y, and z, and assigns these numbers to the member variables self.x, self.y, self.z #Define a __repr__() method that returns "(%d, %d, %d)" % (self.x, self.y, self.z). This tells Pytho...
34.214286
166
0.64405
import os from time import sleep def screen_clear(): if os.name == 'posix': _ = os.system('clear') else: _ = os.system('cls') sleep(1) screen_clear() class Point3D(object): def __init__(self, x, y, z): self.x = x self.y = y self.z = z def __repr__(self...
true
true
f716bd1d23d98952f326deff4604828c2677d9b6
2,934
py
Python
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
3
2020-05-06T06:11:46.000Z
2020-05-24T15:07:22.000Z
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
2
2020-04-02T14:14:28.000Z
2020-04-27T12:45:48.000Z
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
2
2020-04-04T09:32:07.000Z
2020-07-07T09:54:23.000Z
import scrapy import pickle import os import ast from urllib import parse from scrapy.selector import Selector class XinjiangSpider(scrapy.Spider): name = "Xinjiang" if not os.path.exists('../../data/HTML_pk/%s' % name): os.makedirs('../../data/HTML_pk/%s' % name) if not os.path.exists('../../data/...
38.605263
92
0.519087
import scrapy import pickle import os import ast from urllib import parse from scrapy.selector import Selector class XinjiangSpider(scrapy.Spider): name = "Xinjiang" if not os.path.exists('../../data/HTML_pk/%s' % name): os.makedirs('../../data/HTML_pk/%s' % name) if not os.path.exists('../../data/...
true
true
f716bf95e7d6fbcfe61fecbdb7066fd00f5a91e2
62,475
py
Python
gamdist/gamdist.py
rwilson4/gamdist_new
b5d41f7c55fd96399edd1a14e6e259b525495dfd
[ "Apache-2.0" ]
null
null
null
gamdist/gamdist.py
rwilson4/gamdist_new
b5d41f7c55fd96399edd1a14e6e259b525495dfd
[ "Apache-2.0" ]
null
null
null
gamdist/gamdist.py
rwilson4/gamdist_new
b5d41f7c55fd96399edd1a14e6e259b525495dfd
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Match Group, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You may # obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
41.429045
96
0.595534
import sys import pickle import multiprocessing as mp import numpy as np import scipy.special as special import scipy.stats as stats import scipy.linalg as linalg from matplotlib import pyplot as plt from .feature import _Feature from .categorical_feature import _CategoricalFeature from .linear_feature import _LinearF...
false
true
f716bfb88f86b0dedbf9b46d2a9ed40caaf4e047
405
py
Python
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
1
2019-02-01T10:37:12.000Z
2019-02-01T10:37:12.000Z
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
null
null
null
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
null
null
null
from benchmarkstt.modules import Modules from benchmarkstt.normalization import cli def test_module(): modules = Modules('cli') assert modules['normalization'] is cli assert modules.normalization is cli for k, v in modules: assert modules[k] is v assert getattr(modules, k) is v ke...
25.3125
42
0.696296
from benchmarkstt.modules import Modules from benchmarkstt.normalization import cli def test_module(): modules = Modules('cli') assert modules['normalization'] is cli assert modules.normalization is cli for k, v in modules: assert modules[k] is v assert getattr(modules, k) is v ke...
true
true
f716c03e06bd0f761318cae39eb26bd38855049d
3,328
py
Python
src/sst/elements/merlin/interfaces/pymerlin-interface.py
vjleung/sst-elements
b2d4a41f1cd152ac96c9eca54000980a26a757d3
[ "BSD-3-Clause" ]
2
2019-06-10T15:32:03.000Z
2019-06-11T14:17:32.000Z
src/sst/elements/merlin/interfaces/pymerlin-interface.py
plavin/sst-elements
a84c63fa024782383272fb32ca24eb668f25b1c7
[ "BSD-3-Clause" ]
null
null
null
src/sst/elements/merlin/interfaces/pymerlin-interface.py
plavin/sst-elements
a84c63fa024782383272fb32ca24eb668f25b1c7
[ "BSD-3-Clause" ]
1
2019-09-24T13:41:56.000Z
2019-09-24T13:41:56.000Z
#!/usr/bin/env python # # Copyright 2009-2020 NTESS. Under the terms # of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Copyright (c) 2009-2020, NTESS # All rights reserved. # # Portions are copyright of other developers: # See the file CONTRIBUTORS.TXT in the top ...
41.08642
123
0.735577
import sst from sst.merlin.base import * class LinkControl(NetworkInterface): def __init__(self): NetworkInterface.__init__(self) self._declareParams("params",["link_bw","input_buf_size","output_buf_size","vn_remap"]) self._subscribeToPlatformParamSet("network_interface") def bui...
true
true
f716c359878a902aee90be96fdffab16acbcdd2b
110,391
py
Python
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
79
2017-09-25T04:42:05.000Z
2022-03-24T06:10:56.000Z
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
1
2018-04-13T14:12:00.000Z
2018-04-13T14:12:00.000Z
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
13
2017-09-29T03:20:20.000Z
2022-03-07T13:18:16.000Z
#coding=utf-8 ################################################################################################ # A 3-part series on circle inversion, Descartes' theorem along with its variants, and more! # # # # Part 1: A...
40.915864
132
0.599125
# # # Part 1: An Introduction to Circle Inversion - https://zhuanlan.zhihu.com/p/86644341 # # Part 2: Four Circles & Descartes' Theorem (1) - https://zhuanlan.zhihu.com/p/105819963 # ############################...
true
true
f716c43082d102e192f1af6ae1893777487ae14c
11,372
py
Python
smartcab/environment.py
BhanuPrakashNani/physics-simulation
7d7ad4bff654f4ad80dbc6a7ab254489d623658f
[ "MIT" ]
7
2018-12-07T14:25:15.000Z
2021-04-07T22:14:49.000Z
smartcab/environment.py
BhanuPrakashNani/physics-simulation
7d7ad4bff654f4ad80dbc6a7ab254489d623658f
[ "MIT" ]
9
2018-12-07T18:11:29.000Z
2018-12-22T09:39:39.000Z
smartcab/environment.py
BhanuPrakashNani/physics-simulation
7d7ad4bff654f4ad80dbc6a7ab254489d623658f
[ "MIT" ]
22
2018-12-06T16:35:34.000Z
2019-01-26T13:08:14.000Z
import time,random from collections import OrderedDict from simulator import Simulator class TrafficLight(object): """A traffic light that switches periodically.""" valid_states = [True, False] # True = NS open, False = EW open def __init__(self, state=None, period=None): self.state = state if ...
42.59176
164
0.587671
import time,random from collections import OrderedDict from simulator import Simulator class TrafficLight(object): """A traffic light that switches periodically.""" valid_states = [True, False] def __init__(self, state=None, period=None): self.state = state if state is not None else random.choi...
false
true
f716c4d714c5addfce5044ca823eb0d4556612cc
518
py
Python
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
7
2019-10-11T23:53:01.000Z
2021-09-15T01:56:50.000Z
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
13
2019-08-07T16:03:51.000Z
2022-03-24T19:01:33.000Z
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
5
2019-07-24T15:59:02.000Z
2021-06-23T10:02:47.000Z
# @file # # Copyright 2020, Verizon Media # SPDX-License-Identifier: Apache-2.0 # ''' Basic smoke tests. ''' Test.Summary = ''' Test basic functions and directives. ''' Test.TxnBoxTestAndRun("Smoke Test", "smoke.replay.yaml", config_path='Auto', config_key="meta.txn_box.global" ,remap=[('http://example...
28.777778
125
0.57722
Test.Summary = ''' Test basic functions and directives. ''' Test.TxnBoxTestAndRun("Smoke Test", "smoke.replay.yaml", config_path='Auto', config_key="meta.txn_box.global" ,remap=[('http://example.one/3', 'http://example.one/3', ('--key=meta.txn_box.remap-1', 'smoke.replay.yaml')) ...
true
true
f716c4e4e1ba4e92ac11bebaf53ac8c7e09eae5b
209
py
Python
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
3
2019-03-04T22:52:07.000Z
2022-01-23T12:28:58.000Z
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
3
2021-07-23T17:30:35.000Z
2021-09-17T16:25:57.000Z
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
null
null
null
from . import constants from . import argparse from . import elements from . import materials from . import mesh from . import moc from .treat_lattice import TreatLattice from .core_builder import CoreBuilder
23.222222
39
0.808612
from . import constants from . import argparse from . import elements from . import materials from . import mesh from . import moc from .treat_lattice import TreatLattice from .core_builder import CoreBuilder
true
true
f716c526012bd7a8136418de119de0fdce82deb1
2,884
py
Python
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
5
2019-05-23T00:54:33.000Z
2021-06-01T18:06:49.000Z
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
36
2019-05-22T23:02:35.000Z
2021-04-04T21:24:17.000Z
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
14
2019-08-25T01:27:40.000Z
2021-11-17T19:25:02.000Z
import logging import os import unittest from mswh.comm.sql import Sql import pandas as pd logging.basicConfig(level=logging.DEBUG) # has setUpClass method, thus run the test on the entire class class SqlTests(unittest.TestCase): """Tests the db-python read-write capabilities.""" @classmeth...
29.428571
80
0.587379
import logging import os import unittest from mswh.comm.sql import Sql import pandas as pd logging.basicConfig(level=logging.DEBUG) class SqlTests(unittest.TestCase): @classmethod def setUpClass(cls): test_db_name = "test.db" test_db_fulpath = os.path.join(os.path.dirname(_...
true
true
f716c53c15f21f36710f5ff9f2db87e1f34e3965
2,442
py
Python
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
# Simulations-2.py import glob import math import yaml from KineticAnalysis.NumericalSimulator import NumericalSimulator PPEqThreshold = 1.0e-4 if __name__ == "__main__": # Read fits to time-resolved datasets. tr_data_sets = { } for f in glob.glob(r"TimeResolved-*.yaml"): with open...
28.729412
100
0.514742
import glob import math import yaml from KineticAnalysis.NumericalSimulator import NumericalSimulator PPEqThreshold = 1.0e-4 if __name__ == "__main__": tr_data_sets = { } for f in glob.glob(r"TimeResolved-*.yaml"): with open(f, 'rb') as input_file: input_yaml = yaml.loa...
true
true
f716c5621fcdf0c3aada36d496dec8b1fe35c8cc
9,045
py
Python
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
2
2021-08-21T01:25:50.000Z
2021-12-10T06:51:46.000Z
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
null
null
null
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
6
2021-03-14T22:21:23.000Z
2022-03-29T15:30:58.000Z
########################################################################################### # Created by Jason Downing # # Some code originally found at this Stackoverflow Post: # # https://stackoverflow.com/questions/1896...
31.297578
109
0.629519
import json import requests from bs4 import BeautifulSoup urls = ["http://www.waterville.com/ski-ride/snow-report.html", "http://cannonmt.com/trail-lift-report.html", "http://brettonwoods.com/alpine_trails/trail_report#top", "http://www.loonmtn.com/explore/snow-conditions/trail-lift-report", ...
true
true
f716c5911528e44ebe67f4a2d8cb1ca1d4e1243b
4,273
py
Python
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
null
null
null
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
null
null
null
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
1
2020-03-13T08:16:17.000Z
2020-03-13T08:16:17.000Z
""" Chatbox API """ import os from bottle import get, local, post, request import yaml from codalab.objects.chat_box_qa import ChatBoxQA from codalab.server.authenticated_plugin import AuthenticatedPlugin @get('/chats', apply=AuthenticatedPlugin()) def get_chat_box(): """ Return a list of chats that the cur...
34.739837
132
0.656681
import os from bottle import get, local, post, request import yaml from codalab.objects.chat_box_qa import ChatBoxQA from codalab.server.authenticated_plugin import AuthenticatedPlugin @get('/chats', apply=AuthenticatedPlugin()) def get_chat_box(): query = {'user_id': request.user.user_id} return { ...
true
true
f716c5deb4bfae59b106289a4f4dd8d17a07d48e
12,462
py
Python
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
import pytest import json import time from ldclient.client import LDClient, Config from ldclient.feature_store import InMemoryFeatureStore from ldclient.flag import EvaluationDetail from ldclient.interfaces import FeatureStore from ldclient.versioned_data_kind import FEATURES from testing.stub_util import MockEventProc...
34.520776
116
0.620847
import pytest import json import time from ldclient.client import LDClient, Config from ldclient.feature_store import InMemoryFeatureStore from ldclient.flag import EvaluationDetail from ldclient.interfaces import FeatureStore from ldclient.versioned_data_kind import FEATURES from testing.stub_util import MockEventProc...
true
true
f716c6d4dbe952ad73298aca3af754a81ad523a5
1,666
py
Python
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
19
2019-07-01T13:31:45.000Z
2021-08-02T10:46:59.000Z
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
1
2019-07-11T15:15:18.000Z
2019-07-20T16:41:36.000Z
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
15
2019-07-11T21:26:06.000Z
2021-08-04T09:04:59.000Z
from aiogram import Bot, Dispatcher, executor, types from aiogram.utils.exceptions import CantParseEntities from dotenv import load_dotenv, find_dotenv from signal import signal, SIGINT from tqdm import tqdm from os import getenv import sys import fire import uvloop import redis load_dotenv(find_dotenv('.telegram')) u...
27.311475
76
0.697479
from aiogram import Bot, Dispatcher, executor, types from aiogram.utils.exceptions import CantParseEntities from dotenv import load_dotenv, find_dotenv from signal import signal, SIGINT from tqdm import tqdm from os import getenv import sys import fire import uvloop import redis load_dotenv(find_dotenv('.telegram')) u...
true
true