hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
66417885fd18a033be08fc835a9713f2744a15e6 | 1,772 | py | Python | mow/strong/phase2/split_data.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | 3 | 2019-01-22T03:14:32.000Z | 2019-08-17T02:22:06.000Z | mow/strong/phase2/split_data.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | null | null | null | mow/strong/phase2/split_data.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | null | null | null | import os
import sys
import time
import math
import random
import pickle
import numpy as np
import pandas as pd
from keras.utils import to_categorical
with open('./map.pkl', 'rb') as f:
map_dict = pickle.load(f)
train_label_path = os.path.join('/tmp2/b03902110', 'Y_train_ens_verified.csv')
Y_train = pd.read_csv(... | 26.848485 | 78 | 0.69921 |
11f4d6e9d19e19114cfb55374ce83b82d623833d | 2,007 | py | Python | language/nql/nql/symbol_test.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | 1,199 | 2018-10-16T01:30:18.000Z | 2022-03-31T21:05:24.000Z | language/nql/nql/symbol_test.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | 116 | 2018-10-18T03:31:46.000Z | 2022-03-24T13:40:50.000Z | language/nql/nql/symbol_test.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | 303 | 2018-10-22T12:35:12.000Z | 2022-03-27T17:38:17.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 30.409091 | 74 | 0.688092 |
21ec6a1b49e18f409aa0b0dea04d2a2f2e62c837 | 857 | py | Python | tatudashboard/dashboards/tatu/pat/panel.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | tatudashboard/dashboards/tatu/pat/panel.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | tatudashboard/dashboards/tatu/pat/panel.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Huawei, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 32.961538 | 78 | 0.735123 |
7e6750016008d461725153ed02a925585c4817cb | 7,142 | py | Python | bin/mapEncodeTSStoRegions.py | gaofeng21cn/IDP-fusion | 052ac4f868fd416e10165ef4891804d25edc8862 | [
"Apache-2.0"
] | 5 | 2017-09-18T18:21:26.000Z | 2020-05-01T23:29:26.000Z | bin/mapEncodeTSStoRegions.py | gaofeng21cn/IDP-fusion | 052ac4f868fd416e10165ef4891804d25edc8862 | [
"Apache-2.0"
] | 3 | 2018-11-26T16:35:12.000Z | 2021-11-22T07:16:51.000Z | bin/mapEncodeTSStoRegions.py | gaofeng21cn/IDP-fusion | 052ac4f868fd416e10165ef4891804d25edc8862 | [
"Apache-2.0"
] | 4 | 2018-01-02T13:08:14.000Z | 2020-10-30T01:07:58.000Z | #!/usr/bin/python
import sys
from operator import itemgetter, attrgetter
import bisect
import re
TSS_THRESHOLD = 0.99
OVERLAP_THRESHOLD = 0.0
### parse_tss_file
##################
def parse_tss_file(tss_file):
tss_dict = {}
for line in tss_file:
fields = line.split()
rname = fiel... | 33.688679 | 134 | 0.573789 |
b31b2b4a0fbd27df0f7578d74da3028e2d3a0d88 | 1,284 | py | Python | ludwig/encoders/base.py | carlogrisetti/ludwig | 5c0887f14867e1577e0ddc3806c5cf7a781fb665 | [
"Apache-2.0"
] | null | null | null | ludwig/encoders/base.py | carlogrisetti/ludwig | 5c0887f14867e1577e0ddc3806c5cf7a781fb665 | [
"Apache-2.0"
] | null | null | null | ludwig/encoders/base.py | carlogrisetti/ludwig | 5c0887f14867e1577e0ddc3806c5cf7a781fb665 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
# Copyright (c) 2020 Uber Technologies, 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
#
# Unles... | 30.571429 | 80 | 0.683801 |
2df0deb44e3b346da84f372e632b8b53116ab426 | 3,014 | py | Python | src/controller/LoginController.py | tinfins/CMSC495-Group-3 | 0b7ea3c885322631d6dd3ef7ee96b6a98ba2392e | [
"MIT"
] | 1 | 2021-02-11T01:18:08.000Z | 2021-02-11T01:18:08.000Z | src/controller/LoginController.py | tinfins/CMSC495-Group-3 | 0b7ea3c885322631d6dd3ef7ee96b6a98ba2392e | [
"MIT"
] | 1 | 2021-01-28T00:03:15.000Z | 2021-01-28T00:03:15.000Z | src/controller/LoginController.py | tinfins/CMSC495-Group-3 | 0b7ea3c885322631d6dd3ef7ee96b6a98ba2392e | [
"MIT"
] | 3 | 2021-02-13T22:45:14.000Z | 2021-02-16T02:57:11.000Z | import logging.config
# Big Teacher module imports
import src.gui.LoginGui as LoginGui
import src.gui.MessageBox as MessageBox
from src.utils.Settings import Settings
import src.controller.MainPageController as MainPageController
from src.utils.Connector import Connector
class LoginController:
'''
Login contr... | 43.681159 | 123 | 0.663238 |
3e79a95ab68035628caa64fdd46e2a6a04a25bbc | 1,509 | py | Python | losses.py | 7enTropy7/ravdl | b478f21e8da7b3d3641456ceec4952a3d79ec515 | [
"MIT"
] | null | null | null | losses.py | 7enTropy7/ravdl | b478f21e8da7b3d3641456ceec4952a3d79ec515 | [
"MIT"
] | null | null | null | losses.py | 7enTropy7/ravdl | b478f21e8da7b3d3641456ceec4952a3d79ec515 | [
"MIT"
] | 4 | 2021-03-19T08:01:21.000Z | 2021-06-16T08:11:01.000Z | import ravop.core as R
class Loss():
def __init__(self):
self.one = R.Scalar(1)
self.zero = R.Scalar(0)
def cross_entropy(self, y_true, y_pred):
return R.Scalar(-1).multiply(R.sum(y_true.multiply(R.natlog(y_pred)))).div(R.Scalar(y_pred.shape[0]))
def mean_squared_error(self, y_tru... | 39.710526 | 130 | 0.645461 |
189e67fab78cd14dc2f8db42b0fc5db06447d076 | 49,500 | py | Python | django/db/models/fields/related_descriptors.py | stefb965/django | a599ae6018f748f66e774604d12989911ea09d33 | [
"PSF-2.0",
"BSD-3-Clause"
] | 4 | 2020-04-08T17:57:46.000Z | 2021-11-08T08:56:16.000Z | django/db/models/fields/related_descriptors.py | stefb965/django | a599ae6018f748f66e774604d12989911ea09d33 | [
"PSF-2.0",
"BSD-3-Clause"
] | 7 | 2018-06-18T17:56:50.000Z | 2020-06-24T16:51:04.000Z | django/db/models/fields/related_descriptors.py | stefb965/django | a599ae6018f748f66e774604d12989911ea09d33 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2019-08-19T20:41:48.000Z | 2019-10-10T17:29:52.000Z | """
Accessors for related objects.
When a field defines a relation between two models, each model class provides
an attribute to access related instances of the other model class (unless the
reverse accessor has been disabled with related_name='+').
Accessors are implemented as descriptors in order to customize acces... | 44.196429 | 119 | 0.595515 |
8170ed7bf4b502f072be97c994ab3b9d61b673e8 | 16,993 | py | Python | life/universes.py | japinol7/life | 5462a497011685754eef61503e7697c22ae8dbe9 | [
"MIT"
] | 2 | 2019-07-13T09:38:42.000Z | 2019-07-14T13:06:16.000Z | life/universes.py | japinol7/life | 5462a497011685754eef61503e7697c22ae8dbe9 | [
"MIT"
] | null | null | null | life/universes.py | japinol7/life | 5462a497011685754eef61503e7697c22ae8dbe9 | [
"MIT"
] | null | null | null | """Module universes."""
__author__ = 'Joan A. Pinol (japinol)'
from random import randint
import numpy as np
from numpy.lib.stride_tricks import as_strided
import pygame as pg
from life.cells import Cell
from life import lib_jp
from life import resources
from life import seeds
from life.settings impo... | 43.34949 | 101 | 0.558348 |
6d728b6b2f39532ca7b1685f07a6bc7c957f85ce | 195 | py | Python | examples/sample_1/schema.py | sujavarghese/data-validator | e0c5d94da797cb43b17d6ee193d337cbcb602f49 | [
"MIT"
] | null | null | null | examples/sample_1/schema.py | sujavarghese/data-validator | e0c5d94da797cb43b17d6ee193d337cbcb602f49 | [
"MIT"
] | null | null | null | examples/sample_1/schema.py | sujavarghese/data-validator | e0c5d94da797cb43b17d6ee193d337cbcb602f49 | [
"MIT"
] | null | null | null | from file_validator.schema.schema import FeatureSchema
from examples.sample_1.validator import CustomRule
class ContactsSchema(FeatureSchema):
map = {
'check_xyz': CustomRule
}
| 21.666667 | 54 | 0.758974 |
b0b30d340e582108bb055dbe33b39f41f1f088aa | 976 | py | Python | explore.py | mbirkholzupc/btfm | 2ed2a46a9ae5d5e71651c06807f8d88f581f2613 | [
"MIT"
] | null | null | null | explore.py | mbirkholzupc/btfm | 2ed2a46a9ae5d5e71651c06807f8d88f581f2613 | [
"MIT"
] | null | null | null | explore.py | mbirkholzupc/btfm | 2ed2a46a9ae5d5e71651c06807f8d88f581f2613 | [
"MIT"
] | null | null | null | import os
import pickle
import numpy as np
from scipy.spatial.distance import euclidean
from pathlib import Path
from paths import *
infile=open(BTFM_BASE+TDPW_TRAIN_DIR+'/courtyard_arguing_00.pkl', 'rb')
#infile=open(BTFM_BASE+TDPW_TEST_DIR+'/downtown_arguing_00.pkl', 'rb')
#infile=open(BTFM_BASE+TDPW_TEST_DIR+'/ou... | 26.378378 | 84 | 0.71209 |
a6786da3ef9b1775bf7729991c4fd30283fea5a4 | 474 | py | Python | projects/TensorMask/project_structure.py | ndaysinaiK/detectron2 | 01089051137de08175e2376a17bd8e3106cdf372 | [
"Apache-2.0"
] | null | null | null | projects/TensorMask/project_structure.py | ndaysinaiK/detectron2 | 01089051137de08175e2376a17bd8e3106cdf372 | [
"Apache-2.0"
] | null | null | null | projects/TensorMask/project_structure.py | ndaysinaiK/detectron2 | 01089051137de08175e2376a17bd8e3106cdf372 | [
"Apache-2.0"
] | null | null | null | import os
import seedir as sd # pip install seedir
def list_files(startpath):
for root, dirs, files in os.walk(startpath):
level = root.replace(startpath, '').count(os.sep)
indent = ' ' * 4 * (level)
print('{}{}/'.format(indent, os.path.basename(root)))
subindent = ' ' * 4 * (level ... | 33.857143 | 76 | 0.597046 |
41be1c556ab8551bc97ce458b09d1f3095601f6c | 1,116 | py | Python | svm preprocessing.py | agam001/Data-Preprocessing | 0d2a7e6316fcdc1b01a9f8465eb2e9fb3b4ec1fe | [
"MIT"
] | null | null | null | svm preprocessing.py | agam001/Data-Preprocessing | 0d2a7e6316fcdc1b01a9f8465eb2e9fb3b4ec1fe | [
"MIT"
] | null | null | null | svm preprocessing.py | agam001/Data-Preprocessing | 0d2a7e6316fcdc1b01a9f8465eb2e9fb3b4ec1fe | [
"MIT"
] | null | null | null | def preprocess():
feature_count = X_train.shape[1]
W = np.zeros((101,2,feature_count))
for i in range(feature_count):
feature = X_train_magnified[:,i]
for num in range(101):
index = np.argwhere(feature == num)
target_val,counts=np.unique(y_train.to_numpy()[index],return_counts=True)
if len(c... | 30.162162 | 84 | 0.575269 |
8e37424dc5f4411cbd4c80b37e968701fa4b3cc2 | 3,190 | py | Python | asset/synth.py | Kami/google-cloud-python | a14ffbaa50f7823c2792e91413a37cbc3ce687f5 | [
"Apache-2.0"
] | 1 | 2019-06-14T10:11:59.000Z | 2019-06-14T10:11:59.000Z | asset/synth.py | Kami/google-cloud-python | a14ffbaa50f7823c2792e91413a37cbc3ce687f5 | [
"Apache-2.0"
] | 1 | 2018-04-06T19:51:23.000Z | 2018-04-06T19:51:23.000Z | asset/synth.py | Kami/google-cloud-python | a14ffbaa50f7823c2792e91413a37cbc3ce687f5 | [
"Apache-2.0"
] | 1 | 2020-04-14T10:47:41.000Z | 2020-04-14T10:47:41.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.444444 | 95 | 0.652351 |
bf7ba5bbac8f62b4946ae15119247c797681af63 | 875 | py | Python | osm_web/users/tests/test_drf_views.py | asheeq/osm_web | 73dbb6aa343028b3a30b7a9be8c0502aa625c191 | [
"MIT"
] | null | null | null | osm_web/users/tests/test_drf_views.py | asheeq/osm_web | 73dbb6aa343028b3a30b7a9be8c0502aa625c191 | [
"MIT"
] | null | null | null | osm_web/users/tests/test_drf_views.py | asheeq/osm_web | 73dbb6aa343028b3a30b7a9be8c0502aa625c191 | [
"MIT"
] | null | null | null | import pytest
from django.test import RequestFactory
from osm_web.users.api.views import UserViewSet
from osm_web.users.models import User
pytestmark = pytest.mark.django_db
class TestUserViewSet:
def test_get_queryset(self, user: User, rf: RequestFactory):
view = UserViewSet()
request = rf.get(... | 25 | 67 | 0.616 |
a9928d38f1c19715454503bd04c3039ec5b87d07 | 23,143 | py | Python | pyjiffy/cache_bench/file_cache_benchmark.py | mckarthik7/jiffy | 78202218b06669a100634fe65e3166bffe39bd83 | [
"Apache-2.0"
] | 10 | 2021-03-04T07:23:24.000Z | 2022-03-26T07:36:00.000Z | pyjiffy/cache_bench/file_cache_benchmark.py | hesuyouren/jiffy | 1bcee0593fe2ab505224f3f9c85caa5d0fe1e8c3 | [
"Apache-2.0"
] | 1 | 2021-03-12T15:20:03.000Z | 2021-03-12T15:20:03.000Z | pyjiffy/cache_bench/file_cache_benchmark.py | hesuyouren/jiffy | 1bcee0593fe2ab505224f3f9c85caa5d0fe1e8c3 | [
"Apache-2.0"
] | 7 | 2021-03-12T05:46:15.000Z | 2022-02-14T07:08:01.000Z | import argparse
from jiffy import JiffyClient, b, Flags
from jiffy.benchmark.zipf_generator import gen_zipf
import time
import threading
class FileBenchmark:
def __init__(self, clients, data_size, num_clients, num_ops):
self.data_ = "x" * data_size
self.num_clients = num_clients
self.num_op... | 43.257944 | 157 | 0.530095 |
ea6bb250dae4a3c8beee6bd443ebf6a8e051d41f | 779 | py | Python | adv/valentines_melody.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | adv/valentines_melody.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | adv/valentines_melody.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | from core.advbase import *
def module():
return Valentines_Melody
class Valentines_Melody(Adv):
conf = {}
conf['slots.a'] = [
'Summer_Paladyns',
'Flash_of_Genius',
'Kung_Fu_Masters',
'The_Plaguebringer',
'Chariot_Drift'
]
conf['slots.d'] = 'Ariel'
conf['acl'] = """
... | 22.911765 | 66 | 0.567394 |
172c36aa6f0f69d8190eb1a1f9945be053800ee5 | 404 | py | Python | datasources/migrations/0007_datasource_api_key.py | tiferrei/PEDASI | b819aee93de99c00a1aa3eb9d32102b89f72459e | [
"MIT"
] | null | null | null | datasources/migrations/0007_datasource_api_key.py | tiferrei/PEDASI | b819aee93de99c00a1aa3eb9d32102b89f72459e | [
"MIT"
] | 18 | 2019-02-27T12:39:27.000Z | 2021-03-24T16:32:47.000Z | datasources/migrations/0007_datasource_api_key.py | Southampton-RSG/PEDASI-IoT | 25a111ac7cf4b23fee50ad8eac6ea21564954859 | [
"MIT"
] | 1 | 2021-02-16T17:47:15.000Z | 2021-02-16T17:47:15.000Z | # Generated by Django 2.0.8 on 2018-10-10 12:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('datasources', '0006_one_to_one_group'),
]
operations = [
migrations.AddField(
model_name='datasource',
name='api_key... | 21.263158 | 63 | 0.608911 |
ef6a9878f83acb73ca53ea0d24cf0f12a8718976 | 183 | py | Python | sound/basic-sounds/square-wave.py | martinmcbride/python-projects-for-gcse | cdf4696650b641657e116a3307d4271a114b80df | [
"MIT"
] | null | null | null | sound/basic-sounds/square-wave.py | martinmcbride/python-projects-for-gcse | cdf4696650b641657e116a3307d4271a114b80df | [
"MIT"
] | null | null | null | sound/basic-sounds/square-wave.py | martinmcbride/python-projects-for-gcse | cdf4696650b641657e116a3307d4271a114b80df | [
"MIT"
] | null | null | null | from pysound.wavetable import square_wave
from pysound.soundfile import write_wav
wave = square_wave(frequency=400, amplitude=0.9)
write_wav(source=wave, filename='square-wave.wav')
| 30.5 | 50 | 0.819672 |
9d0b6b009f679a030f4d8859615513523da6cfde | 20,897 | py | Python | src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py | chpspiir/azure-cli | 70a9d7fda754267a20f8593adf9f2013ae18f74f | [
"MIT"
] | 1 | 2020-12-14T15:30:11.000Z | 2020-12-14T15:30:11.000Z | src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py | chpspiir/azure-cli | 70a9d7fda754267a20f8593adf9f2013ae18f74f | [
"MIT"
] | 3 | 2021-03-26T00:41:56.000Z | 2022-03-29T22:04:08.000Z | src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py | chpspiir/azure-cli | 70a9d7fda754267a20f8593adf9f2013ae18f74f | [
"MIT"
] | 1 | 2020-12-14T15:30:14.000Z | 2020-12-14T15:30:14.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 62.565868 | 209 | 0.705077 |
d89f2c58e573682eed9e02a5ef058e37a657c170 | 3,696 | py | Python | utils/script/recorder.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | 3 | 2022-01-06T06:42:12.000Z | 2022-01-20T04:00:40.000Z | utils/script/recorder.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | null | null | null | utils/script/recorder.py | junkunyuan/CSAC | 70d918ed2fe65a0a503b56d66136032031cd67e4 | [
"MIT"
] | null | null | null | import json,os
import numpy as np
import os.path as osp
class AccRecorder(object):
"""Save acc on all domains."""
def __init__(self, name, decimal=4):
self.decimal = decimal
self.name = name
self.reset()
def reset(self):
self.accs = {}
self.iter_steps = {}
s... | 32.13913 | 82 | 0.517045 |
02247f87c08dc1df7c3462512f8dae8f187e53f5 | 413 | py | Python | app/email.py | ibukamshindi/Pitches-App | 43406aa9e3f0710eb954dfb463c4d76fb525851f | [
"MIT"
] | null | null | null | app/email.py | ibukamshindi/Pitches-App | 43406aa9e3f0710eb954dfb463c4d76fb525851f | [
"MIT"
] | null | null | null | app/email.py | ibukamshindi/Pitches-App | 43406aa9e3f0710eb954dfb463c4d76fb525851f | [
"MIT"
] | null | null | null | from flask_mail import Message
from flask import render_template
from . import mail
# subject_pref = 'PITCH'
sender_email = 'patodev01@yahoo.com'
def mail_message(subject, template, to, **kwargs,):
email = Message(subject, sender=sender_email, recipients=[to])
email.body = render_template(template + ".txt", ... | 31.769231 | 66 | 0.726392 |
271432a4942c0a109d0372908def8b3d01837e4d | 1,295 | py | Python | tests/unit/modules/test_chef.py | nevins-b/salt | 56363bc41ca36e757103df3504d1bb07e3a7251b | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_chef.py | nevins-b/salt | 56363bc41ca36e757103df3504d1bb07e3a7251b | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_chef.py | nevins-b/salt | 56363bc41ca36e757103df3504d1bb07e3a7251b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
... | 26.428571 | 69 | 0.666409 |
3c13578c7681177719d7ec63c1b8021c6050d90a | 11,646 | py | Python | src/python/wntr_vis.py | NREL-SIIP/WaterModelsAnalytics.jl | dff18c644546cb0087bf5ca2569845fe7b9a84f9 | [
"BSD-3-Clause"
] | 4 | 2020-10-15T15:40:31.000Z | 2021-02-19T19:44:03.000Z | src/python/wntr_vis.py | NREL-SIIP/WaterModelsAnalytics.jl | dff18c644546cb0087bf5ca2569845fe7b9a84f9 | [
"BSD-3-Clause"
] | 37 | 2020-08-16T23:08:43.000Z | 2022-03-03T18:07:03.000Z | src/python/wntr_vis.py | NREL-SIIP/WaterModelsAnalytics.jl | dff18c644546cb0087bf5ca2569845fe7b9a84f9 | [
"BSD-3-Clause"
] | 2 | 2020-08-16T23:01:14.000Z | 2021-01-28T16:49:06.000Z | """
Functions to create graph visualizations of WNTR networks
"""
## TODO:
# - [nothing at the moment, JJS 1/25/21]
import numpy as np
import wntr
import networkx as nx
import pandas as pd
import warnings
import matplotlib
from matplotlib import cm, colors, colorbar, pyplot
import PyPDF2
import os
def build_graph(... | 35.290909 | 87 | 0.633866 |
bbea081bdac1eac18ee037150227c01c2aadf088 | 1,424 | py | Python | sentiment_model.py | justinli930/Public-Morale-Over-Covid | 36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec | [
"Apache-2.0"
] | null | null | null | sentiment_model.py | justinli930/Public-Morale-Over-Covid | 36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec | [
"Apache-2.0"
] | null | null | null | sentiment_model.py | justinli930/Public-Morale-Over-Covid | 36fc07e48fe5fcf11cc9c35856f3e2eedc4998ec | [
"Apache-2.0"
] | null | null | null | import os
import spacy
from spacy.tokenizer import Tokenizer
def predict_sentiment(txt: str, direc: str = 'models/sentiment/saved_models/model50') -> float:
"""
predicts sentiment of string
only use for testing not good for large data because
model is loaded each time
input is a txt string
opti... | 35.6 | 112 | 0.698034 |
77a74d3571b72b946a5602bab7a4ad2f14081738 | 2,016 | py | Python | tablet/urls.py | FarsetLabs/farset-nadine | f0f5e81a9fbe98a4333f6318443fefbb5517c60f | [
"Apache-2.0"
] | null | null | null | tablet/urls.py | FarsetLabs/farset-nadine | f0f5e81a9fbe98a4333f6318443fefbb5517c60f | [
"Apache-2.0"
] | 4 | 2021-03-19T16:10:13.000Z | 2022-03-12T00:55:50.000Z | tablet/urls.py | FarsetLabs/farset-nadine | f0f5e81a9fbe98a4333f6318443fefbb5517c60f | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from django.views.generic import RedirectView
from . import views
urlpatterns = [
url(r'^$', views.members),
url(r'^members/$', views.members, name='tablet_members'),
url(r'^here_today/$', views.here_today, name='tablet_here_today'),
url(r'^visitors/$', views.visitors,... | 80.64 | 583 | 0.69494 |
cc98243ffeebc459d53201d7a316c93abf07da80 | 2,667 | py | Python | app/waterQual/30yr/sherlock/sh_rbWN5_hs.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/waterQual/30yr/sherlock/sh_rbWN5_hs.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/waterQual/30yr/sherlock/sh_rbWN5_hs.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | 2 | 2021-04-04T02:45:59.000Z | 2022-03-19T09:41:39.000Z | from hydroDL import kPath
from hydroDL.app import waterQuality
from hydroDL.master import basins
from hydroDL.data import usgs, gageII, gridMET, ntn
import numpy as np
from hydroDL.master import slurm
import importlib
# for a test on training to resolve warnings
varNtnLst = ['ph', 'Conduc', 'Ca', 'Mg', 'K', 'Na', 'NH4... | 33.3375 | 90 | 0.509186 |
d91b80d2017a70a51ec7867d27733d1c22579dfd | 9,963 | py | Python | config/settings/base.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | config/settings/base.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | 5 | 2020-06-05T19:49:47.000Z | 2021-09-08T00:50:55.000Z | config/settings/base.py | jisuhan3201/osc-bge | 125c441d23d7f1fdb2d9b8f42f859082e757e25a | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
import environ
ROOT_DIR = environ.Path(__file__) - 3 # (osc_bge/config/settings/base.py - 3 = osc_bge/)
APPS_DIR = ROOT_DIR.path('osc_bge')
env = environ.Env()
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False)
if READ_DOT_ENV_FILE:
... | 38.172414 | 100 | 0.630934 |
d745b1e12887d8beb4bb725e0f01c8a6976c8a44 | 1,361 | py | Python | src/twitter_monitor/monitoring/twitter_monitor/cli.py | P6rguVyrst/pymon-tools | bcf88d29dc5df31c87df220ef02aeb8124d309a2 | [
"MIT"
] | null | null | null | src/twitter_monitor/monitoring/twitter_monitor/cli.py | P6rguVyrst/pymon-tools | bcf88d29dc5df31c87df220ef02aeb8124d309a2 | [
"MIT"
] | 2 | 2021-11-15T17:46:46.000Z | 2021-11-15T17:46:49.000Z | src/twitter_monitor/monitoring/twitter_monitor/cli.py | P6rguVyrst/pymon-tools | bcf88d29dc5df31c87df220ef02aeb8124d309a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Console script for twitter_monitor."""
from datetime import (
datetime,
timedelta,
)
import configparser
import click
from monitoring.twitter_monitor import Monitor
from monitoring.exceptions import MonitoringError
'''
@click.option('--host', default='localhost')
@click.op... | 26.173077 | 68 | 0.65687 |
10692e7daa15c2c8ef05c8fef6f457212dbf10ff | 1,195 | py | Python | backend/unpp_api/apps/project/admin.py | unicef/un-partner-portal | 73afa193a5f6d626928cae0025c72a17f0ef8f61 | [
"Apache-2.0"
] | 6 | 2017-11-21T10:00:44.000Z | 2022-02-12T16:51:48.000Z | backend/unpp_api/apps/project/admin.py | unicef/un-partner-portal | 73afa193a5f6d626928cae0025c72a17f0ef8f61 | [
"Apache-2.0"
] | 995 | 2017-07-31T02:08:36.000Z | 2022-03-08T22:44:03.000Z | backend/unpp_api/apps/project/admin.py | unicef/un-partner-portal | 73afa193a5f6d626928cae0025c72a17f0ef8f61 | [
"Apache-2.0"
] | 1 | 2021-07-21T10:45:15.000Z | 2021-07-21T10:45:15.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from project.models import (
EOI,
ClarificationRequestQuestion,
ClarificationRequestAnswerFile,
EOIAttachment,
Pin,
Application,
ApplicationFeedback,
Assessment,
)
class ApplicationAdmin(ad... | 30.641026 | 112 | 0.735565 |
ffa52ab333df987c1aa61d89fe98b3dfa5edf99a | 1,393 | py | Python | pymage/io.py | MickaelRigault/pymage | 8e2ec7ef876b0e9f51c465a12a6ad9e83688622c | [
"Apache-2.0"
] | null | null | null | pymage/io.py | MickaelRigault/pymage | 8e2ec7ef876b0e9f51c465a12a6ad9e83688622c | [
"Apache-2.0"
] | null | null | null | pymage/io.py | MickaelRigault/pymage | 8e2ec7ef876b0e9f51c465a12a6ad9e83688622c | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import io
import warnings
DATAPATH = os.getenv("DATAPATH","_notdefined_")
if DATAPATH == "_notdefined_":
warnings.warn("You don't have a global variable named 'DATAPATH'. You need one to be able to download data. They will be stored in $DATAPATH/{INSTRUNAME... | 34.825 | 163 | 0.628859 |
82ff5d0e01423b6aa8e09017b5e960b9e3f26a20 | 1,296 | py | Python | analysis/model_get_spike_stats_active_inputs.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/model_get_spike_stats_active_inputs.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/model_get_spike_stats_active_inputs.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 4 | 2020-02-18T09:25:20.000Z | 2021-11-20T23:52:29.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 11 10:25:41 2018
@author: daniel
"""
import shelve
import numpy as np
import matplotlib.pyplot as plt
import os
import pdb
#Home PC
#directory = "C:\\Users\\daniel\\repos\\pyDentate\paradigm_pattern-separation_saves_2018-03-11\\"
#Office PC
#directory = "Y:\\DanielM\\023... | 33.230769 | 156 | 0.695216 |
3bc6fa5ec0c086333fc87c6d894830e397a36b5a | 3,212 | py | Python | app/app/settings.py | VishnuSuresh2000/recipe-api | e162511568e37a98186a129079a3605f48c4dd14 | [
"MIT"
] | null | null | null | app/app/settings.py | VishnuSuresh2000/recipe-api | e162511568e37a98186a129079a3605f48c4dd14 | [
"MIT"
] | null | null | null | app/app/settings.py | VishnuSuresh2000/recipe-api | e162511568e37a98186a129079a3605f48c4dd14 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 4.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib imp... | 25.903226 | 91 | 0.700187 |
9e87641dfc171dcd6c18826fcc20b42c3426a276 | 985 | py | Python | CloudDisk/urls.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | 1 | 2020-04-25T02:21:08.000Z | 2020-04-25T02:21:08.000Z | CloudDisk/urls.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | 2 | 2021-03-30T13:10:00.000Z | 2021-06-10T18:57:26.000Z | CloudDisk/urls.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | null | null | null | """CloudDisk URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 36.481481 | 82 | 0.722843 |
bcb4c42969b6daf505596dada7c633225285148a | 1,952 | py | Python | wye/profiles/migrations/0001_initial.py | salmanulfarzy/wye | a52c15725f44688243c4b63ff7375553c7002d7b | [
"MIT"
] | 75 | 2015-08-27T04:16:17.000Z | 2022-01-05T13:59:46.000Z | wye/profiles/migrations/0001_initial.py | salmanulfarzy/wye | a52c15725f44688243c4b63ff7375553c7002d7b | [
"MIT"
] | 396 | 2015-09-13T04:50:58.000Z | 2022-03-11T23:25:50.000Z | wye/profiles/migrations/0001_initial.py | taranjeet/wye | ac4cc23d38cf2e72f87a0c1d26fff0316645c1ea | [
"MIT"
] | 112 | 2015-08-30T12:58:50.000Z | 2021-01-31T17:02:31.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
('regions', '0001_initial'),
('workshops', '0001_i... | 36.830189 | 135 | 0.555328 |
fcc724d2bee395159786083d98a634c764ea9db0 | 12,879 | py | Python | models/mobilenetv2exfuse.py | headupinclouds/LightNet | 04af22501d644b30a93b30b28b32163d60ae2266 | [
"MIT"
] | 737 | 2018-03-21T12:28:04.000Z | 2021-07-07T16:03:09.000Z | models/mobilenetv2exfuse.py | headupinclouds/LightNet | 04af22501d644b30a93b30b28b32163d60ae2266 | [
"MIT"
] | 23 | 2018-03-22T01:19:53.000Z | 2021-03-26T15:08:26.000Z | models/mobilenetv2exfuse.py | headupinclouds/LightNet | 04af22501d644b30a93b30b28b32163d60ae2266 | [
"MIT"
] | 189 | 2018-03-22T08:55:43.000Z | 2021-07-01T12:14:08.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from modules import SCSEBlock, InPlaceABN, InPlaceABNWrapper, RFBlock
from modules.misc import InvertedResidual, conv_bn
from modules.exfuse import SemanticSupervision
from collections import OrderedDict
from functools import partial
clas... | 47.349265 | 118 | 0.487538 |
d43de291ccc21c1e26c87cfc2fe006547be7a462 | 245 | py | Python | Test Codes And Data/Detect_Handwrite_1.py | hmnk-1967/OCR-Python-Project-CS-BUIC | 28c72d9913a25655f6183a7b960e527a0432c8e1 | [
"MIT"
] | null | null | null | Test Codes And Data/Detect_Handwrite_1.py | hmnk-1967/OCR-Python-Project-CS-BUIC | 28c72d9913a25655f6183a7b960e527a0432c8e1 | [
"MIT"
] | null | null | null | Test Codes And Data/Detect_Handwrite_1.py | hmnk-1967/OCR-Python-Project-CS-BUIC | 28c72d9913a25655f6183a7b960e527a0432c8e1 | [
"MIT"
] | null | null | null | #For Test Image 1
import pytesseract
import cv2
img = cv2.imread('/HandwritingTest.jpg')
thresh, binary = cv2.threshold(img, 123, 255, cv2.THRESH_BINARY)
tess = pytesseract.image_to_string(binary, config='-l eng --oem 1 --psm 7')
print(tess)
| 22.272727 | 75 | 0.738776 |
6e68cecb7a8ae0d7ec14136c76dac75319df53f9 | 16,330 | py | Python | src/build/toolset.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 215 | 2015-01-10T17:16:34.000Z | 2022-02-23T15:22:08.000Z | src/build/toolset.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 594 | 2015-01-22T16:17:55.000Z | 2022-02-26T22:11:01.000Z | src/build/toolset.py | loongson-zn/build | d4bedebfa046b763c316e31c98b48ed2779741b9 | [
"BSL-1.0"
] | 302 | 2015-02-03T01:20:29.000Z | 2022-02-12T07:01:28.000Z | # Status: being ported by Vladimir Prus
# Base revision: 40958
#
# Copyright 2003 Dave Abrahams
# Copyright 2005 Rene Rivera
# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt... | 39.066986 | 96 | 0.633068 |
468fe69081f4d470947517a6c3b3df7413ac0b32 | 56 | py | Python | tests/unit/test_loader.py | sinofseven/honmaru | 2148f3334f5afd243612e11ccfb3361496a7a843 | [
"MIT"
] | null | null | null | tests/unit/test_loader.py | sinofseven/honmaru | 2148f3334f5afd243612e11ccfb3361496a7a843 | [
"MIT"
] | null | null | null | tests/unit/test_loader.py | sinofseven/honmaru | 2148f3334f5afd243612e11ccfb3361496a7a843 | [
"MIT"
] | null | null | null | import loader
def test_tmp():
assert loader.tmp()
| 9.333333 | 23 | 0.678571 |
56f500183e34c73d962ee71be63eb1c833d33e56 | 1,580 | py | Python | tests/test_geometry.py | phi-wol/3d-object-detection.pytorch | 9437e289ba878da2dbf03e7e7d4d7ae1eb9da486 | [
"MIT"
] | 6 | 2021-06-10T11:53:24.000Z | 2022-03-31T19:34:59.000Z | tests/test_geometry.py | phi-wol/3d-object-detection.pytorch | 9437e289ba878da2dbf03e7e7d4d7ae1eb9da486 | [
"MIT"
] | 6 | 2021-03-15T11:01:27.000Z | 2021-09-25T16:58:16.000Z | tests/test_geometry.py | phi-wol/3d-object-detection.pytorch | 9437e289ba878da2dbf03e7e7d4d7ae1eb9da486 | [
"MIT"
] | 2 | 2021-07-29T08:05:54.000Z | 2022-02-22T16:14:06.000Z | import numpy as np
from torchdet3d.utils import (lift_2d, get_default_camera_matrix,
convert_camera_matrix_2_ndc, project_3d_points,
convert_2d_to_ndc)
from objectron.dataset import iou
from objectron.dataset import box
class TestCasesGeometry:
test_k... | 38.536585 | 109 | 0.591772 |
381795407791c526888e9e0e8279687404d703b3 | 1,504 | py | Python | utils.py | IMEplusplus/tinyctf-platform | 37759c08bd82e39b45a7182d525848db09a42c6e | [
"MIT"
] | 4 | 2016-03-04T22:34:08.000Z | 2016-04-23T18:21:49.000Z | utils.py | IMESec/imectf-platform | 37759c08bd82e39b45a7182d525848db09a42c6e | [
"MIT"
] | 5 | 2016-03-22T16:25:45.000Z | 2016-03-29T19:05:35.000Z | utils.py | IMEplusplus/tinyctf-platform | 37759c08bd82e39b45a7182d525848db09a42c6e | [
"MIT"
] | null | null | null | """
Low level deployment operations.
"""
from random import randint, Random
from os import path, makedirs
from spur import LocalShell
from time import time
from signal import SIGKILL
from crypt import crypt
class TimeoutError(Exception):
"""
Exception dealing with executed commands that timeout.
"""
... | 24.655738 | 109 | 0.644282 |
0da277a2e97af30a73ddf920187b4ce45e7bd6d3 | 1,709 | py | Python | simplified_scrapy/request.py | yiyedata/simplified-scrapy | ccfdc686c53b2da3dac733892d4f184f6293f002 | [
"Apache-2.0"
] | 7 | 2019-08-11T10:31:03.000Z | 2021-03-08T10:07:52.000Z | simplified_scrapy/request.py | yiyedata/simplified-scrapy | ccfdc686c53b2da3dac733892d4f184f6293f002 | [
"Apache-2.0"
] | 1 | 2020-12-29T02:30:18.000Z | 2021-01-25T02:49:37.000Z | simplified_scrapy/request.py | yiyedata/simplified-scrapy | ccfdc686c53b2da3dac733892d4f184f6293f002 | [
"Apache-2.0"
] | 4 | 2019-10-22T02:14:35.000Z | 2021-05-13T07:01:56.000Z | #!/usr/bin/python
#coding=utf-8
from simplified_scrapy.core.request_helper import requestGet as _get, requestPost as _post, requestRaw as _raw
from simplified_scrapy.spider import Spider
from simplified_scrapy.core.mem_cookiestore import MemCookieStore as _store
class _MemSpider(Spider):
def __init__(self, name=N... | 27.564516 | 110 | 0.598596 |
3cd1e88012c510d344885c83651dedb0c4fcd7e9 | 880 | py | Python | scorum/utils/files.py | scorum/pyscorum | b78832a1994357db726333fac151c32d059d7ed7 | [
"MIT"
] | null | null | null | scorum/utils/files.py | scorum/pyscorum | b78832a1994357db726333fac151c32d059d7ed7 | [
"MIT"
] | 1 | 2019-02-22T14:43:22.000Z | 2019-02-22T14:43:22.000Z | scorum/utils/files.py | scorum/pyscorum | b78832a1994357db726333fac151c32d059d7ed7 | [
"MIT"
] | 1 | 2019-02-01T11:56:51.000Z | 2019-02-01T11:56:51.000Z | import os
import shutil
import tempfile
from contextlib import contextmanager
def create_dir(path, rewrite=False):
try:
os.mkdir(path)
except FileExistsError:
if rewrite:
remove_dir_tree(path)
os.mkdir(path)
def create_temp_dir(path, prefix=""):
return tempfile.mk... | 20 | 53 | 0.647727 |
824cf27ad96aa03875039c07b3fa1be75be54259 | 190 | py | Python | src/olympia/applications/api_urls.py | osamamagdy/addons-server | f7326c94d1d40c71eca991242288edf799146182 | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/applications/api_urls.py | osamamagdy/addons-server | f7326c94d1d40c71eca991242288edf799146182 | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/applications/api_urls.py | osamamagdy/addons-server | f7326c94d1d40c71eca991242288edf799146182 | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | from django.urls import path
from .views import AppVersionView
urlpatterns = [
path(
'<str:application>/<str:version>/', AppVersionView.as_view(), name='appversions'
),
]
| 17.272727 | 88 | 0.673684 |
f81bf24b81686c7b57d3c82c59fa96de7ae61def | 3,071 | py | Python | jcdb/jcdb/settings.py | vdslab/JCDb-scraper | 476b8142c189c8030dc436a9580fa751e0e60c0c | [
"MIT"
] | null | null | null | jcdb/jcdb/settings.py | vdslab/JCDb-scraper | 476b8142c189c8030dc436a9580fa751e0e60c0c | [
"MIT"
] | 1 | 2021-05-26T23:29:23.000Z | 2021-05-26T23:29:23.000Z | jcdb/jcdb/settings.py | vdslab/JCDb-scraper | 476b8142c189c8030dc436a9580fa751e0e60c0c | [
"MIT"
] | null | null | null | # Scrapy settings for jcdb project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/downloader-middleware.ht... | 33.747253 | 103 | 0.773364 |
3cb449c0502afe82cc8be1d3615ac32b0f707f8f | 425 | py | Python | A1_T1_6.py | DavidTF85/assigment1 | 2ca18c366425f7e1b9741db26a1bf8e66465d0c8 | [
"BSD-3-Clause"
] | null | null | null | A1_T1_6.py | DavidTF85/assigment1 | 2ca18c366425f7e1b9741db26a1bf8e66465d0c8 | [
"BSD-3-Clause"
] | null | null | null | A1_T1_6.py | DavidTF85/assigment1 | 2ca18c366425f7e1b9741db26a1bf8e66465d0c8 | [
"BSD-3-Clause"
] | null | null | null | # if formula is T(°F) = T(K) × 9/5 - 459.67
#check here URL: https://www.rapidtables.com/convert/temperature/
k = 300.00 # if temperature is
def k_2_f(k):
c = (k * 9/5) - 459.67
return c
c = k_2_f(k)
b = int (c)
print ("Kelvin of " + str (k) + " is " + str (b) + " in Celsius. ")
# for this calculator the d... | 26.5625 | 68 | 0.611765 |
dc7cd0bce56f3b6f8d1f44a74f711eebeefaeed2 | 6,202 | py | Python | python/pyspark/conf.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 73 | 2018-07-06T07:41:46.000Z | 2022-01-06T02:32:22.000Z | python/pyspark/conf.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 6 | 2019-11-13T07:48:07.000Z | 2022-01-21T23:24:20.000Z | python/pyspark/conf.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 44 | 2018-07-09T12:42:44.000Z | 2021-10-17T06:46:01.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 33.524324 | 86 | 0.650113 |
5d0ade2dc3e7c66710a7110d14baff18ae32e261 | 1,535 | py | Python | examples/mountain_car.py | kngwyu/rlpy | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | 3 | 2019-12-07T13:34:02.000Z | 2021-03-29T10:20:05.000Z | examples/mountain_car.py | kngwyu/rlpy | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | 14 | 2019-09-29T03:09:09.000Z | 2022-01-13T03:17:48.000Z | examples/mountain_car.py | kngwyu/rlpy3 | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | null | null | null | from rlpy.domains import MountainCar
from rlpy.tools.cli import run_experiment
import methods
def select_domain(noise=0.0):
return MountainCar(noise=noise)
def select_agent(name, domain, max_steps, seed, **kwargs):
if name is None or name == "ifdd-q":
return methods.ifdd_q(
domain,
... | 24.758065 | 76 | 0.543322 |
d8fc07428741203e9116587338df74db0bc57169 | 5,088 | py | Python | tests/test_max7219.py | r1val/123 | 65c8455a3f6982f743261d41eb4bd43eaf788b47 | [
"MIT"
] | null | null | null | tests/test_max7219.py | r1val/123 | 65c8455a3f6982f743261d41eb4bd43eaf788b47 | [
"MIT"
] | null | null | null | tests/test_max7219.py | r1val/123 | 65c8455a3f6982f743261d41eb4bd43eaf788b47 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014-17 Richard Hull and contributors
# See LICENSE.rst for details.
import pytest
import warnings
from luma.led_matrix.device import max7219
from luma.core.render import canvas
from helpers import setup_function, serial, call, assert_invalid_dimensions ... | 26.638743 | 89 | 0.564269 |
aa0af0c309e2cca8de42a71f029125f91e841d13 | 1,164 | py | Python | setup.py | Donearm/data-structures-and-algorithms | f33ced7d24ee60336d5ab6f850cdbed84a344d9a | [
"MIT"
] | 1 | 2019-10-21T10:07:04.000Z | 2019-10-21T10:07:04.000Z | setup.py | Donearm/data-structures-and-algorithms | f33ced7d24ee60336d5ab6f850cdbed84a344d9a | [
"MIT"
] | null | null | null | setup.py | Donearm/data-structures-and-algorithms | f33ced7d24ee60336d5ab6f850cdbed84a344d9a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2019, Gianluca Fiore
#
###############################################################################
__author__ = "Gianluca Fiore"
import os
import io
import re
from setupt... | 28.390244 | 79 | 0.549828 |
05ff3531fea855632f8f50db0dd3e2f331d03f87 | 1,622 | py | Python | mac/google-cloud-sdk/lib/surface/secrets/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/surface/secrets/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/surface/secrets/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 31.803922 | 75 | 0.759556 |
de8558268ec5abf8d4f7f48e85040b9770d039a6 | 17,467 | py | Python | rltoolkit/rltoolkit/tensorboard_logger.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 7 | 2020-06-15T12:25:53.000Z | 2021-11-03T01:08:47.000Z | rltoolkit/rltoolkit/tensorboard_logger.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | null | null | null | rltoolkit/rltoolkit/tensorboard_logger.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 1 | 2020-12-21T11:21:22.000Z | 2020-12-21T11:21:22.000Z | import ctypes
import logging
import multiprocessing as mp
import numbers
from os import path
from typing import Any, Dict, Iterable, Tuple
import gym
import numpy as np
import torch
from pyvirtualdisplay import Display
from torch.nn import functional as F
from torch.utils.tensorboard import SummaryWriter
from rltoolk... | 38.137555 | 108 | 0.624148 |
b1238e655047727834ff13547625171c45924ebb | 1,872 | py | Python | pyta/hypothesis/extra/dateutil.py | AbChatt/Word-Search-Python | a08bcadf3e77b18541a1b5e8c7e98746978bb1fe | [
"MIT"
] | null | null | null | pyta/hypothesis/extra/dateutil.py | AbChatt/Word-Search-Python | a08bcadf3e77b18541a1b5e8c7e98746978bb1fe | [
"MIT"
] | null | null | null | pyta/hypothesis/extra/dateutil.py | AbChatt/Word-Search-Python | a08bcadf3e77b18541a1b5e8c7e98746978bb1fe | [
"MIT"
] | null | null | null | # coding=utf-8
#
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis-python
#
# Most of this work is copyright (C) 2013-2018 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may ho... | 31.728814 | 79 | 0.732372 |
aacdc9d2c10facf5b7c46db785d3e64b988da251 | 2,074 | py | Python | test/test_utils.py | MateoLostanlen/Holocron | 65e570fc0b072226ae3299574b4926e2fa4e76b0 | [
"Apache-2.0"
] | 181 | 2019-09-05T10:48:15.000Z | 2022-03-29T06:53:15.000Z | test/test_utils.py | MateoLostanlen/Holocron | 65e570fc0b072226ae3299574b4926e2fa4e76b0 | [
"Apache-2.0"
] | 179 | 2019-08-29T09:15:49.000Z | 2022-02-13T21:49:20.000Z | test/test_utils.py | MateoLostanlen/Holocron | 65e570fc0b072226ae3299574b4926e2fa4e76b0 | [
"Apache-2.0"
] | 46 | 2019-07-25T03:36:27.000Z | 2022-03-29T06:53:19.000Z | # Copyright (C) 2019-2021, François-Guillaume Fernandez.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
import torch
from torch.utils.data import DataLoader, Dataset
from holocron import utils
class M... | 30.5 | 117 | 0.684667 |
03dbd680f6d5c4e401b9e7f2239db4676737c553 | 215 | py | Python | ahook/test_ahook.py | akun/ahook | 985c9e5652eb50ff777858bdeeaeac736ac99409 | [
"MIT"
] | 1 | 2021-03-30T16:21:56.000Z | 2021-03-30T16:21:56.000Z | ahook/test_ahook.py | akun/ahook | 985c9e5652eb50ff777858bdeeaeac736ac99409 | [
"MIT"
] | null | null | null | ahook/test_ahook.py | akun/ahook | 985c9e5652eb50ff777858bdeeaeac736ac99409 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from unittest import TestCase
from ahook.main import hello_world
class HelloWordTestCase(TestCase):
def test_hello_world(self):
self.assertEqual('Hello World!', hello_world())
| 17.916667 | 55 | 0.744186 |
6b029f7bc7f034992cfb7fd3f97bddc6bc51aedc | 5,284 | py | Python | code/CNN/CNN_16s/predict.py | alexander-malafeev/microsleep-detection | a548382796ae0cb7f3aecec3a6bff315d25b5d29 | [
"MIT"
] | 10 | 2020-05-28T16:26:27.000Z | 2022-03-31T15:06:38.000Z | code/CNN/CNN_16s/predict.py | alexander-malafeev/microsleep-detection | a548382796ae0cb7f3aecec3a6bff315d25b5d29 | [
"MIT"
] | null | null | null | code/CNN/CNN_16s/predict.py | alexander-malafeev/microsleep-detection | a548382796ae0cb7f3aecec3a6bff315d25b5d29 | [
"MIT"
] | 1 | 2022-03-23T15:31:58.000Z | 2022-03-23T15:31:58.000Z | import os
import keras
from keras.layers import concatenate
from sklearn.metrics import cohen_kappa_score
import scipy.io
import math
import random
from keras import optimizers
import numpy as np
import scipy.io as spio
from sklearn.metrics import f1_score, accuracy_score
np.random.seed(0)
from keras.preprocessi... | 27.237113 | 122 | 0.725587 |
95a34064708ea6df95b2025a89216841e896f40e | 8,823 | py | Python | src/core/db/backend/pg.py | KevinXuxuxu/datahub_lsems | 87ecaf877117b6747f2432fa4379243fdd3d87bd | [
"MIT"
] | null | null | null | src/core/db/backend/pg.py | KevinXuxuxu/datahub_lsems | 87ecaf877117b6747f2432fa4379243fdd3d87bd | [
"MIT"
] | null | null | null | src/core/db/backend/pg.py | KevinXuxuxu/datahub_lsems | 87ecaf877117b6747f2432fa4379243fdd3d87bd | [
"MIT"
] | null | null | null | import os
#import psycopg2
import pymongo
import asctime from time
import re
import shutil
import data
from config import settings
from inventory.models import *
'''
@author: anant bhardwaj
@date: Oct 3, 2013
DataHub internal APIs for postgres repo_base
'''
HOST = settings.DATABASES['default']['HOST']
PORT = 27017
... | 31.967391 | 113 | 0.594356 |
df6685687a2ab1a27761f0715814cb260cf3c105 | 2,049 | py | Python | sightings/views.py | flannerykj/urbanapplause | c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5 | [
"MIT"
] | null | null | null | sightings/views.py | flannerykj/urbanapplause | c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5 | [
"MIT"
] | null | null | null | sightings/views.py | flannerykj/urbanapplause | c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5 | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.views.generic.edit import UpdateView, CreateView, DeleteView
from .models import Sighting
from django.core.urlresolvers import reverse_lazy
fro... | 34.728814 | 78 | 0.691557 |
d77f223e45faa60e2aa9ca3bd0b6a47ab5f3bcc9 | 10,272 | py | Python | saleor/dashboard/reports/urls.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | 2 | 2017-07-11T12:40:59.000Z | 2017-10-18T18:02:46.000Z | saleor/dashboard/reports/urls.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | 12 | 2017-06-19T07:20:41.000Z | 2022-03-15T19:03:33.000Z | saleor/dashboard/reports/urls.py | glosoftgroup/glosoftgroup-django-pos | b489c402939b9ebabd164c449e7da38fe849d550 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.contrib.auth.decorators import login_required, permission_required
from . import views,charts, pdfs, purchase, sales_profit, sales_tax, sales_margin2, product_sales
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
... | 75.529412 | 127 | 0.687208 |
39fe604a79c5d1be144840d1fa0379f4cdbc6f3c | 9,225 | py | Python | src/inst_CARM_VIS.py | hlruh/serval | f2b43737aa865f7b5f9fb1fdb5d25483f37b068c | [
"MIT"
] | 28 | 2017-10-31T22:26:05.000Z | 2022-03-15T18:18:18.000Z | src/inst_CARM_VIS.py | hlruh/serval | f2b43737aa865f7b5f9fb1fdb5d25483f37b068c | [
"MIT"
] | 50 | 2018-01-11T13:47:03.000Z | 2022-03-11T08:57:58.000Z | src/inst_CARM_VIS.py | hlruh/serval | f2b43737aa865f7b5f9fb1fdb5d25483f37b068c | [
"MIT"
] | 8 | 2019-04-24T14:56:33.000Z | 2022-01-18T08:28:15.000Z | from read_spec import *
#from read_spec import Inst
# Instrument parameters
name = 'CARM_VIS'
obsname = 'ca'
obsloc = dict(lat=37.2236, lon= -2.5463, elevation=2168.)
iomax = 61 # NAXIS2
snmax = 500
oset = '10:52'
maskfile = 'telluric_mask_carm_short.dat'
def scan(self, s, pfits=True):
"""
Returns
-------
... | 52.414773 | 147 | 0.64878 |
99a9e97ca069bb6e4786fed4581b4c53f919d128 | 20,987 | py | Python | test/lib/base.py | jhserrano/gobgp | 6bcfe1186d6347fc8d59f566fa36231c82aa49f8 | [
"Apache-2.0"
] | null | null | null | test/lib/base.py | jhserrano/gobgp | 6bcfe1186d6347fc8d59f566fa36231c82aa49f8 | [
"Apache-2.0"
] | null | null | null | test/lib/base.py | jhserrano/gobgp | 6bcfe1186d6347fc8d59f566fa36231c82aa49f8 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.236542 | 165 | 0.570877 |
9d94bfd0fcf9489b2dfb3c4314a93c00e5a19949 | 79,677 | py | Python | tests/test_grain.py | bbc/rd-apmm-python-lib-mediagrains | 84c9de511cc53418c277867eaf143f2cc8730d02 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2018-03-26T23:49:34.000Z | 2021-12-23T10:06:09.000Z | tests/test_grain.py | bbc/rd-apmm-python-lib-mediagrains | 84c9de511cc53418c277867eaf143f2cc8730d02 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2018-03-21T16:45:10.000Z | 2022-03-28T13:27:34.000Z | tests/test_grain.py | bbc/rd-apmm-python-lib-mediagrains | 84c9de511cc53418c277867eaf143f2cc8730d02 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 45.374146 | 127 | 0.598742 |
bfeb6d27221f3c65d3736744a0128f0bb6b91eeb | 559 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractRadianttranslationsCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractRadianttranslationsCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractRadianttranslationsCom.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z |
def extractRadianttranslationsCom(item):
'''
Parser for 'radianttranslations.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', 'translated'),
('Loit... | 25.409091 | 104 | 0.640429 |
36d08b58835795de6198ceed4c15bbd7d5b9df34 | 4,913 | py | Python | Code/bases.py | t0ri/CS-1.3-Core-Data-Structures | 1aa0b226feda77d0c49215700e8b8700a26d93ff | [
"MIT"
] | null | null | null | Code/bases.py | t0ri/CS-1.3-Core-Data-Structures | 1aa0b226feda77d0c49215700e8b8700a26d93ff | [
"MIT"
] | 5 | 2019-06-14T04:59:55.000Z | 2019-08-13T03:01:14.000Z | Code/bases.py | t0ri/Core-Data-Structures | 1aa0b226feda77d0c49215700e8b8700a26d93ff | [
"MIT"
] | null | null | null | #!python
import string
# Hint: Use these string constants to encode/decode hexadecimal digits and more
# string.digits is '0123456789'
# string.hexdigits is '0123456789abcdefABCDEF'
# string.ascii_lowercase is 'abcdefghijklmnopqrstuvwxyz'
# string.ascii_uppercase is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
# string.ascii_letters ... | 31.696774 | 86 | 0.588846 |
89301da4b8829677f0cd4950e929614351d7e8ee | 1,514 | py | Python | gbe/forms/summer_act_form.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | 1 | 2021-03-14T11:56:47.000Z | 2021-03-14T11:56:47.000Z | gbe/forms/summer_act_form.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | 180 | 2019-09-15T19:52:46.000Z | 2021-11-06T23:48:01.000Z | gbe/forms/summer_act_form.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | null | null | null | from django.forms import (
CheckboxSelectMultiple,
DurationField,
HiddenInput,
MultipleChoiceField,
)
from gbe.forms import (
ActEditDraftForm,
ActEditForm,
)
from gbe_forms_text import (
act_help_texts,
act_bid_labels,
summer_bid_label,
summer_help_texts,
)
from gbetext import (... | 26.103448 | 57 | 0.720608 |
f9ae44085aad4c16f6592f43de3a099254f05d59 | 47 | py | Python | conjur/util/__init__.py | mbjahnoon/conjur-api-python3 | ec1f62bb1baf2bdcd34d2fb92c97db724f761020 | [
"Apache-2.0"
] | 16 | 2019-05-17T15:34:59.000Z | 2021-11-08T10:30:21.000Z | conjur/util/__init__.py | mbjahnoon/conjur-api-python3 | ec1f62bb1baf2bdcd34d2fb92c97db724f761020 | [
"Apache-2.0"
] | 301 | 2019-05-07T18:27:10.000Z | 2022-01-26T13:03:49.000Z | conjur/util/__init__.py | cyberark/cyberark-conjur-cli | 2507e8769808643d89efa7e2496cfc14f505bd7e | [
"Apache-2.0"
] | 10 | 2019-07-30T17:00:13.000Z | 2022-01-20T17:00:34.000Z | """
util
This package is for util modules
"""
| 7.833333 | 32 | 0.659574 |
67883520ca861f37157fe9459e625d4902633a1c | 16,572 | py | Python | machinevisiontoolbox/base/graphics.py | petercorke/machinevision-toolbox-python | d7e465575ad3c512387e9486b3b556dc9faa43cf | [
"MIT"
] | 38 | 2020-07-19T15:42:43.000Z | 2022-03-31T05:48:44.000Z | machinevisiontoolbox/base/graphics.py | petercorke/machinevision-toolbox-python | d7e465575ad3c512387e9486b3b556dc9faa43cf | [
"MIT"
] | 1 | 2021-01-03T19:40:21.000Z | 2021-01-03T19:40:21.000Z | machinevisiontoolbox/base/graphics.py | petercorke/machinevision-toolbox-python | d7e465575ad3c512387e9486b3b556dc9faa43cf | [
"MIT"
] | 9 | 2020-10-17T13:46:32.000Z | 2021-12-30T08:30:35.000Z | import cv2 as cv
from spatialmath import base
from ansitable import ANSITable, Column
from machinevisiontoolbox.base import color_bgr
import matplotlib.pyplot as plt
import numpy as np
from spatialmath import base
def plot_box(ax=None,
bbox=None, bl=None, tl=None, br=None, tr=None, wh=None, centre=None,
... | 33.959016 | 139 | 0.620203 |
b9cbf3830b414d320cd27d33b46adb99ba2339a3 | 5,317 | py | Python | modules/nn/modules.py | notani/ntua-slp-semeval2018 | 2d6e03d37210a91fbc0ff99f44a4449abc59210c | [
"MIT"
] | null | null | null | modules/nn/modules.py | notani/ntua-slp-semeval2018 | 2d6e03d37210a91fbc0ff99f44a4449abc59210c | [
"MIT"
] | null | null | null | modules/nn/modules.py | notani/ntua-slp-semeval2018 | 2d6e03d37210a91fbc0ff99f44a4449abc59210c | [
"MIT"
] | null | null | null | from torch import nn, torch
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from modules.nn.regularization import GaussianNoise
class RNNEncoder(nn.Module):
def __init__(self, input_size, rnn_size, num_layers,
bidirectional, dropout):
"""
A simple RNN Enc... | 33.866242 | 79 | 0.579274 |
6db50d93680776fce3dfccd99cb4ea7052146458 | 70,022 | py | Python | src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 2 | 2021-06-05T17:51:26.000Z | 2021-11-17T11:17:56.000Z | src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 3 | 2020-05-27T20:16:26.000Z | 2020-07-23T19:46:49.000Z | src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 5 | 2020-05-09T17:47:09.000Z | 2020-10-01T19:52:06.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 ... | 36.168388 | 112 | 0.645083 |
e2bfbe70a9183325ede8ead9818ee8105c54154b | 3,549 | py | Python | openwisp_users/mixins.py | pandafy/openwisp-users | 747ac34ac59c7fee843f8ad250cc5d12292c722b | [
"BSD-3-Clause"
] | 176 | 2017-03-28T14:00:11.000Z | 2022-03-31T15:10:24.000Z | openwisp_users/mixins.py | pandafy/openwisp-users | 747ac34ac59c7fee843f8ad250cc5d12292c722b | [
"BSD-3-Clause"
] | 290 | 2017-05-12T18:27:15.000Z | 2022-03-19T13:07:33.000Z | openwisp_users/mixins.py | pandafy/openwisp-users | 747ac34ac59c7fee843f8ad250cc5d12292c722b | [
"BSD-3-Clause"
] | 73 | 2017-06-05T12:50:03.000Z | 2022-02-06T07:44:13.000Z | """
mixins used by other openwisp components to implement multi-tenancy
"""
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import ugettext_lazy as _
from swapper import get_model_name
class ValidateOrgMixin(object):
"""
- implements ``_validate_o... | 33.168224 | 85 | 0.614258 |
7c2b51d37a09bf68a104caadd54bf2380d7c8432 | 1,796 | py | Python | frechette_PD/tests.py | Charlotte-exp/Multichannel-Games | 83ebb452454ed5d1a8535b59dac49099a9509be4 | [
"MIT"
] | null | null | null | frechette_PD/tests.py | Charlotte-exp/Multichannel-Games | 83ebb452454ed5d1a8535b59dac49099a9509be4 | [
"MIT"
] | 1 | 2021-01-20T11:48:18.000Z | 2021-01-20T11:48:18.000Z | frechette_PD/tests.py | Charlotte-exp/Multichannel-Games | 83ebb452454ed5d1a8535b59dac49099a9509be4 | [
"MIT"
] | 2 | 2021-01-21T15:29:19.000Z | 2022-03-29T09:26:36.000Z | from otree.api import Currency as c, currency_range, expect
from . import pages
from ._builtin import Bot
from .models import Constants
class PlayerBot(Bot):
def play_round(self):
if self.round_number <= self.participant.vars['last_round']:
yield pages.Decision, {"decision": 1}
# if se... | 46.051282 | 102 | 0.541203 |
d23654ed62e00ad62d8bbed3b2a6ab56ae3f5da9 | 2,055 | py | Python | src/collectors/network/test/testnetwork.py | dreamhost/Diamond | 31034af8b1f4c7bf291078c2f0a80b787f4d1f36 | [
"MIT"
] | null | null | null | src/collectors/network/test/testnetwork.py | dreamhost/Diamond | 31034af8b1f4c7bf291078c2f0a80b787f4d1f36 | [
"MIT"
] | null | null | null | src/collectors/network/test/testnetwork.py | dreamhost/Diamond | 31034af8b1f4c7bf291078c2f0a80b787f4d1f36 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding=utf-8
################################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from mock import Mock
from mock import patch
try:
from cStringIO import StringIO
StringIO # work... | 31.615385 | 80 | 0.589294 |
d6e11f1bdf3bfb60a153cbc22549e9b3f037f94d | 896 | py | Python | Python/LeetCode/Largest Number.py | honghaoz/Interview-Algorithm-in-Swift | b8895b4e05a510e2a5d13d744c084a768f042d0c | [
"MIT"
] | 1 | 2020-12-17T02:10:57.000Z | 2020-12-17T02:10:57.000Z | Python/LeetCode/Largest Number.py | honghaoz/DataStructure-Algorithm | b8895b4e05a510e2a5d13d744c084a768f042d0c | [
"MIT"
] | null | null | null | Python/LeetCode/Largest Number.py | honghaoz/DataStructure-Algorithm | b8895b4e05a510e2a5d13d744c084a768f042d0c | [
"MIT"
] | null | null | null | # # Largest Number
# # Given a list of non negative integers, arrange them such that they form the largest number.
# # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.
# # Note: The result may be very large, so you need to return a string instead of an integer.
class Solution:
# @param... | 37.333333 | 95 | 0.640625 |
b0cc467f6ad02c5cdb53fa8d910a69e261606420 | 1,601 | py | Python | ros2multicast/setup.py | Adlink-ROS/ros2cli | 025870f29da10877484c06a8b929ac3aaa591a44 | [
"Apache-2.0"
] | null | null | null | ros2multicast/setup.py | Adlink-ROS/ros2cli | 025870f29da10877484c06a8b929ac3aaa591a44 | [
"Apache-2.0"
] | null | null | null | ros2multicast/setup.py | Adlink-ROS/ros2cli | 025870f29da10877484c06a8b929ac3aaa591a44 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
package_name = 'ros2multicast'
setup(
name=package_name,
version='0.9.7',
packages=find_packages(exclude=['test']),
data_files=[
('share/' + package_name, ['package.xml']),
('share/ament_index/resource_index/packages',
... | 33.354167 | 80 | 0.643348 |
a6277c6b5bb3035deaeee7d927ed2c51295d90f2 | 1,146 | py | Python | models/experiments/phiseg_rev_7_5_56.py | gigantenbein/UNet-Zoo | d157c22ef8041ed743aa7bbcf377f0f8ad85e755 | [
"Apache-2.0"
] | 20 | 2020-02-16T07:20:23.000Z | 2022-03-14T04:11:02.000Z | models/experiments/phiseg_rev_7_5_56.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 6 | 2021-06-08T21:03:07.000Z | 2022-03-17T13:28:33.000Z | models/experiments/phiseg_rev_7_5_56.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 5 | 2020-03-20T02:04:49.000Z | 2021-10-20T17:37:52.000Z | import torch
import torch.nn as nn
from models.phiseg import PHISeg
from utils import normalise_image
from data.lidc_data import lidc_data
experiment_name = 'PHISegRev_7_5_56'
log_dir_name = 'lidc'
data_loader = lidc_data
# number of filter for the latent levels, they will be applied in the order as loaded into the l... | 22.038462 | 99 | 0.707679 |
1ca780644097454a1dab1d52b948fff75d37f9cc | 86 | py | Python | output/models/ms_data/regex/re_q2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/re_q2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/re_q2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.regex.re_q2_xsd.re_q2 import Doc
__all__ = [
"Doc",
]
| 14.333333 | 59 | 0.709302 |
87826be29a38365b6bbc11b31b1b53a8fc5def19 | 2,890 | py | Python | django/contrib/admin/actions.py | alex/django-old | 6f964c8f03e5d25c9e36898a001c8463f82fbb81 | [
"BSD-3-Clause"
] | 2 | 2015-11-05T06:07:13.000Z | 2019-01-04T07:35:59.000Z | django/contrib/admin/actions.py | alex/django-old | 6f964c8f03e5d25c9e36898a001c8463f82fbb81 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/admin/actions.py | alex/django-old | 6f964c8f03e5d25c9e36898a001c8463f82fbb81 | [
"BSD-3-Clause"
] | null | null | null | """
Built-in, globally-available admin actions.
"""
from django import template
from django.core.exceptions import PermissionDenied
from django.contrib.admin import helpers
from django.contrib.admin.util import get_deleted_objects, model_ngettext
from django.shortcuts import render_to_response
from django.utils.encodi... | 40.704225 | 128 | 0.708304 |
2116d0129e2aebf08aaf09b040d854a6e594e3df | 6,196 | py | Python | src/compas_rhino/artists/mixins/vertexartist.py | mpopescu/compas | 55f259607deea501f862cbaea79bd97d7e56ead6 | [
"MIT"
] | null | null | null | src/compas_rhino/artists/mixins/vertexartist.py | mpopescu/compas | 55f259607deea501f862cbaea79bd97d7e56ead6 | [
"MIT"
] | null | null | null | src/compas_rhino/artists/mixins/vertexartist.py | mpopescu/compas | 55f259607deea501f862cbaea79bd97d7e56ead6 | [
"MIT"
] | null | null | null | from compas.utilities import color_to_colordict
import compas_rhino
__all__ = ['VertexArtist']
class VertexArtist(object):
__module__ = "compas_rhino.artists.mixins"
def clear_vertices(self, keys=None):
"""Clear all vertices previously drawn by the ``VertexArtist``.
Parameters
--... | 39.464968 | 100 | 0.550839 |
c270029c2dfa44d47cd42344983d223b450ad937 | 1,448 | py | Python | pygcn/layers.py | Venray-std/pygcn | a4dc12605e011890fc06c78163fd761ce3a44fea | [
"MIT"
] | null | null | null | pygcn/layers.py | Venray-std/pygcn | a4dc12605e011890fc06c78163fd761ce3a44fea | [
"MIT"
] | null | null | null | pygcn/layers.py | Venray-std/pygcn | a4dc12605e011890fc06c78163fd761ce3a44fea | [
"MIT"
] | null | null | null | import math
import torch
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __init__(self, in_features, out_features, bias=True):
super(GraphConvolution... | 31.478261 | 91 | 0.617403 |
ab9b6ed335c761ca43f684c6a3162dd8bcd1857b | 222 | py | Python | problems/tests/test_p003.py | maximkir/project-euler | ef9d0c37732b65af0b3351307f9c190921218738 | [
"Apache-2.0"
] | null | null | null | problems/tests/test_p003.py | maximkir/project-euler | ef9d0c37732b65af0b3351307f9c190921218738 | [
"Apache-2.0"
] | null | null | null | problems/tests/test_p003.py | maximkir/project-euler | ef9d0c37732b65af0b3351307f9c190921218738 | [
"Apache-2.0"
] | null | null | null | from problems.p003 import largest_prime_factor
def test_largest_prime_factor():
assert largest_prime_factor(10) == 5
assert largest_prime_factor(13195) == 29
assert largest_prime_factor(600851475143) == 6857
| 27.75 | 53 | 0.783784 |
a398a9838d58e6b7430640d6eab31d0c03c9625d | 1,609 | py | Python | setup.py | 3con/cointrader | abb3d13d1105e11db0070a9052c45cb8a87f168c | [
"MIT"
] | 103 | 2017-03-10T07:23:12.000Z | 2021-08-24T17:39:22.000Z | setup.py | altfund/cointrader-1 | abb3d13d1105e11db0070a9052c45cb8a87f168c | [
"MIT"
] | 91 | 2017-03-11T06:23:09.000Z | 2021-11-15T17:47:06.000Z | setup.py | fwolfst/cointrader | abb3d13d1105e11db0070a9052c45cb8a87f168c | [
"MIT"
] | 36 | 2017-03-23T17:48:08.000Z | 2020-02-21T23:42:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'requests',
'sqlalchemy',
'sto... | 27.271186 | 104 | 0.646986 |
7c0d16661c470a4b5a8ede5da6f188c3b7e06172 | 2,795 | py | Python | tools/trn_thumos/extract_features.py | FedericoVasile1/TRN.pytorch | 0a51a93a624e9b5e0a1297885df37ea8a888495e | [
"MIT"
] | null | null | null | tools/trn_thumos/extract_features.py | FedericoVasile1/TRN.pytorch | 0a51a93a624e9b5e0a1297885df37ea8a888495e | [
"MIT"
] | null | null | null | tools/trn_thumos/extract_features.py | FedericoVasile1/TRN.pytorch | 0a51a93a624e9b5e0a1297885df37ea8a888495e | [
"MIT"
] | null | null | null | import _init_paths
import utils as utl
import os
import numpy as np
from torchvision import models, transforms
import torch
import torch.nn as nn
from PIL import Image
class Flatten(nn.Module):
def __init__(self):
super(Flatten, self).__init__()
def forward(self, x):
return x.view(x.shape[0... | 37.266667 | 118 | 0.646154 |
11e7ea31504c883274f1282262afe14bffe8e9c7 | 5,630 | py | Python | mindspore/python/mindspore/ops/_op_impl/aicpu/__init__.py | Aaron911/mindspore | 0868568453bf53bd2cdf072a639b4ff96dd527a4 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/ops/_op_impl/aicpu/__init__.py | Aaron911/mindspore | 0868568453bf53bd2cdf072a639b4ff96dd527a4 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/ops/_op_impl/aicpu/__init__.py | Aaron911/mindspore | 0868568453bf53bd2cdf072a639b4ff96dd527a4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 44.330709 | 79 | 0.875488 |
2aed167eea1315befd8468a253ab1a0e22aefaf9 | 4,716 | py | Python | tests/portfolio/test_snapshot_history.py | cmvandrevala/finance_scripts | dc256d2284bc3fa9cf35572b771e7c9538ad2309 | [
"MIT"
] | 2 | 2020-05-13T14:52:49.000Z | 2022-03-20T04:32:10.000Z | tests/portfolio/test_snapshot_history.py | cmvandrevala/finance_scripts | dc256d2284bc3fa9cf35572b771e7c9538ad2309 | [
"MIT"
] | 1 | 2021-10-09T16:21:42.000Z | 2021-10-09T16:21:42.000Z | tests/portfolio/test_snapshot_history.py | cmvandrevala/finance_scripts | dc256d2284bc3fa9cf35572b771e7c9538ad2309 | [
"MIT"
] | 1 | 2020-05-13T14:52:52.000Z | 2020-05-13T14:52:52.000Z | import unittest
from utilities.epoch_date_converter import EpochDateConverter
from portfolio.snapshot import Snapshot
from portfolio.snapshot_history import SnapshotHistory
class SnapshotHistoryTestCase(unittest.TestCase):
def setUp(self):
self.history = SnapshotHistory()
self.converter = EpochDa... | 44.914286 | 86 | 0.731552 |
6603973ee7774b608afb54bdc81fdc8399ee4756 | 4,919 | py | Python | ui_tests/caseworker/pages/case_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 1 | 2021-10-16T16:36:58.000Z | 2021-10-16T16:36:58.000Z | ui_tests/caseworker/pages/case_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 45 | 2020-08-11T14:37:46.000Z | 2022-03-29T17:03:02.000Z | ui_tests/caseworker/pages/case_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 3 | 2021-02-01T06:26:19.000Z | 2022-02-21T23:02:46.000Z | import time
from ui_tests.caseworker.pages.shared import Shared
from ui_tests.caseworker.pages.BasePage import BasePage
from tests_common import selectors
from tests_common.tools.helpers import scroll_to_element_by_id
class CaseTabs:
DETAILS = "details"
USER_ADVICE = "user-advice"
TEAM_ADVICE = "team-adv... | 41.336134 | 119 | 0.756455 |
861e499cd36f931ea5704020908b3bdabb10b184 | 520 | py | Python | primes/coprimes.py | kwhjvdkamp/PythonTutotial | cbe52c83b0ff2b30f746977f698186dad055b1f4 | [
"MIT"
] | null | null | null | primes/coprimes.py | kwhjvdkamp/PythonTutotial | cbe52c83b0ff2b30f746977f698186dad055b1f4 | [
"MIT"
] | 5 | 2021-07-12T16:34:28.000Z | 2022-03-12T00:59:38.000Z | primes/coprimes.py | kwhjvdkamp/PythonTutotial | cbe52c83b0ff2b30f746977f698186dad055b1f4 | [
"MIT"
] | null | null | null | list1 = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70]
list2 = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
def gcd(a, b):
print("input:", a, b)
# Define the while loop as described
while b != 0:
temp_a = a
a = b
b = temp_a % b
# Complete the return ... | 24.761905 | 65 | 0.546154 |
1102c3bae9a4638a8e99325debcf9b048107ac17 | 1,689 | py | Python | tests/plugins/mockserver/test_mockserver.py | okutane/yandex-taxi-testsuite | 7e2e3dd5a65869ecbf37bf3f79cba7bb4e782b0c | [
"MIT"
] | 128 | 2020-03-10T09:13:41.000Z | 2022-02-11T20:16:16.000Z | tests/plugins/mockserver/test_mockserver.py | okutane/yandex-taxi-testsuite | 7e2e3dd5a65869ecbf37bf3f79cba7bb4e782b0c | [
"MIT"
] | 3 | 2021-11-01T12:31:27.000Z | 2022-02-11T13:08:38.000Z | tests/plugins/mockserver/test_mockserver.py | okutane/yandex-taxi-testsuite | 7e2e3dd5a65869ecbf37bf3f79cba7bb4e782b0c | [
"MIT"
] | 22 | 2020-03-05T07:13:12.000Z | 2022-03-15T10:30:58.000Z | # pylint: disable=protected-access
import aiohttp
import pytest
class Client:
def __init__(self, *, base_url, session):
self._session = session
self._base_url = base_url
def get(self, path, **kwargs):
return self._request('GET', path, **kwargs)
def _request(self, method, path, **... | 26.809524 | 67 | 0.676732 |
e3676ecc2934e0eab10bf11fd07663cc227c835b | 705 | py | Python | LeetCodeSolutions/python/437_Path_Sum_III.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | 1 | 2017-03-27T13:38:37.000Z | 2017-03-27T13:38:37.000Z | LeetCodeSolutions/python/437_Path_Sum_III.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | null | null | null | LeetCodeSolutions/python/437_Path_Sum_III.py | ChuanleiGuo/AlgorithmsPlayground | 90b6287b742c8bfd3797540c408d679be2821a40 | [
"MIT"
] | null | null | null | class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def pathSum(self, root, s):
"""
:type root: TreeNode
:type s: int
:rtype: int
"""
if not root:
return 0
... | 23.5 | 71 | 0.496454 |
205e5e7c64a9a20b43ed1f0316cb87551cfee84b | 159 | py | Python | welcomer/__init__.py | duanegtr/legendv3-cogs | ffde1452a75ad42b4f6511b612ce486e96fcd6de | [
"MIT"
] | 3 | 2020-09-03T13:39:30.000Z | 2021-05-21T01:37:00.000Z | welcomer/__init__.py | darcyle/tl-cogs | 6b13c4a6247115571c5a2bb6ea98ed1fe2d44d79 | [
"MIT"
] | null | null | null | welcomer/__init__.py | darcyle/tl-cogs | 6b13c4a6247115571c5a2bb6ea98ed1fe2d44d79 | [
"MIT"
] | 4 | 2020-09-24T04:24:02.000Z | 2021-04-25T03:48:44.000Z | from .welcomer import Welcomer
async def setup(bot):
cog = Welcomer(bot=bot)
await cog.crtoken()
await cog.load_menu_module()
bot.add_cog(cog) | 22.714286 | 32 | 0.698113 |
f2d4c053a116de1a16891f8244786c080e6a0114 | 206 | py | Python | main.py | Akhlak-Hossain-Jim/jimmi.py | 6fe6069058640541234beb7dc28d2e4981acbd6b | [
"Apache-2.0"
] | null | null | null | main.py | Akhlak-Hossain-Jim/jimmi.py | 6fe6069058640541234beb7dc28d2e4981acbd6b | [
"Apache-2.0"
] | null | null | null | main.py | Akhlak-Hossain-Jim/jimmi.py | 6fe6069058640541234beb7dc28d2e4981acbd6b | [
"Apache-2.0"
] | null | null | null | print("Hi there whats your name?")
name = input()
print('hello again ' + name)
print("I\'m Jimmi bot and just started learning to being intelligent. So I can have some error to answering your questions.")
| 41.2 | 125 | 0.73301 |
cd81585b4d12cbd3550c29983ab40d46b7bf5e4d | 2,322 | py | Python | pyunity/window/templateWindow.py | Knight1632/pyunity | 4d96311bef1bb51aee6afbdcc156f9a290c29815 | [
"MIT"
] | null | null | null | pyunity/window/templateWindow.py | Knight1632/pyunity | 4d96311bef1bb51aee6afbdcc156f9a290c29815 | [
"MIT"
] | null | null | null | pyunity/window/templateWindow.py | Knight1632/pyunity | 4d96311bef1bb51aee6afbdcc156f9a290c29815 | [
"MIT"
] | null | null | null | """Template window provider, use this for creating new window providers"""
from ..errors import *
from ..core import Clock
from ..input import KeyCode
from .. import config
class Window:
"""
A template window provider.
"""
def __init__(self, name, resize):
self.resize = resize
def quit(... | 21.5 | 74 | 0.533161 |
eb1537cec17d11f0a98babb952bb5c8a6c24b302 | 114,301 | py | Python | google/cloud/aiplatform_v1beta1/services/featurestore_service/async_client.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1beta1/services/featurestore_service/async_client.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1beta1/services/featurestore_service/async_client.py | TheMichaelHu/python-aiplatform | e03f373a7e44c354eda88875a41c771f6d7e3ce1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 40.9681 | 191 | 0.60961 |
d7230fc99e283369806439f44c31fbc31ff8b9d6 | 1,544 | py | Python | tre-0.7.5-win32/python/setup.py | s4ros/scalpel | 6726968dc48e41ca4ce5b6b2bc92cf69bc142333 | [
"Apache-2.0"
] | 501 | 2015-01-06T09:09:22.000Z | 2022-03-10T18:02:20.000Z | tre-0.7.5-win32/python/setup.py | s4ros/scalpel | 6726968dc48e41ca4ce5b6b2bc92cf69bc142333 | [
"Apache-2.0"
] | 37 | 2015-01-08T16:41:22.000Z | 2022-02-16T18:10:16.000Z | tre-0.7.5-win32/python/setup.py | s4ros/scalpel | 6726968dc48e41ca4ce5b6b2bc92cf69bc142333 | [
"Apache-2.0"
] | 109 | 2015-01-07T19:08:00.000Z | 2022-03-04T21:43:18.000Z | # setup.py - Builds and installs the TRE Python language bindings module
#
# Copyright (c) 2004-2006 Nikolai SAOUKH <nms+python@otdel-1.org>
#
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Founda... | 29.132075 | 76 | 0.690415 |
0763814154dbaff9ef61bb298b5047634d8dc1bc | 197 | py | Python | projects/api/pagination.py | mrunal2504/unicode-website | a8151c3e6cad594a6518e9529c501aff3165efbb | [
"MIT"
] | 6 | 2018-01-02T13:01:44.000Z | 2020-05-08T11:46:39.000Z | projects/api/pagination.py | mrunal2504/unicode-website | a8151c3e6cad594a6518e9529c501aff3165efbb | [
"MIT"
] | 22 | 2018-12-24T19:10:44.000Z | 2022-02-10T10:58:26.000Z | projects/api/pagination.py | mrunal2504/unicode-website | a8151c3e6cad594a6518e9529c501aff3165efbb | [
"MIT"
] | 22 | 2018-12-26T02:52:57.000Z | 2020-10-01T19:09:56.000Z | from rest_framework.pagination import (
LimitOffsetPagination,
PageNumberPagination,
)
class ProjectLimitOffsetPagination(LimitOffsetPagination):
default_limit = 2
max_limit = 10
| 19.7 | 58 | 0.781726 |
1143c979dc452528e2170a52fec0814ebb3d1669 | 11,297 | py | Python | dynamics.py | saxenam06/Approximate-Dynamic-Programming | de613c10e087ae6b4a87a1730104c59442b33797 | [
"Apache-2.0"
] | 1 | 2021-12-28T04:25:36.000Z | 2021-12-28T04:25:36.000Z | dynamics.py | saxenam06/Approximate-Dynamic-Programming | de613c10e087ae6b4a87a1730104c59442b33797 | [
"Apache-2.0"
] | null | null | null | dynamics.py | saxenam06/Approximate-Dynamic-Programming | de613c10e087ae6b4a87a1730104c59442b33797 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import torch
import numpy as np
from config import DynamicsConfig
import matplotlib.pyplot as plt
import math
PI = 3.1415926
class VehicleDynamics(DynamicsConfig):
def __init__(self):
self._state = torch.zeros([self.BATCH_SIZE, self.DYNAMICS_DIM])
self.init_... | 37.782609 | 122 | 0.522705 |
30b01d9eb4a4c9bef88d9ea8f2356ba276eacdc1 | 8,515 | py | Python | globus_cli/config.py | jaswilli/globus-cli | 834bb9b7594a5996be81dfbbe4461e66ec06cbe6 | [
"Apache-2.0"
] | null | null | null | globus_cli/config.py | jaswilli/globus-cli | 834bb9b7594a5996be81dfbbe4461e66ec06cbe6 | [
"Apache-2.0"
] | null | null | null | globus_cli/config.py | jaswilli/globus-cli | 834bb9b7594a5996be81dfbbe4461e66ec06cbe6 | [
"Apache-2.0"
] | null | null | null | import logging.config
import os
import globus_sdk
from configobj import ConfigObj
__all__ = [
# option name constants
"OUTPUT_FORMAT_OPTNAME",
"MYPROXY_USERNAME_OPTNAME",
"AUTH_RT_OPTNAME",
"AUTH_AT_OPTNAME",
"AUTH_AT_EXPIRES_OPTNAME",
"TRANSFER_RT_OPTNAME",
"TRANSFER_AT_OPTNAME",
... | 32.253788 | 88 | 0.700881 |
4f8ac5e4cd6e4f44c934f1a37bc63814365fd678 | 2,467 | py | Python | var/spack/repos/builtin/packages/r-delayedmatrixstats/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/r-delayedmatrixstats/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/r-delayedmatrixstats/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RDelayedmatrixstats(RPackage):
"""Functions that Apply to Rows and Columns of 'DelayedMatr... | 54.822222 | 80 | 0.665586 |
4e44a6bcf68865d2d53a1504f65a36d02e0a012c | 1,368 | py | Python | build/fbcode_builder_config.py | autoantwort/proxygen | 1cedfc101966163f647241b8c2564d55e4f31454 | [
"BSD-3-Clause"
] | 5,852 | 2015-01-01T06:12:49.000Z | 2022-03-31T07:28:30.000Z | build/fbcode_builder_config.py | autoantwort/proxygen | 1cedfc101966163f647241b8c2564d55e4f31454 | [
"BSD-3-Clause"
] | 345 | 2015-01-02T22:15:43.000Z | 2022-03-28T23:33:28.000Z | build/fbcode_builder_config.py | autoantwort/proxygen | 1cedfc101966163f647241b8c2564d55e4f31454 | [
"BSD-3-Clause"
] | 1,485 | 2015-01-04T14:39:26.000Z | 2022-03-22T02:32:08.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function, unicode_literals
import ... | 25.811321 | 86 | 0.640351 |
33e42e1fcb343699c2a27331b7786ec61a8eb7d9 | 1,914 | py | Python | python/houseOfCards.py | cl33per/java-baby | 05febea73f9ea78c6d3f88b066a14542fbcdb163 | [
"MIT"
] | null | null | null | python/houseOfCards.py | cl33per/java-baby | 05febea73f9ea78c6d3f88b066a14542fbcdb163 | [
"MIT"
] | null | null | null | python/houseOfCards.py | cl33per/java-baby | 05febea73f9ea78c6d3f88b066a14542fbcdb163 | [
"MIT"
] | null | null | null | import random
class Card:
def __init__(self, suit, val):
self.suit = suit
self.value = val
def show(self,name):
print ("{} has {} of {}".format(name, self.value,self.suit))
class Deck:
def __init__(self):
self.cards = []
self.build()
def build(self):
f... | 25.184211 | 71 | 0.532915 |
941440509694143cedcf54c296cc4058914e6413 | 5,036 | py | Python | tests/test_preprocess.py | dsapandora/DeepForest | 3f9313c218f8a733b3a151c84e01afc8e732f9da | [
"MIT"
] | null | null | null | tests/test_preprocess.py | dsapandora/DeepForest | 3f9313c218f8a733b3a151c84e01afc8e732f9da | [
"MIT"
] | null | null | null | tests/test_preprocess.py | dsapandora/DeepForest | 3f9313c218f8a733b3a151c84e01afc8e732f9da | [
"MIT"
] | 2 | 2020-09-29T22:04:50.000Z | 2022-03-24T16:26:48.000Z | # test preprocessing
import glob
import os
import numpy as np
import pandas as pd
import pytest
from PIL import Image
from deepforest import get_data
from deepforest import preprocess
from deepforest import utilities
@pytest.fixture("module")
def config():
config = utilities.read_config(get_data("deepforest_con... | 39.03876 | 89 | 0.560365 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.