hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7940bb16af575a6587ba7d772122e0356212e8b6 | 2,989 | py | Python | lab2/text_recognizer/networks/line_cnn_sliding_window.py | raminzahedi/fsdl-text-recognizer-project | b683173e5e19fbbdb3c6ab42990406e2a0c73e81 | [
"MIT"
] | null | null | null | lab2/text_recognizer/networks/line_cnn_sliding_window.py | raminzahedi/fsdl-text-recognizer-project | b683173e5e19fbbdb3c6ab42990406e2a0c73e81 | [
"MIT"
] | null | null | null | lab2/text_recognizer/networks/line_cnn_sliding_window.py | raminzahedi/fsdl-text-recognizer-project | b683173e5e19fbbdb3c6ab42990406e2a0c73e81 | [
"MIT"
] | null | null | null | import pathlib
from typing import Tuple
from boltons.cacheutils import cachedproperty
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import Activation, Conv2D, Dense, Dropout, Flatten, Input, MaxPooling2D, Permute, Reshape, TimeDistributed, Lambda, ZeroPadding2D
from tensorflow.keras.models im... | 40.391892 | 158 | 0.733021 |
7940bb9d022b8becf1b3bc325752a96df4b493c3 | 904 | py | Python | pm/view/landingpage.py | fvclaus/photomap | 4147658193f75b0decd8586ca4ff27619bfc70e1 | [
"BSD-3-Clause"
] | null | null | null | pm/view/landingpage.py | fvclaus/photomap | 4147658193f75b0decd8586ca4ff27619bfc70e1 | [
"BSD-3-Clause"
] | 10 | 2019-12-11T17:21:51.000Z | 2022-03-02T06:09:41.000Z | pm/view/landingpage.py | fvclaus/photomap | 4147658193f75b0decd8586ca4ff27619bfc70e1 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.http import HttpResponseBadRequest
from django.shortcuts import render
from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie
from pm.form.registration import RegistrationForm
@ensure_csrf_cookie
@csrf_protect
def view(request):
if request.method == "GET":
t... | 32.285714 | 114 | 0.702434 |
7940bca8c2206024000ad8ebb5ff2b3cdec2a2d2 | 353 | py | Python | app/lcars.py | elijaheac/rpi_lcars | 47dcd84eb7f631cde8572ffc280247cc89c5a42d | [
"MIT"
] | 2 | 2017-11-24T21:54:56.000Z | 2020-06-30T01:08:10.000Z | app/lcars.py | hepteract/rpi_lcars | 47dcd84eb7f631cde8572ffc280247cc89c5a42d | [
"MIT"
] | null | null | null | app/lcars.py | hepteract/rpi_lcars | 47dcd84eb7f631cde8572ffc280247cc89c5a42d | [
"MIT"
] | null | null | null | from screens.authorize import ScreenAuthorize
from ui.ui import UserInterface
# global config
UI_PLACEMENT_MODE = True
RESOLUTION = (800, 480)
FPS = 60
DEV_MODE = False
if __name__ == "__main__":
firstScreen = ScreenAuthorize()
ui = UserInterface(firstScreen, RESOLUTION, UI_PLACEMENT_MODE, FPS, DEV_MODE)
... | 22.0625 | 81 | 0.730878 |
7940bcfd934907f8719c126d82f34970c1a7c515 | 4,716 | py | Python | assets/src/ba_data/python/ba/_enums.py | Dliwk/ballistica | eaff316b3c6203b2465c768c88c473c1478b492a | [
"MIT"
] | 6 | 2021-04-16T14:25:25.000Z | 2021-11-18T17:20:19.000Z | assets/src/ba_data/python/ba/_enums.py | Dliwk/ballistica | eaff316b3c6203b2465c768c88c473c1478b492a | [
"MIT"
] | 1 | 2021-08-30T10:09:06.000Z | 2021-09-21T10:44:15.000Z | assets/src/ba_data/python/ba/_enums.py | Dliwk/ballistica | eaff316b3c6203b2465c768c88c473c1478b492a | [
"MIT"
] | 2 | 2021-04-20T15:39:27.000Z | 2021-07-18T08:45:56.000Z | # Released under the MIT License. See LICENSE for details.
"""Enums generated by tools/update_python_enums_module in ba-internal."""
from enum import Enum
class InputType(Enum):
"""Types of input a controller can send to the game.
Category: Enums
"""
UP_DOWN = 2
LEFT_RIGHT = 3
JUMP_PRESS = ... | 23.698492 | 77 | 0.653308 |
7940bd0212e34e3649a65560faf2d75fabbefec2 | 429 | py | Python | tests/utils/test_aggregate.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | null | null | null | tests/utils/test_aggregate.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | null | null | null | tests/utils/test_aggregate.py | trumanw/ScaffoldGraph | a594e5c5effe6c5e45c0061a235ccbeb64e416f9 | [
"MIT"
] | 1 | 2021-03-12T15:55:02.000Z | 2021-03-12T15:55:02.000Z | """
scaffoldgraph tests.utils.test_aggregate
"""
import scaffoldgraph as sg
from scaffoldgraph.utils import aggregate
from .. import mock_sdf, mock_sdf_2
def test_aggregate(sdf_file, sdf_file_2):
net_1 = sg.ScaffoldNetwork.from_sdf(sdf_file)
net_2 = sg.ScaffoldNetwork.from_sdf(sdf_file_2)
network = aggr... | 25.235294 | 51 | 0.7669 |
7940bdbebd9e1470feb3d25ef1bbd7a5b7059e75 | 4,344 | py | Python | ingestion/src/metadata/ingestion/source/snowflake_usage.py | rongfengliang/OpenMetadata | f91bcc03f63cd193d40a21ce25a398cddb389fa4 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/snowflake_usage.py | rongfengliang/OpenMetadata | f91bcc03f63cd193d40a21ce25a398cddb389fa4 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/snowflake_usage.py | rongfengliang/OpenMetadata | f91bcc03f63cd193d40a21ce25a398cddb389fa4 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not ... | 38.105263 | 99 | 0.679788 |
7940be595c376bce28bf8957e1d2b3d9c62bb993 | 941 | py | Python | merge_states.py | abr-98/COVID-19_regression_analysis | f902f4771f665ee27c33a9cb7e3e4c83be54493d | [
"MIT"
] | null | null | null | merge_states.py | abr-98/COVID-19_regression_analysis | f902f4771f665ee27c33a9cb7e3e4c83be54493d | [
"MIT"
] | null | null | null | merge_states.py | abr-98/COVID-19_regression_analysis | f902f4771f665ee27c33a9cb7e3e4c83be54493d | [
"MIT"
] | 1 | 2020-06-07T08:50:29.000Z | 2020-06-07T08:50:29.000Z | import pandas as pd
import numpy as np
import os
import json
def merge():
df=pd.read_csv('covid_19_india.csv', index_col=0)
s_names=df['State/UnionTerritory'].unique()
df_2=pd.read_csv('total_country_mod.csv')
df3=df_2
df3.to_csv('total_state_data.csv',index=False)
with open('date_rec_mod.json', 'r') as i... | 16.224138 | 51 | 0.659936 |
7940bef0e0c1dfcd9e484ef4afa583ad339018c9 | 112 | py | Python | python_in_out_context_manager/__init__.py | samesense/python_in_out_context_manager | b8263ac7f974f76cc2e91b67a9cf37b1960b98f5 | [
"MIT"
] | null | null | null | python_in_out_context_manager/__init__.py | samesense/python_in_out_context_manager | b8263ac7f974f76cc2e91b67a9cf37b1960b98f5 | [
"MIT"
] | null | null | null | python_in_out_context_manager/__init__.py | samesense/python_in_out_context_manager | b8263ac7f974f76cc2e91b67a9cf37b1960b98f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = """Perry Evans"""
__email__ = 'samesense@gmail.com'
__version__ = '0.1.0'
| 18.666667 | 33 | 0.625 |
7940c06bb984814d728645fb9d6c6a7fb9bc4744 | 12,923 | py | Python | Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py | VincentWei/mdolphin-core | 48ffdcf587a48a7bb4345ae469a45c5b64ffad0e | [
"Apache-2.0"
] | 6 | 2017-05-31T01:46:45.000Z | 2018-06-12T10:53:30.000Z | Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py | FMSoftCN/mdolphin-core | 48ffdcf587a48a7bb4345ae469a45c5b64ffad0e | [
"Apache-2.0"
] | null | null | null | Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py | FMSoftCN/mdolphin-core | 48ffdcf587a48a7bb4345ae469a45c5b64ffad0e | [
"Apache-2.0"
] | 2 | 2017-07-17T06:02:42.000Z | 2018-09-19T10:08:38.000Z | # Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the abov... | 42.370492 | 146 | 0.67879 |
7940c08048a94a74620253246228043355e2f74f | 1,972 | py | Python | browser_fetcher/logger.py | PrVrSs/browser-fetcher | 8540ca138037077dc2ac45df65111e06f8b2c0f4 | [
"Apache-2.0"
] | null | null | null | browser_fetcher/logger.py | PrVrSs/browser-fetcher | 8540ca138037077dc2ac45df65111e06f8b2c0f4 | [
"Apache-2.0"
] | null | null | null | browser_fetcher/logger.py | PrVrSs/browser-fetcher | 8540ca138037077dc2ac45df65111e06f8b2c0f4 | [
"Apache-2.0"
] | null | null | null | import logging
from logging.config import dictConfig as logging_dict_config
import click
TRACE_LOG_LEVEL = 5
LOG_LEVELS = {
'critical': logging.CRITICAL,
'error': logging.ERROR,
'warning': logging.WARNING,
'info': logging.INFO,
'debug': logging.DEBUG,
'trace': TRACE_LOG_LEVEL,
}
LOGGING_C... | 29 | 80 | 0.630832 |
7940c0e04664f68c39955eb72e112128b8730c55 | 2,440 | py | Python | configs/learning_gem5/part2/run_simple.py | taomiao/gem5 | 4effe34f94b599add133357473e1b120b54719ab | [
"BSD-3-Clause"
] | 135 | 2016-10-21T03:31:49.000Z | 2022-03-25T01:22:20.000Z | configs/learning_gem5/part2/run_simple.py | taomiao/gem5 | 4effe34f94b599add133357473e1b120b54719ab | [
"BSD-3-Clause"
] | 35 | 2017-03-10T17:57:46.000Z | 2022-02-18T17:34:16.000Z | configs/learning_gem5/part2/run_simple.py | taomiao/gem5 | 4effe34f94b599add133357473e1b120b54719ab | [
"BSD-3-Clause"
] | 48 | 2016-12-08T12:03:13.000Z | 2022-02-16T09:16:13.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Jason Lowe-Power
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list o... | 42.068966 | 78 | 0.783197 |
7940c2e056b552818502f531d6f2924479c05986 | 42 | py | Python | models/__init__.py | gmshashank/Deep_Flow_Prediction | 9b4c388b70a458cddac20258242a6a36965524bc | [
"MIT"
] | null | null | null | models/__init__.py | gmshashank/Deep_Flow_Prediction | 9b4c388b70a458cddac20258242a6a36965524bc | [
"MIT"
] | null | null | null | models/__init__.py | gmshashank/Deep_Flow_Prediction | 9b4c388b70a458cddac20258242a6a36965524bc | [
"MIT"
] | null | null | null | from .unet import Generator, weights_init
| 21 | 41 | 0.833333 |
7940c302f2268937e491a1f7c49a26a12b36486d | 6,896 | py | Python | copct-master/baxter_experiments.py | jhomble/electron435 | 2a94a901679a1ebbdeea01bb9e888d365d536bec | [
"MIT"
] | null | null | null | copct-master/baxter_experiments.py | jhomble/electron435 | 2a94a901679a1ebbdeea01bb9e888d365d536bec | [
"MIT"
] | null | null | null | copct-master/baxter_experiments.py | jhomble/electron435 | 2a94a901679a1ebbdeea01bb9e888d365d536bec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import time
import copct
M = 3
def causes(v):
"""
Causal relation for the robotic imitation learning domain.
v is a sequence of intentions or actions.
Each element v[i] is of the form (state, task name, parameter values).
Returns the set of all possible causes of v.
"""
... | 51.462687 | 160 | 0.595708 |
7940c341c5192dea1298b72340b3872a94e194e8 | 544 | py | Python | client_service/python/src/client_service_python/scripts/add_two_ints_server.py | vlantonov/ros_samples | f49ca64e00f4d4b6461ba1512c02c9045c5b631a | [
"MIT"
] | null | null | null | client_service/python/src/client_service_python/scripts/add_two_ints_server.py | vlantonov/ros_samples | f49ca64e00f4d4b6461ba1512c02c9045c5b631a | [
"MIT"
] | null | null | null | client_service/python/src/client_service_python/scripts/add_two_ints_server.py | vlantonov/ros_samples | f49ca64e00f4d4b6461ba1512c02c9045c5b631a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from client_service_python.srv import AddTwoInts, AddTwoIntsResponse
import rospy
def handle_add_two_ints(req):
print("Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b)))
return AddTwoIntsResponse(req.a + req.b)
def add_two_ints_server()... | 23.652174 | 71 | 0.715074 |
7940c3878706863d1d5f750165bbd70a99b3eab3 | 2,005 | py | Python | src/transformers/commands/transformers_cli.py | ashokei/transformers | 5e637e6c690e45d13ebf7296e1ea9dcc188d0f07 | [
"Apache-2.0"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | src/transformers/commands/transformers_cli.py | tutussss/transformers | 67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e | [
"Apache-2.0"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | src/transformers/commands/transformers_cli.py | tutussss/transformers | 67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e | [
"Apache-2.0"
] | 3 | 2021-09-19T08:20:42.000Z | 2022-02-19T16:32:40.000Z | #!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. 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... | 35.803571 | 97 | 0.784539 |
7940c48bd8c5f655a27522835e4de9652852c4c2 | 3,408 | py | Python | utils.py | Louiealbp/ContrastiveLearningGoalReaching | 4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3 | [
"MIT"
] | null | null | null | utils.py | Louiealbp/ContrastiveLearningGoalReaching | 4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3 | [
"MIT"
] | null | null | null | utils.py | Louiealbp/ContrastiveLearningGoalReaching | 4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from collections import deque
import os
def make_dir(dir_path):
try:
os.mkdir(dir_path)
except OSError:
pass
return dir_path
def preprocess_obs(obs, bits=5):
"""Preprocessing image, see https://arxiv.org/abs/1807.03039."""
bins = 2**bits
assert o... | 38.727273 | 128 | 0.559272 |
7940c4b7eaa5f7f64c506fc96442c25d4c200f31 | 205 | py | Python | citypay/api/__init__.py | citypay/citypay-pos-python-client | df21205504c5b5bd75b5ac5e2a34fb9430f7e4db | [
"MIT"
] | null | null | null | citypay/api/__init__.py | citypay/citypay-pos-python-client | df21205504c5b5bd75b5ac5e2a34fb9430f7e4db | [
"MIT"
] | null | null | null | citypay/api/__init__.py | citypay/citypay-pos-python-client | df21205504c5b5bd75b5ac5e2a34fb9430f7e4db | [
"MIT"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from citypay.api.device_module_api import DeviceModuleApi
from citypay.api.payment_module_api import PaymentModuleApi
| 25.625 | 59 | 0.853659 |
7940c585e1dd7533dfc57d5dad917df0a2c635b0 | 8,984 | py | Python | fedml_api/distributed/fedopt/FedOptAggregator.py | xuwanwei/FedML | c049a30d9839c4554e7e14b0c18275e96fea8130 | [
"Apache-2.0"
] | 1,120 | 2020-07-22T02:30:52.000Z | 2022-03-31T08:10:44.000Z | fedml_api/distributed/fedopt/FedOptAggregator.py | xuwanwei/FedML | c049a30d9839c4554e7e14b0c18275e96fea8130 | [
"Apache-2.0"
] | 113 | 2020-07-27T03:48:09.000Z | 2022-03-30T03:25:56.000Z | fedml_api/distributed/fedopt/FedOptAggregator.py | xuwanwei/FedML | c049a30d9839c4554e7e14b0c18275e96fea8130 | [
"Apache-2.0"
] | 381 | 2020-07-22T06:12:57.000Z | 2022-03-30T18:38:35.000Z | import copy
import logging
import random
import time
import numpy as np
import torch
import wandb
from .optrepo import OptRepo
from .utils import transform_list_to_tensor
class FedOptAggregator(object):
def __init__(self, train_global, test_global, all_train_data_num,
train_data_local_dict, te... | 44.256158 | 148 | 0.645147 |
7940c5d443f6a7946a217e06d2a4f26f23236d76 | 315 | py | Python | main.py | arthursgonzaga/GoogleNewsScraping | f07ba1185f24e5ccc1c090604b15a63c2ed0ce49 | [
"MIT"
] | null | null | null | main.py | arthursgonzaga/GoogleNewsScraping | f07ba1185f24e5ccc1c090604b15a63c2ed0ce49 | [
"MIT"
] | null | null | null | main.py | arthursgonzaga/GoogleNewsScraping | f07ba1185f24e5ccc1c090604b15a63c2ed0ce49 | [
"MIT"
] | null | null | null | import pandas as pd
from GoogleNews import GoogleNews
SEARCHING = 'Dados'
googlenews = GoogleNews()
googlenews.set_lang('pt')
googlenews.search(SEARCHING)
print("Searching for... " + SEARCHING)
results = googlenews.result()
df = pd.DataFrame(results)
df.to_csv('exported_results.csv', index=False)
print("Done!")
| 22.5 | 46 | 0.761905 |
7940c7eb238e5dffd2bde01cada8fcef5dafbbf4 | 9,681 | py | Python | jobs/migrations/0011_auto__add_field_job_company_name.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | jobs/migrations/0011_auto__add_field_job_company_name.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | jobs/migrations/0011_auto__add_field_job_company_name.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Job.company_name'
db.add_column('jobs_job', 'company_name... | 79.352459 | 184 | 0.563062 |
7940c823b9107fad04627ad8f4fb5bc42f9d9b55 | 2,557 | py | Python | yabmp/channel/factory.py | zlpqingmei/yabmp | c91284e2701c9887a42804179eae1874d48082fe | [
"Apache-2.0"
] | 36 | 2015-07-27T01:05:50.000Z | 2021-12-05T05:09:15.000Z | yabmp/channel/factory.py | zlpqingmei/yabmp | c91284e2701c9887a42804179eae1874d48082fe | [
"Apache-2.0"
] | 9 | 2015-05-20T05:52:21.000Z | 2022-02-11T03:39:55.000Z | yabmp/channel/factory.py | zlpqingmei/yabmp | c91284e2701c9887a42804179eae1874d48082fe | [
"Apache-2.0"
] | 20 | 2015-05-15T01:56:18.000Z | 2021-09-29T07:15:46.000Z | # Copyright 2015-2016 Cisco Systems, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 34.554054 | 108 | 0.695346 |
7940c87da98a967e3f8281f08d5adaa607616b8f | 395 | py | Python | causal_curve/__init__.py | piaodangdang/causal-curve | 954af307c3fd77b9aaff280b59556b1f90a3659a | [
"MIT"
] | 1 | 2020-12-23T02:26:54.000Z | 2020-12-23T02:26:54.000Z | causal_curve/__init__.py | piaodangdang/causal-curve | 954af307c3fd77b9aaff280b59556b1f90a3659a | [
"MIT"
] | null | null | null | causal_curve/__init__.py | piaodangdang/causal-curve | 954af307c3fd77b9aaff280b59556b1f90a3659a | [
"MIT"
] | null | null | null | """causal_curve module"""
import warnings
from statsmodels.genmod.generalized_linear_model import DomainWarning
from causal_curve.gps import GPS
from causal_curve.tmle import TMLE
from causal_curve.mediation import Mediation
# Suppress statsmodel warning for gamma family GLM
warnings.filterwarnings("ignore", categ... | 26.333333 | 69 | 0.840506 |
7940c9399f802ed2b58ce90ab958d351585bbc27 | 5,804 | py | Python | runway_model.py | genekogan/deeplab-pytorch | c58f66878a1c5012c68a24eabdd15090b9becf4c | [
"MIT"
] | 5 | 2019-05-20T23:15:42.000Z | 2021-12-03T19:21:15.000Z | runway_model.py | Erinqi/deeplab-pytorch | c58f66878a1c5012c68a24eabdd15090b9becf4c | [
"MIT"
] | null | null | null | runway_model.py | Erinqi/deeplab-pytorch | c58f66878a1c5012c68a24eabdd15090b9becf4c | [
"MIT"
] | 5 | 2019-05-18T15:23:24.000Z | 2022-01-11T10:52:56.000Z | from __future__ import absolute_import, division, print_function
import pickle
import numpy as np
import cv2
import torch
import torch.nn as nn
import torch.nn.functional as F
import yaml
from addict import Dict
from libs.models import *
from libs.utils import DenseCRF
from demo import *
import runway
classes = {0:... | 56.901961 | 2,846 | 0.64938 |
7940c9790dd7ff87be87b15ac35e2712cc9097c1 | 40,396 | py | Python | tensor2tensor/data_generators/text_encoder.py | Mozen/Transorformer-tensor2tensor | e29b7dded31c6e909a4bd91fd2523517a15d93b3 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/text_encoder.py | Mozen/Transorformer-tensor2tensor | e29b7dded31c6e909a4bd91fd2523517a15d93b3 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/text_encoder.py | Mozen/Transorformer-tensor2tensor | e29b7dded31c6e909a4bd91fd2523517a15d93b3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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 applicable... | 38.037665 | 93 | 0.614863 |
7940c9b8c0fc7a3e1e67b6fb4618a0a6ee7bc85d | 123 | py | Python | codes_auto/1359.circular-permutation-in-binary-representation.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | codes_auto/1359.circular-permutation-in-binary-representation.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | codes_auto/1359.circular-permutation-in-binary-representation.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=1359 lang=python3
#
# [1359] circular-permutation-in-binary-representation
#
None
# @lc code=end | 17.571429 | 54 | 0.731707 |
7940ca1830e4fc51366def626a59bb08921f880b | 81 | py | Python | src/checkin/utils.py | FSU-ACM/Programming-Contest-Suite | 459b03992aa3df3d8bc5a04b0b6ee24c3055f51f | [
"MIT"
] | 1 | 2021-12-14T16:30:11.000Z | 2021-12-14T16:30:11.000Z | src/checkin/utils.py | FSU-ACM/Programming-Contest-Suite | 459b03992aa3df3d8bc5a04b0b6ee24c3055f51f | [
"MIT"
] | 18 | 2021-12-19T01:20:59.000Z | 2022-03-22T00:27:15.000Z | src/checkin/utils.py | FSU-ACM/Programming-Contest-Suite | 459b03992aa3df3d8bc5a04b0b6ee24c3055f51f | [
"MIT"
] | 1 | 2022-03-04T04:19:51.000Z | 2022-03-04T04:19:51.000Z | def checkin_auth(user):
return user.profile.is_volunteer() or user.is_superuser
| 27 | 56 | 0.814815 |
7940cab69bdced061ff816afbf40c8ef43820264 | 4,668 | py | Python | test.py | MattFerraro/radon | 795b74fd7d12e7c4a191646e6bdf9e0386c8e95e | [
"Apache-2.0"
] | 2 | 2018-11-08T03:30:55.000Z | 2021-09-19T01:40:14.000Z | test.py | MattFerraro/radon | 795b74fd7d12e7c4a191646e6bdf9e0386c8e95e | [
"Apache-2.0"
] | null | null | null | test.py | MattFerraro/radon | 795b74fd7d12e7c4a191646e6bdf9e0386c8e95e | [
"Apache-2.0"
] | 1 | 2018-12-30T04:07:17.000Z | 2018-12-30T04:07:17.000Z | # import numpy as np
# import matplotlib.pyplot as plt
# # Number of samplepoints
# N = 600
# # sample spacing
# T = 1.0 / 800.0
# x = np.linspace(0.0, N*T, N)
# y = np.sin(50.0 * 2.0 * np.pi * x) + 0.5 * np.sin(80.0 * 2.0 * np.pi * x)
# # yf = numpy
# # xf = np.linspace(0.0, 1.0/(2.0*T), N/2)
# ft = np.fft.rfft(y)
#... | 22.123223 | 89 | 0.618895 |
7940cc446fa241c1fc0c5af5ee43d9c714d9f37b | 3,095 | py | Python | setup.py | wfarah/psrdada-python | d74aa784a49975c329b983c82dcfd1918dfd7736 | [
"Apache-2.0"
] | 4 | 2019-06-26T03:51:30.000Z | 2020-09-22T23:26:08.000Z | setup.py | wfarah/psrdada-python | d74aa784a49975c329b983c82dcfd1918dfd7736 | [
"Apache-2.0"
] | 2 | 2020-07-31T22:23:12.000Z | 2020-10-06T18:45:02.000Z | setup.py | TRASAL/psrdada-python | 977cb6c6501998082d6f836f8103c0a8fcf35485 | [
"Apache-2.0"
] | 3 | 2020-01-13T19:36:06.000Z | 2020-09-22T23:37:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for the PSRDada python bindings.
Build and install the package using distutils.
"""
# pylint: disable=all
from Cython.Build import cythonize
from setuptools import setup
from distutils.extension import Extension
from os import environ, path
with open('RE... | 28.136364 | 79 | 0.634249 |
7940cc77c0eab60d114bf6b0fc6027661ca2dfff | 1,254 | py | Python | pipelines/ner_demo_replace/scripts/create_config.py | dogatekin/projects | 4fa445a165de30c7e7877e17dc7fe8bea12b8198 | [
"MIT"
] | null | null | null | pipelines/ner_demo_replace/scripts/create_config.py | dogatekin/projects | 4fa445a165de30c7e7877e17dc7fe8bea12b8198 | [
"MIT"
] | null | null | null | pipelines/ner_demo_replace/scripts/create_config.py | dogatekin/projects | 4fa445a165de30c7e7877e17dc7fe8bea12b8198 | [
"MIT"
] | null | null | null | import typer
from pathlib import Path
import spacy
def create_config(model_name: str, component_to_replace: str, output_path: Path):
nlp = spacy.load(model_name)
# replace the component with a new default component
nlp.remove_pipe(component_to_replace)
nlp.add_pipe(component_to_replace)
# creat... | 31.35 | 81 | 0.708134 |
7940cca3a75b3f0d970913bb741f0006a02e36fe | 1,232 | py | Python | test/board_test.py | hr23232323/gomoku-ML-AI | 9766427b4885ffb171072fc4e4106b7b34faff8c | [
"MIT"
] | 1 | 2018-03-22T05:22:58.000Z | 2018-03-22T05:22:58.000Z | test/board_test.py | hr23232323/gomoku-ML-AI | 9766427b4885ffb171072fc4e4106b7b34faff8c | [
"MIT"
] | null | null | null | test/board_test.py | hr23232323/gomoku-ML-AI | 9766427b4885ffb171072fc4e4106b7b34faff8c | [
"MIT"
] | null | null | null | import pytest
from board import Board, Stone
from .helpers import run_move_seq
def won_games():
col_win = [(3, 3), (3, 4),
(4, 3), (4, 4),
(5, 3), (5, 4),
(6, 3), (6, 4),
(7, 3)]
row_win = [(3, 3), (4, 3),
(3, 4), (4, 4),
... | 24.64 | 46 | 0.413961 |
7940cce4bdd21c7d181288b692e6fc210fcbdac2 | 17,906 | py | Python | geo_png_tiler/mercantile/__init__.py | sasakiassociates/qgis-geo-png-db | bb71daa68e3721074482944d12f6323ce5136fed | [
"MIT"
] | 1 | 2021-10-01T11:44:59.000Z | 2021-10-01T11:44:59.000Z | geo_png_tiler/mercantile/__init__.py | sasakiassociates/qgis-geo-png-db | bb71daa68e3721074482944d12f6323ce5136fed | [
"MIT"
] | null | null | null | geo_png_tiler/mercantile/__init__.py | sasakiassociates/qgis-geo-png-db | bb71daa68e3721074482944d12f6323ce5136fed | [
"MIT"
] | null | null | null | """Web mercator XYZ tile utilities"""
from collections import namedtuple
import math
import sys
import warnings
if sys.version_info < (3,):
from collections import Sequence
else:
from collections.abc import Sequence
__version__ = "1.1.2"
__all__ = [
"Bbox",
"LngLat",
"LngLatBbox",
"Tile",
... | 25.113604 | 97 | 0.558584 |
7940cd0f1d5cff31f5484717798bb05d88006c56 | 7,916 | py | Python | dataporten/tests/test_parsers.py | frafra/django-dataporten | 4236017611e08d08bd810be0beae1b994cb5fc67 | [
"MIT"
] | 4 | 2019-01-06T17:56:07.000Z | 2021-03-21T19:16:35.000Z | dataporten/tests/test_parsers.py | frafra/django-dataporten | 4236017611e08d08bd810be0beae1b994cb5fc67 | [
"MIT"
] | 9 | 2019-10-21T17:23:53.000Z | 2021-06-10T21:06:25.000Z | dataporten/tests/test_parsers.py | frafra/django-dataporten | 4236017611e08d08bd810be0beae1b994cb5fc67 | [
"MIT"
] | 2 | 2019-04-29T11:48:59.000Z | 2020-01-06T09:54:55.000Z | from datetime import datetime
from django.test import TestCase
from freezegun import freeze_time
import pytest
from ..parsers import (
Course,
Group,
group_factory,
MainProfile,
Membership,
OrganisationUnit,
Semester,
StudyProgram,
datetime_fro... | 33.542373 | 121 | 0.646412 |
7940cdfb351f0f45d4bd3a973ea64f8c27cd749e | 5,970 | py | Python | app/ext/orm/orm_base.py | jonatasoli/fastapi-design-api-example | 16e620123d77506e6b4d6cc3947749f46bcd08be | [
"MIT"
] | 6 | 2021-06-21T19:38:07.000Z | 2022-01-27T14:53:32.000Z | app/ext/orm/orm_base.py | jonatasoli/fastapi-design-api-example | 16e620123d77506e6b4d6cc3947749f46bcd08be | [
"MIT"
] | null | null | null | app/ext/orm/orm_base.py | jonatasoli/fastapi-design-api-example | 16e620123d77506e6b4d6cc3947749f46bcd08be | [
"MIT"
] | 2 | 2021-06-27T13:22:07.000Z | 2022-02-26T12:21:13.000Z | from abc import ABCMeta
from typing import Any, Generic, Type, TypeVar, List
from fastapi.encoders import jsonable_encoder
from loguru import logger
from pydantic import BaseModel, parse_obj_as
from sqlalchemy.exc import DataError, DatabaseError, DisconnectionError, IntegrityError
from sqlalchemy.sql.expression import... | 35.963855 | 88 | 0.598827 |
7940ceaa61885a7365f2470309102778635822ad | 369 | py | Python | Python/Euler1.py | poc1673/Project-Euler-Exercises | 80044be236f56dd29d5db41296e0e3d683085a03 | [
"MIT"
] | null | null | null | Python/Euler1.py | poc1673/Project-Euler-Exercises | 80044be236f56dd29d5db41296e0e3d683085a03 | [
"MIT"
] | null | null | null | Python/Euler1.py | poc1673/Project-Euler-Exercises | 80044be236f56dd29d5db41296e0e3d683085a03 | [
"MIT"
] | null | null | null | def check_mod(number, mod_val):
if ((number % mod_val)==0) :
return number
else:
return 0
def get_mod_sum(max_val,mod_val):
return_val = 0
for i in range(1,max_val):
return_val = return_val + check_mod( i, mod_val )
return return_val
euler_1_results = get_mod_sum(1000,3)+ get_mod_sum(1000,... | 24.6 | 81 | 0.701897 |
7940cf9fc374d7add1579145f2b30e5bfe418350 | 425 | py | Python | src/veem/models/address.py | veeminc/Veem-python-sdk | 2f7527af0139a3f12e544fe2b51b3021df404f3c | [
"MIT"
] | 1 | 2021-07-05T22:52:46.000Z | 2021-07-05T22:52:46.000Z | src/veem/models/address.py | veeminc/Veem-python-sdk | 2f7527af0139a3f12e544fe2b51b3021df404f3c | [
"MIT"
] | 1 | 2020-09-15T16:25:39.000Z | 2020-09-15T16:25:39.000Z | src/veem/models/address.py | veeminc/Veem-python-sdk | 2f7527af0139a3f12e544fe2b51b3021df404f3c | [
"MIT"
] | 2 | 2021-08-11T18:05:08.000Z | 2022-02-06T08:20:49.000Z |
from veem.models.base import Base
class Address(Base):
def __init__(self,
line1=None,
line2=None,
city=None,
stateProvince=None,
postalCode=None,
**kwargs):
self.line1 = line1
self.line2 = line2
... | 23.611111 | 42 | 0.508235 |
7940d074b28f983c9788f27ee07ef62b4efa333c | 2,034 | py | Python | eval2.py | myutman/deep-voice-conversion | d707d0ea54d73d2a2df53f2f73b6d23f4afc5231 | [
"MIT"
] | null | null | null | eval2.py | myutman/deep-voice-conversion | d707d0ea54d73d2a2df53f2f73b6d23f4afc5231 | [
"MIT"
] | null | null | null | eval2.py | myutman/deep-voice-conversion | d707d0ea54d73d2a2df53f2f73b6d23f4afc5231 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# /usr/bin/python2
from __future__ import print_function
import tensorflow as tf
from models import Net2
import argparse
from hparam import hparam as hp
from tensorpack.predict.base import OfflinePredictor
from tensorpack.predict.config import PredictConfig
from tensorpack.tfutils.sessinit imp... | 28.25 | 81 | 0.717797 |
7940d0919da910b05d8f8b2568532d402bbece43 | 3,714 | py | Python | src/python/pants/backend/codegen/protobuf/lint/buf/rules.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/protobuf/lint/buf/rules.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 14 | 2020-09-26T02:01:56.000Z | 2022-03-30T10:19:28.000Z | src/python/pants/backend/codegen/protobuf/lint/buf/rules.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from dataclasses import dataclass
from pants.backend.codegen.protobuf.lint.buf.skip_field import SkipBufField
from pants.backend.codegen.protobuf.lint.buf.subsystem import BufSubsystem
fro... | 33.763636 | 93 | 0.710285 |
7940d1244c0eac7ed2ab14c8fd461940d0f0ea00 | 26,256 | py | Python | test/integration/smoke/test_routers.py | K0zka/cloudstack | ed099c3f964e4b18a3c431b59cdb63533ec91d81 | [
"Apache-2.0"
] | null | null | null | test/integration/smoke/test_routers.py | K0zka/cloudstack | ed099c3f964e4b18a3c431b59cdb63533ec91d81 | [
"Apache-2.0"
] | 6 | 2020-11-16T20:46:02.000Z | 2022-02-01T01:06:41.000Z | test/integration/smoke/test_routers.py | pkoistin/czo | 43cf1da865c1e4ed6523fb5b2ba315a547fac79f | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.861076 | 79 | 0.527994 |
7940d16244ac84df22dfab08da253baf0342a122 | 3,447 | py | Python | userbot/modules/blacklist.py | LetterIce/OUBnew | 6b059ed80976448f0611d73a77e648668518f131 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 37 | 2020-02-22T15:37:16.000Z | 2022-03-03T13:54:04.000Z | userbot/modules/blacklist.py | LetterIce/OUBnew | 6b059ed80976448f0611d73a77e648668518f131 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 26 | 2020-03-30T23:03:16.000Z | 2021-08-30T10:09:08.000Z | userbot/modules/blacklist.py | LetterIce/OUBnew | 6b059ed80976448f0611d73a77e648668518f131 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 279 | 2020-02-22T06:38:42.000Z | 2022-03-03T13:58:10.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
# port to userbot from uniborg by @keselekpermen69
import asyncio
import io
import re
import userbot.modules.sql_helpe... | 33.144231 | 85 | 0.631274 |
7940d215729bb1d0d44578f29e286b297a252b4f | 3,737 | py | Python | autobot/handler/response/replymarkupbuilder.py | andreacioni/AutoBot | 6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389 | [
"BSD-3-Clause"
] | 1 | 2019-05-16T10:08:35.000Z | 2019-05-16T10:08:35.000Z | autobot/handler/response/replymarkupbuilder.py | andreacioni/AutoBot | 6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389 | [
"BSD-3-Clause"
] | null | null | null | autobot/handler/response/replymarkupbuilder.py | andreacioni/AutoBot | 6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389 | [
"BSD-3-Clause"
] | 2 | 2018-12-24T23:51:28.000Z | 2019-05-16T15:53:56.000Z | import logging
from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, KeyboardButton
from autobot import AutoBotConstants
from autobot.configuration import AutoBotConfig
class ReplyMarkupBuilder(object):
_logger = logging.getLogger(__name__)
@classmethod
def build_keyboard(cls, config, entr... | 49.171053 | 145 | 0.630185 |
7940d3022948e6b52d6395c21a6e86f12c270f0a | 431 | py | Python | Python/Algorithms/50.py | DimitrisJim/leetcode_solutions | 765ea578748f8c9b21243dec9dc8a16163e85c0c | [
"Unlicense"
] | 2 | 2021-01-15T17:22:54.000Z | 2021-05-16T19:58:02.000Z | Python/Algorithms/50.py | DimitrisJim/leetcode_solutions | 765ea578748f8c9b21243dec9dc8a16163e85c0c | [
"Unlicense"
] | null | null | null | Python/Algorithms/50.py | DimitrisJim/leetcode_solutions | 765ea578748f8c9b21243dec9dc8a16163e85c0c | [
"Unlicense"
] | null | null | null | class Solution:
def myPow(self, x: float, n: int) -> float:
if x == 0:
return 0
# flip sign of exponent.
pos_exp, n = (True, n) if n > 0 else (False, -n)
result = 1
while n > 0:
if n & 1:
result *= x
x *= x
n //... | 22.684211 | 56 | 0.38051 |
7940d3399168414cb842b828d084456674329ec3 | 1,922 | py | Python | bin/thresholder.py | a7mad3akef/ProjectBlog | 6cabd7d6d025af6a51fca49915b75987fc0284c5 | [
"MIT"
] | 1 | 2018-02-04T22:52:32.000Z | 2018-02-04T22:52:32.000Z | bin/thresholder.py | a7mad3akef/ProjectBlog | 6cabd7d6d025af6a51fca49915b75987fc0284c5 | [
"MIT"
] | null | null | null | bin/thresholder.py | a7mad3akef/ProjectBlog | 6cabd7d6d025af6a51fca49915b75987fc0284c5 | [
"MIT"
] | null | null | null | #!/home/k0f4/Desktop/Blog-API-with-Django-Rest-Framework/bin/python2
#
# The Python Imaging Library
# $Id$
#
# this demo script illustrates how a 1-bit BitmapImage can be used
# as a dynamically updated overlay
#
try:
from tkinter import *
except ImportError:
from Tkinter import *
from PIL import Image, Image... | 24.329114 | 74 | 0.596254 |
7940d3f5e5385c7f8f43c465f9dbda144ca51f8d | 2,059 | py | Python | utils/models/vgg16.py | pksvision/Video-Dehazing-Pytorch | f318114d27c9b4e36c605027f351b6035fad9140 | [
"MIT"
] | null | null | null | utils/models/vgg16.py | pksvision/Video-Dehazing-Pytorch | f318114d27c9b4e36c605027f351b6035fad9140 | [
"MIT"
] | null | null | null | utils/models/vgg16.py | pksvision/Video-Dehazing-Pytorch | f318114d27c9b4e36c605027f351b6035fad9140 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class Vgg16(torch.nn.Module):
def __init__(self):
super(Vgg16, self).__init__()
self.conv1_1 = nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1)
self.conv1_2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1)
... | 36.767857 | 78 | 0.603205 |
7940d5426e0a4603cd00c882e25f42ffbb5de7a2 | 402,128 | py | Python | results/v200_cuda70_k40c.py | supreethms1809/magma-2.2.0 | b713d0b0a7a4724847e3a4050987c5ea9e7a7279 | [
"BSD-3-Clause"
] | 31 | 2015-06-19T14:41:12.000Z | 2021-02-15T12:47:57.000Z | results/v200_cuda70_k40c.py | supreethms1809/magma-2.2.0 | b713d0b0a7a4724847e3a4050987c5ea9e7a7279 | [
"BSD-3-Clause"
] | 3 | 2020-01-02T05:21:16.000Z | 2020-01-07T20:04:05.000Z | results/v200_cuda70_k40c.py | supreethms1809/magma-2.2.0 | b713d0b0a7a4724847e3a4050987c5ea9e7a7279 | [
"BSD-3-Clause"
] | 17 | 2015-04-01T14:26:48.000Z | 2021-12-27T06:12:15.000Z | import numpy
from numpy import array, nan, inf
version = '2.0.0'
cuda = '7.0'
device = 'Kepler K40c'
cpu = '2x8 core Sandy Bridge E5-2670'
# ------------------------------------------------------------
# file: v2.0.0/cuda7.0-k40c/cgeqrf.txt
# numactl --interleave=all ../testing/testing_cgeqrf -N 123 -N 1234 -... | 76.363084 | 886 | 0.443182 |
7940d546489c2c1353ca45d6331d3637f08649dd | 448 | pyde | Python | processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde | brickdonut/2019-fall-polytech-cs | b2830795f35e65ff90cf73e0746551c6efdd1f87 | [
"MIT"
] | null | null | null | processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde | brickdonut/2019-fall-polytech-cs | b2830795f35e65ff90cf73e0746551c6efdd1f87 | [
"MIT"
] | null | null | null | processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde | brickdonut/2019-fall-polytech-cs | b2830795f35e65ff90cf73e0746551c6efdd1f87 | [
"MIT"
] | null | null | null | xCoordinate = [1,2,3,4,5,6,7,8,9,10]
coordinate = 0
def setup():
size(500,500)
smooth()
noStroke()
for i in range(0, len(xCoordinate)):
xCoordinate[i] = 35*i + 90
def draw():
background(50)
for coordinate in xCoordinate:
fill(200)
ellipse(coordinate, 250, 30, 30)... | 21.333333 | 40 | 0.540179 |
7940d5e63e5badcec8569d3275d3d3fefef1df42 | 844 | py | Python | app/translate.py | raz-m12/python_flask-website | 9f4396a0b436c06174a5d0fc0c83aa2fae6ed277 | [
"MIT"
] | null | null | null | app/translate.py | raz-m12/python_flask-website | 9f4396a0b436c06174a5d0fc0c83aa2fae6ed277 | [
"MIT"
] | null | null | null | app/translate.py | raz-m12/python_flask-website | 9f4396a0b436c06174a5d0fc0c83aa2fae6ed277 | [
"MIT"
] | null | null | null | import json
import requests
from flask import current_app
from flask_babel import _
def translate(text, source_language, dest_language):
if 'MS_TRANSLATOR_KEY' not in current_app.config or \
not current_app.config['MS_TRANSLATOR_KEY']:
return _('Error: the translation service is not configured... | 38.363636 | 77 | 0.663507 |
7940d69df3fbe72f3f545c1df20a26c1b2095d9a | 2,964 | py | Python | stackformation/deploy/__init__.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | stackformation/deploy/__init__.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | 1,396 | 2017-12-24T18:25:05.000Z | 2022-03-31T15:05:19.000Z | stackformation/deploy/__init__.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | import time
import logging
from stackformation.utils import (match_stack, _match_stack)
from colorama import Fore, Back, Style # noqa
logger = logging.getLogger(__name__)
class Deploy(object):
"""
Base deploy class
"""
def cli_confirm(self, infra, selector=[], **kwargs):
c = 0
... | 26 | 81 | 0.547571 |
7940d7a6a60ec9f488759063d37b32c9c5e51e8d | 5,271 | py | Python | pluraexercise.py | RajParab/pluradl.py | b1ab480526c698f578e9f4bdd9ca9cddd9876f5e | [
"MIT"
] | 10 | 2020-08-14T03:17:53.000Z | 2021-08-14T13:58:11.000Z | pluraexercise.py | RajParab/pluradl.py | b1ab480526c698f578e9f4bdd9ca9cddd9876f5e | [
"MIT"
] | null | null | null | pluraexercise.py | RajParab/pluradl.py | b1ab480526c698f578e9f4bdd9ca9cddd9876f5e | [
"MIT"
] | 6 | 2020-09-15T18:44:45.000Z | 2021-04-15T10:59:00.000Z | from plura_dl.scrapeutils import (
os,
sys,
re,
sleep,
Path,
clear,
TimeoutException,
set_chrome_driver,
wait_for_access,
enter_hibernation
)
from selenium.webdriver.chrome.options import Options
from pluradl import get_courses, get_usr_pw, flag_parser, arg_parser, set_directory... | 35.857143 | 142 | 0.658509 |
7940d7db84ed683eb3d8d25fdbc6a92e05e270cc | 1,479 | py | Python | test/test_inference/test_annotations.py | haoqixu/jedi | ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591 | [
"MIT"
] | 10 | 2020-07-21T21:59:54.000Z | 2021-07-19T11:01:47.000Z | test/test_inference/test_annotations.py | haoqixu/jedi | ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591 | [
"MIT"
] | null | null | null | test/test_inference/test_annotations.py | haoqixu/jedi | ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591 | [
"MIT"
] | 1 | 2021-01-30T18:17:01.000Z | 2021-01-30T18:17:01.000Z | from textwrap import dedent
import pytest
def test_simple_annotations(Script, environment):
"""
Annotations only exist in Python 3.
If annotations adhere to PEP-0484, we use them (they override inference),
else they are parsed but ignored
"""
if environment.version_info.major == 2:
py... | 22.753846 | 77 | 0.613928 |
7940d867a51a6573716d4e0ffa0d7c2691ed6696 | 1,940 | py | Python | nes/ensemble_selection/config.py | automl/nes | 1c54786c30acd6e19eb9708204bffc86b58ea272 | [
"Apache-2.0"
] | 26 | 2020-06-22T16:07:54.000Z | 2022-03-23T08:12:05.000Z | nes/ensemble_selection/config.py | automl/nes | 1c54786c30acd6e19eb9708204bffc86b58ea272 | [
"Apache-2.0"
] | 2 | 2020-07-13T06:23:18.000Z | 2022-03-31T07:30:18.000Z | nes/ensemble_selection/config.py | automl/nes | 1c54786c30acd6e19eb9708204bffc86b58ea272 | [
"Apache-2.0"
] | 4 | 2020-07-06T01:55:16.000Z | 2021-08-02T00:00:14.000Z | from collections import namedtuple
# ======================================
# Some global configs for the experiments.
BUDGET = 400 # Maximum number of networks evaluated.
PLOT_EVERY = 25 # Frequency at which incumbents are chosen (and plotting is done).
MAX_M = 30 # Largest ensemble size used.
model_seeds = namedt... | 27.714286 | 124 | 0.641753 |
7940d8a1b0968e4ad027a6773ef338c778ac82a1 | 8,412 | py | Python | code-gen.py | hpsoar/swagger-objc | 1a1b5844e2543d1c5426fb5f180d25e0f12fbe53 | [
"MIT"
] | null | null | null | code-gen.py | hpsoar/swagger-objc | 1a1b5844e2543d1c5426fb5f180d25e0f12fbe53 | [
"MIT"
] | null | null | null | code-gen.py | hpsoar/swagger-objc | 1a1b5844e2543d1c5426fb5f180d25e0f12fbe53 | [
"MIT"
] | null | null | null | # -*- coding:utf8 -*-
import json
from jinja2 import Template
from jinja2 import FileSystemLoader
from jinja2.environment import Environment
jenv = Environment()
jenv.loader = FileSystemLoader('.')
class Property(object):
def __init__(self, name, info):
self.name = name
self.type = ''
se... | 28.323232 | 104 | 0.595459 |
7940d9bec71e8f61e360b7c6afe78c8a45f0aa6d | 850 | py | Python | reference/sketchbook/spew/spew.py | JaDogg/__py_playground | 416f88db10e03f5380bcb5cfcad0bca50ffa657c | [
"MIT"
] | 1 | 2015-10-28T00:00:16.000Z | 2015-10-28T00:00:16.000Z | reference/sketchbook/spew/spew.py | JaDogg/__py_playground | 416f88db10e03f5380bcb5cfcad0bca50ffa657c | [
"MIT"
] | null | null | null | reference/sketchbook/spew/spew.py | JaDogg/__py_playground | 416f88db10e03f5380bcb5cfcad0bca50ffa657c | [
"MIT"
] | null | null | null | import random, re
# N.B. the words can be arbitrary text.
dictionary = {word: expansion.strip()
for line in open('menu.text')
for word, expansion in [line.split(':', 1)]}
def expand_word(word, probability=.99):
"""Given a dictionary word, replace it with its definition or not,
rand... | 32.692308 | 73 | 0.630588 |
7940dab525889c3eca9fbcdd4c2c2d8b69a80096 | 450 | py | Python | src/bdbd/src/bdbd/test/circles2.py | rkent/BDBD | c5d391da84faf5607c443078781f8b4e1c017dd5 | [
"MIT"
] | null | null | null | src/bdbd/src/bdbd/test/circles2.py | rkent/BDBD | c5d391da84faf5607c443078781f8b4e1c017dd5 | [
"MIT"
] | null | null | null | src/bdbd/src/bdbd/test/circles2.py | rkent/BDBD | c5d391da84faf5607c443078781f8b4e1c017dd5 | [
"MIT"
] | null | null | null | # test circles in geometry
from bdbd.libpy.geometry import shortestPath
import math
D_TO_R = math.pi / 180. # degrees to radians
x = 3.0
rho = 0.5
# test cases from RKJ notebook 2020-08-26
phis = [60.5, 18.5, 27.0, -90.0]
yes = [2.0, 1.75, -2.0, -2.0]
for i in range(0, len(phis)):
solution = shortestPath(x, yes[... | 26.470588 | 60 | 0.648889 |
7940dabcfb03cc9eb46f678365685a6e99bcceec | 6,561 | py | Python | python/paddle/fluid/data_feeder.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-08-29T03:39:53.000Z | 2021-08-29T03:39:53.000Z | python/paddle/fluid/data_feeder.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-29T21:57:12.000Z | 2022-03-29T21:57:12.000Z | python/paddle/fluid/data_feeder.py | limeng357/Paddle | dbd25805c88c48998eb9dc0f4b2ca1fd46326482 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-04T08:01:39.000Z | 2020-11-06T08:33:28.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 36.653631 | 80 | 0.56089 |
7940dc01970daa7fcd75f3b8fab9bc1acd05edaa | 2,344 | py | Python | experiments/migrations/0001_initial.py | aapris/DjangoHttpBroker-Experiments | 694065d13ef014e4faf102d353041b1c179a3c3c | [
"MIT"
] | null | null | null | experiments/migrations/0001_initial.py | aapris/DjangoHttpBroker-Experiments | 694065d13ef014e4faf102d353041b1c179a3c3c | [
"MIT"
] | null | null | null | experiments/migrations/0001_initial.py | aapris/DjangoHttpBroker-Experiments | 694065d13ef014e4faf102d353041b1c179a3c3c | [
"MIT"
] | null | null | null | # Generated by Django 2.2b1 on 2019-03-23 10:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='RfidRead',
fields=[
... | 41.857143 | 188 | 0.59215 |
7940dc18b963df9968ac2ae766ce8c32e443c520 | 538 | py | Python | shipments/migrations/0003_alter_shipment_transporter.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | shipments/migrations/0003_alter_shipment_transporter.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | shipments/migrations/0003_alter_shipment_transporter.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-04-20 21:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shipments', '0002_alter_shipment_transporter'),
]
operations = [
migrations.AlterField(
model_name='shipment',
name=... | 28.315789 | 185 | 0.613383 |
7940dd9e9df3d85315325bf08935934ebc208201 | 5,254 | py | Python | troposphere/registry.py | sabakaio/docker-registry | 720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1 | [
"MIT"
] | null | null | null | troposphere/registry.py | sabakaio/docker-registry | 720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1 | [
"MIT"
] | null | null | null | troposphere/registry.py | sabakaio/docker-registry | 720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1 | [
"MIT"
] | null | null | null | from functools import partial
from troposphere import Output, Parameter, Template
from troposphere import GetAtt, Ref, Join
from troposphere import constants as c, ec2, s3
from helpers import iam
from helpers import meta
from helpers.amilookup.resources import ami_lookup
template = Template()
az = template.add_para... | 30.022857 | 92 | 0.676056 |
7940dde24bf0016b6fd74e9d920e1934d22e0b5e | 991 | py | Python | src/pub_test.py | mijazm/ros_test | f0a70bcf131fd36d2ddbde268fcc85beca9774d0 | [
"MIT"
] | null | null | null | src/pub_test.py | mijazm/ros_test | f0a70bcf131fd36d2ddbde268fcc85beca9774d0 | [
"MIT"
] | null | null | null | src/pub_test.py | mijazm/ros_test | f0a70bcf131fd36d2ddbde268fcc85beca9774d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# This code creates a publisher node which publishes a random number between 0 and 1 to the
# topic /random.
# Author: Mijaz Mukundan
# This code was written to test ROS installation
import rospy
from std_msgs.msg import Float32
import random
def talker():
# A node must have a unique name,... | 28.314286 | 95 | 0.690212 |
7940df89dccd943056617c0592a923d7561affe4 | 3,436 | py | Python | scripts/generate-supplier-user-csv.py | alphagov-mirror/digitalmarketplace-scripts | 8a7ef9b2b5f5fffea6e012bd676b095a27d35101 | [
"MIT"
] | 1 | 2020-06-23T01:55:31.000Z | 2020-06-23T01:55:31.000Z | scripts/generate-supplier-user-csv.py | alphagov-mirror/digitalmarketplace-scripts | 8a7ef9b2b5f5fffea6e012bd676b095a27d35101 | [
"MIT"
] | 267 | 2015-10-12T12:43:52.000Z | 2021-08-19T10:38:55.000Z | scripts/generate-supplier-user-csv.py | alphagov-mirror/digitalmarketplace-scripts | 8a7ef9b2b5f5fffea6e012bd676b095a27d35101 | [
"MIT"
] | 7 | 2015-11-11T16:47:41.000Z | 2021-04-10T18:03:04.000Z | #!/usr/bin/env python3
"""
PREREQUISITE: You'll need AWS credentials set up for the environment that you're uploading to:
Save your aws_access_key_id and aws_secret_access_key in ~/.aws/credentials
If you have more than one set of credentials in there then be sure to set your AWS_PROFILE en... | 36.946237 | 119 | 0.708673 |
7940e02278ae9d6779f7972dc5fcf78c5820c7ed | 56 | py | Python | dwpicker/ingest/animschool/__init__.py | markusng/dwpicker | cb63176ac82b0e1c2a1e0695b5554f784387daa5 | [
"MIT"
] | null | null | null | dwpicker/ingest/animschool/__init__.py | markusng/dwpicker | cb63176ac82b0e1c2a1e0695b5554f784387daa5 | [
"MIT"
] | null | null | null | dwpicker/ingest/animschool/__init__.py | markusng/dwpicker | cb63176ac82b0e1c2a1e0695b5554f784387daa5 | [
"MIT"
] | null | null | null | from dwpicker.ingest.animschool.converter import convert | 56 | 56 | 0.892857 |
7940e0706ff7f2bc8922f102fa1e8cc413da4c42 | 5,668 | py | Python | error_analysis.py | vsawal/CS224N-Final-Project | be43a039cefc85568427db2b0cee5ba61fb05157 | [
"MIT"
] | 3 | 2020-09-13T06:56:21.000Z | 2020-11-22T13:32:18.000Z | error_analysis.py | vsawal/CS224N-Final-Project | be43a039cefc85568427db2b0cee5ba61fb05157 | [
"MIT"
] | 1 | 2021-05-05T11:16:37.000Z | 2021-05-05T11:16:37.000Z | error_analysis.py | vsawal/CS224N-Final-Project | be43a039cefc85568427db2b0cee5ba61fb05157 | [
"MIT"
] | null | null | null | import json
import timeit
import uuid
def get_english_arabic_translation():
with open("train-v2.0-questions-arabic.txt", "r") as arfile:
arabic = arfile.readlines()
with open("train-v2.0-questions-copy.txt", "r") as infile:
for i, line in enumerate(infile):
line = line.lower()... | 33.341176 | 79 | 0.501764 |
7940e1430766127b75041bd5739e7b0515073f7c | 57 | py | Python | mods/persistence.py | hirusha-adi/UnSillyRAT | 819cc02d3f357a206f6253637ba92f55727ad30d | [
"MIT"
] | null | null | null | mods/persistence.py | hirusha-adi/UnSillyRAT | 819cc02d3f357a206f6253637ba92f55727ad30d | [
"MIT"
] | null | null | null | mods/persistence.py | hirusha-adi/UnSillyRAT | 819cc02d3f357a206f6253637ba92f55727ad30d | [
"MIT"
] | null | null | null | class PERSISTENCE:
def __init__(self):
pass
| 11.4 | 23 | 0.614035 |
7940e31677bf69f77d9091c49244c743238649d1 | 1,074 | py | Python | config.py | valentine-ochieng/Moringa-Overflow | 03d44aaaebca316961e4fb6203e429ee5974d782 | [
"MIT"
] | 1 | 2022-01-10T13:07:50.000Z | 2022-01-10T13:07:50.000Z | config.py | valentine-ochieng/Moringa-Overflow | 03d44aaaebca316961e4fb6203e429ee5974d782 | [
"MIT"
] | null | null | null | config.py | valentine-ochieng/Moringa-Overflow | 03d44aaaebca316961e4fb6203e429ee5974d782 | [
"MIT"
] | null | null | null | import os
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLALCHEMY_TRACK_MODIFICATIONS = False
UPLOADED_PHOTOS_DEST = 'app/static/photos'
# email configurations
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get("MAIL_USERNAM... | 33.5625 | 100 | 0.721601 |
7940e3f33c19c94be1143ccd5e2488b56d49fed2 | 1,201 | py | Python | corefacility/core/synchronizations/exceptions.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | corefacility/core/synchronizations/exceptions.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | corefacility/core/synchronizations/exceptions.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | from django.utils.translation import gettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
class SynchronizationError(APIException):
"""
This is the base class for all synchronization routines
"""
pass
class TeapotError(SynchronizationError):
"""
... | 28.595238 | 111 | 0.741882 |
7940e45bb9aa9fff252a360df399a79442c536c5 | 451 | py | Python | rectifai/settings.py | Sushil-Thapa/rectif.ai | b308f613402097dca9734806a8c27ba3eef6a358 | [
"Apache-2.0"
] | null | null | null | rectifai/settings.py | Sushil-Thapa/rectif.ai | b308f613402097dca9734806a8c27ba3eef6a358 | [
"Apache-2.0"
] | null | null | null | rectifai/settings.py | Sushil-Thapa/rectif.ai | b308f613402097dca9734806a8c27ba3eef6a358 | [
"Apache-2.0"
] | null | null | null | import os
import logging
from dotenv import load_dotenv
load_dotenv(verbose=True)
logger = logging.getLogger(__name__)
# The Root Directory of the project
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
POSENET_PATH = os.path.join(ROOT_DIR, 'data','raw','posenet.pth')
POSTURENET_PATH = os.path... | 28.1875 | 71 | 0.764967 |
7940e482cc03dd9784e0134b9e2ba122ea6b31ef | 15,268 | py | Python | ironicclient/osc/v1/baremetal_volume_target.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | 41 | 2015-01-29T20:10:48.000Z | 2022-01-26T10:04:28.000Z | ironicclient/osc/v1/baremetal_volume_target.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | null | null | null | ironicclient/osc/v1/baremetal_volume_target.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | 46 | 2015-01-19T17:46:52.000Z | 2021-12-19T01:22:47.000Z | # Copyright 2017 FUJITSU LIMITED
#
# 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 writ... | 36.968523 | 79 | 0.58449 |
7940e511765f5975386fc8fd99dd39413a0d4248 | 14,271 | py | Python | darglint/parse/grammars/google_arguments_section.py | s-weigand/darglint | 6bc5d764db86626a996de1ff50925f976bf1449e | [
"MIT"
] | 405 | 2017-10-19T11:04:21.000Z | 2022-03-23T07:58:40.000Z | darglint/parse/grammars/google_arguments_section.py | s-weigand/darglint | 6bc5d764db86626a996de1ff50925f976bf1449e | [
"MIT"
] | 186 | 2018-03-26T20:33:37.000Z | 2022-03-20T22:47:54.000Z | darglint/parse/grammars/google_arguments_section.py | s-weigand/darglint | 6bc5d764db86626a996de1ff50925f976bf1449e | [
"MIT"
] | 43 | 2018-10-14T23:49:48.000Z | 2022-02-10T12:39:16.000Z | # Generated on 2020-05-31 10:21:20.274591
from darglint.errors import (
ParameterMalformedError,
)
from darglint.parse.grammar import (
BaseGrammar,
P,
)
from darglint.token import (
TokenType,
)
from darglint.parse.identifiers import (
NoqaIdentifier,
)
from darglint.errors import (
EmptyD... | 150.221053 | 1,294 | 0.657557 |
7940e5ad23db95af64198b956199c89063741219 | 73,162 | py | Python | tools/run_tests/run_tests.py | vixadd/grpc | 7c9e8b425166276232653725de32ea0422a39b33 | [
"Apache-2.0"
] | 2 | 2021-07-13T09:16:08.000Z | 2021-11-17T11:07:13.000Z | tools/run_tests/run_tests.py | vixadd/grpc | 7c9e8b425166276232653725de32ea0422a39b33 | [
"Apache-2.0"
] | 1 | 2017-09-12T19:02:08.000Z | 2017-09-12T19:02:08.000Z | tools/run_tests/run_tests.py | vixadd/grpc | 7c9e8b425166276232653725de32ea0422a39b33 | [
"Apache-2.0"
] | 1 | 2021-07-05T12:40:00.000Z | 2021-07-05T12:40:00.000Z | #!/usr/bin/env python
# Copyright 2015 gRPC 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 applicable law o... | 37.596095 | 147 | 0.539064 |
7940e5b632b9146f74c807eae55b8084a5cde85a | 312 | py | Python | lambda-layer/src/common/constants.py | USDOT-SDC/log4sdc | 718875d33fcbd54f2b8f7201d09f761e9afef038 | [
"MIT"
] | null | null | null | lambda-layer/src/common/constants.py | USDOT-SDC/log4sdc | 718875d33fcbd54f2b8f7201d09f761e9afef038 | [
"MIT"
] | 1 | 2021-11-19T18:18:53.000Z | 2021-11-19T18:18:53.000Z | lambda-layer/src/common/constants.py | USDOT-SDC/log4sdc | 718875d33fcbd54f2b8f7201d09f761e9afef038 | [
"MIT"
] | null | null | null | class Constants:
LOGGER_NAME = "log4sdc-common"
LOGGER_LOG_LEVEL_ENV_VAR = "LOG_LEVEL"
LOGGER_DEFAULT_LOG_LEVEL = "WARN"
def __setattr__(self, attr, value):
if hasattr(self, attr):
raise Exception("Attempting to alter read-only value")
self.__dict__[attr] = value
| 24 | 66 | 0.666667 |
7940e5be571d4199306b83bb35c3a271dcd3734c | 164 | py | Python | api/admin.py | nnamdiib/timetable-app | 4184e0d860df6e98ad17d5c3d30d23bbbc15ac58 | [
"MIT"
] | null | null | null | api/admin.py | nnamdiib/timetable-app | 4184e0d860df6e98ad17d5c3d30d23bbbc15ac58 | [
"MIT"
] | 2 | 2020-02-11T23:43:12.000Z | 2020-06-05T17:37:52.000Z | api/admin.py | nnamdiib/timetable-app | 4184e0d860df6e98ad17d5c3d30d23bbbc15ac58 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Day)
admin.site.register(Course)
admin.site.register(Class) | 23.428571 | 32 | 0.79878 |
7940e684f03b37e6ab1d2274d2b193edb1c6d23c | 42,349 | py | Python | Python/2 kyu/Evaluate Mathematical Expression/test_calc.py | newtonsspawn/codewars_challenges | 62b20d4e729c8ba79eac7cae6a179af57abd45d4 | [
"MIT"
] | 3 | 2020-05-29T23:29:35.000Z | 2021-08-12T03:16:44.000Z | Python/2 kyu/Evaluate Mathematical Expression/test_calc.py | newtonsspawn/codewars_challenges | 62b20d4e729c8ba79eac7cae6a179af57abd45d4 | [
"MIT"
] | null | null | null | Python/2 kyu/Evaluate Mathematical Expression/test_calc.py | newtonsspawn/codewars_challenges | 62b20d4e729c8ba79eac7cae6a179af57abd45d4 | [
"MIT"
] | 3 | 2020-05-22T12:14:55.000Z | 2021-04-15T12:52:42.000Z | from unittest import TestCase
from calc import calc
class TestCalc(TestCase):
def test_calc_001(self):
self.assertEqual(calc('2 + 3 * 4 / 3 - 6 / 3 * 3 + 8'), 8)
def test_calc_002(self):
self.assertEqual(calc('1 + 2 * 3 * 3 - 8'), 11)
def test_calc_003(self):
self.a... | 34.097424 | 80 | 0.454509 |
7940e6cad1672aa487f8ed6c103179a0622ce4b6 | 2,050 | py | Python | acurl/tests/test_to_curl.py | markgreene74/mite | 339bdfc39be30534ea2169d8257469bd0ff535fb | [
"MIT"
] | 17 | 2019-11-14T22:32:56.000Z | 2022-02-01T15:38:03.000Z | acurl/tests/test_to_curl.py | markgreene74/mite | 339bdfc39be30534ea2169d8257469bd0ff535fb | [
"MIT"
] | 35 | 2020-01-08T10:50:31.000Z | 2022-02-17T17:00:34.000Z | acurl/tests/test_to_curl.py | markgreene74/mite | 339bdfc39be30534ea2169d8257469bd0ff535fb | [
"MIT"
] | 4 | 2019-11-14T14:48:18.000Z | 2020-05-06T22:09:25.000Z | import pytest
from helpers import create_request
import acurl
def test_to_curl():
r = create_request("GET", "http://foo.com")
assert r.to_curl() == "curl -X GET http://foo.com"
def test_to_curl_headers():
r = create_request(
"GET", "http://foo.com", headers=("Foo: bar", "My-Header: is-aweso... | 28.873239 | 87 | 0.540976 |
7940e70c7114480e2b25391b63da5ddfa8250971 | 6,690 | py | Python | kubernetes/client/models/v1beta1_custom_resource_definition_list.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_custom_resource_definition_list.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_custom_resource_definition_list.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 31.857143 | 281 | 0.625411 |
7940ebb43087fee2dc062c5637d43fd3569d3fea | 2,366 | py | Python | ulfs/gumbel.py | asappresearch/neural-ilm | fd7e09960525391f4084a5753429deabd7ff00aa | [
"MIT"
] | null | null | null | ulfs/gumbel.py | asappresearch/neural-ilm | fd7e09960525391f4084a5753429deabd7ff00aa | [
"MIT"
] | null | null | null | ulfs/gumbel.py | asappresearch/neural-ilm | fd7e09960525391f4084a5753429deabd7ff00aa | [
"MIT"
] | 2 | 2021-02-25T04:42:14.000Z | 2021-02-25T04:43:06.000Z | import torch
from torch.autograd import Variable
import torch.nn.functional as F
def sample_gumbel(shape, eps=1e-10):
"""
Sample from Gumbel(0, 1)
based on
https://github.com/ericjang/gumbel-softmax/blob/3c8584924603869e90ca74ac20a6a03d99a91ef9/Categorical%20VAE.ipynb ,
(MIT license)
"""
U... | 36.4 | 118 | 0.681319 |
7940ebd0885aea30f08ccb8bf1bdb86250de6fd7 | 6,450 | py | Python | llvm/utils/lit/lit/TestingConfig.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 30 | 2016-09-06T06:58:43.000Z | 2021-12-23T11:59:38.000Z | llvm/utils/lit/lit/TestingConfig.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 1 | 2018-05-15T00:55:37.000Z | 2018-05-15T00:55:37.000Z | llvm/utils/lit/lit/TestingConfig.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 17 | 2016-10-24T06:08:16.000Z | 2022-02-18T17:27:14.000Z | import os
import sys
OldPy = sys.version_info[0] == 2 and sys.version_info[1] < 7
class TestingConfig:
""""
TestingConfig - Information on the tests inside a suite.
"""
@staticmethod
def fromdefaults(litConfig):
"""
fromdefaults(litConfig) -> TestingConfig
Create a Testin... | 38.622754 | 89 | 0.545116 |
7940ec0266e43981dcef61d5fcd769a14fe8f985 | 5,780 | py | Python | datamanager/transforms.py | nielswart/inetbfa-data-conversion | bf2a28c19608babe32846036122584a1dccd34a1 | [
"Apache-2.0"
] | 1 | 2016-03-03T10:32:47.000Z | 2016-03-03T10:32:47.000Z | datamanager/transforms.py | nielswart/inetbfa-data-conversion | bf2a28c19608babe32846036122584a1dccd34a1 | [
"Apache-2.0"
] | null | null | null | datamanager/transforms.py | nielswart/inetbfa-data-conversion | bf2a28c19608babe32846036122584a1dccd34a1 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from functools import partial
from os import path
from datamanager.envs import MASTER_DATA_PATH
'''
This module contains equity indicator and transformation functions for time series data based on pandas DataFrame's
'''
def calc_booktomarket(close, bookvalue):
'''
'''
... | 27.393365 | 167 | 0.651903 |
7940ed61e5165e294c0f3f71db4e8d7275b733a8 | 645 | py | Python | backend/manage.py | crowdbotics-apps/ideapros-llc-stream-33286 | a60a79687e5f0a2a5ec8cefb059479f587b9694a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/ideapros-llc-stream-33286 | a60a79687e5f0a2a5ec8cefb059479f587b9694a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/ideapros-llc-stream-33286 | a60a79687e5f0a2a5ec8cefb059479f587b9694a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ideapros_llc_stream_33286.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.318182 | 89 | 0.691473 |
7940f089b0dc96bbc2f67020ac2125f06d6ed674 | 3,472 | py | Python | print_variance.py | tiskw/gaussian-process-bootstrapping-layer | a1c20232ba286aa3245e6aab575a9aaaf274931f | [
"MIT"
] | null | null | null | print_variance.py | tiskw/gaussian-process-bootstrapping-layer | a1c20232ba286aa3245e6aab575a9aaaf274931f | [
"MIT"
] | null | null | null | print_variance.py | tiskw/gaussian-process-bootstrapping-layer | a1c20232ba286aa3245e6aab575a9aaaf274931f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Training script for CIFAR10 classifier.
"""
import argparse
import os
import time
import numpy
import sklearn.metrics
import torch
import torchvision
from model import LeNet5, GaussianProcessBootstrapping
class GaussianProcessBootstrappingPrintVar(GaussianProcessBootstrapping):
"""
... | 32.148148 | 120 | 0.643721 |
7940f1ca33d38ef2e5c607be77e486e8bb64318b | 322 | py | Python | jp.atcoder/abc031/abc031_b/8925627.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc031/abc031_b/8925627.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc031/abc031_b/8925627.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
import numpy as np
I = np.array(sys.stdin.read().split(), dtype=np.int64)
L, H, n = I[:3]
a = I[3:]
def main():
res = np.zeros(n, dtype=np.int64)
res = np.maximum(L - a, 0)
res[a > H] = -1
return res
if __name__ == "__main__":
ans = main()
print(*ans, sep="\n")... | 16.1 | 55 | 0.515528 |
7940f36b37afb9c180baab949ffd4a6080b396cb | 11,164 | py | Python | app.py | exandwhy/COVID19_Streamlit | db84b55943e72446dcc9e51dd5ca09f7ce771dee | [
"Apache-2.0"
] | null | null | null | app.py | exandwhy/COVID19_Streamlit | db84b55943e72446dcc9e51dd5ca09f7ce771dee | [
"Apache-2.0"
] | null | null | null | app.py | exandwhy/COVID19_Streamlit | db84b55943e72446dcc9e51dd5ca09f7ce771dee | [
"Apache-2.0"
] | null | null | null | import streamlit as st
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
import matplotlib
from plotly.subplots import make_subplots
import warnings
warnings.filterwarnings(action='ignore')
@st.cache(allow_output_mutation=True)
def get_data():
url = 'https://api.c... | 32.932153 | 102 | 0.597187 |
7940f36c49102a7178559252454817d51ac2cea8 | 3,156 | py | Python | src/qibo/backends/matrices.py | renatomello/qibo | 20c6f3f22effbeccd5d31ed456717f9bee449e0c | [
"Apache-2.0"
] | null | null | null | src/qibo/backends/matrices.py | renatomello/qibo | 20c6f3f22effbeccd5d31ed456717f9bee449e0c | [
"Apache-2.0"
] | null | null | null | src/qibo/backends/matrices.py | renatomello/qibo | 20c6f3f22effbeccd5d31ed456717f9bee449e0c | [
"Apache-2.0"
] | 1 | 2022-03-28T17:52:46.000Z | 2022-03-28T17:52:46.000Z | import numpy as np
class Matrices:
_NAMES = ["I", "H", "X", "Y", "Z", "S", "T", "CNOT", "CZ", "SWAP", "FSWAP", "TOFFOLI"]
def __init__(self, backend):
self.backend = backend
self._I = None
self._H = None
self._X = None
self._Y = None
self._Z = None
sel... | 22.225352 | 90 | 0.499049 |
7940f47ef5e5e23289a1a570bfd18f3b8f004e00 | 5,937 | py | Python | roommatefinder/settings.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | roommatefinder/settings.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | roommatefinder/settings.py | smlaming/Roomate-Finder | 864d6633f4303b53596d8fe62572bf7808c6c443 | [
"MIT"
] | null | null | null | """
Django settings for roommatefinder project.
Generated by 'django-admin startproject' using Django 3.1.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from ... | 25.925764 | 150 | 0.6857 |
7940f4a951b02381f1745deaf9d984fc6d654579 | 8,837 | py | Python | android/scripts/common.py | hustwei/deqp | 812d768b55dcedf2c0fda63e69db3c05600f379d | [
"Apache-2.0"
] | null | null | null | android/scripts/common.py | hustwei/deqp | 812d768b55dcedf2c0fda63e69db3c05600f379d | [
"Apache-2.0"
] | null | null | null | android/scripts/common.py | hustwei/deqp | 812d768b55dcedf2c0fda63e69db3c05600f379d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | 26.860182 | 113 | 0.690619 |
7940f4dcc4b04af088f8ec9f29b0a6c9aed7d386 | 11,485 | py | Python | riboflask_compare.py | skiniry/Trips-Viz | a742a6c7d0c9758e3c439828e804025d7fc44b4f | [
"MIT"
] | 7 | 2019-07-25T14:34:48.000Z | 2021-10-19T07:52:29.000Z | riboflask_compare.py | skiniry/Trips-Viz | a742a6c7d0c9758e3c439828e804025d7fc44b4f | [
"MIT"
] | 3 | 2021-06-07T23:26:38.000Z | 2021-11-15T22:37:43.000Z | riboflask_compare.py | skiniry/Trips-Viz | a742a6c7d0c9758e3c439828e804025d7fc44b4f | [
"MIT"
] | 2 | 2019-09-04T08:51:25.000Z | 2022-03-10T20:58:40.000Z | import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot as plt
import mpld3
from mpld3 import plugins,utils
from new_plugins import InteractiveLegendPlugin,TopToolbar,DownloadProfile,DownloadPNG
from fetch_shelve_reads2 import get_reads
import sqlite3
import config
import os
import config
def merge_dict... | 44.688716 | 307 | 0.720853 |
7940f506a415a9b35af8f8725517de78605c7c62 | 4,104 | py | Python | locations/spiders/orangetheory_fitness.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/orangetheory_fitness.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/orangetheory_fitness.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import scrapy
from locations.items import GeojsonPointItem
class OrangetheoryFitnessSpider(scrapy.Spider):
name = "orangetheory_fitness"
allowed_domains = ["orangetheory.co"]
start_urls = [
"https://api.orangetheory.co/partners/studios/v2?country=United+States... | 46.11236 | 88 | 0.597222 |
7940f5e0a0ba6c34abdda501be57630b2505b6b5 | 69,598 | py | Python | src/gdata/service.py | gauravuniverse/gdata-python-client | c4575d0775ebb83ac2bac2d40319ea921a184f5a | [
"Apache-2.0"
] | 483 | 2015-01-07T18:03:08.000Z | 2021-12-22T00:05:55.000Z | src/gdata/service.py | gauravuniverse/gdata-python-client | c4575d0775ebb83ac2bac2d40319ea921a184f5a | [
"Apache-2.0"
] | 68 | 2015-01-05T17:25:36.000Z | 2021-12-06T20:43:34.000Z | src/gdata/service.py | gauravuniverse/gdata-python-client | c4575d0775ebb83ac2bac2d40319ea921a184f5a | [
"Apache-2.0"
] | 297 | 2015-01-02T20:05:06.000Z | 2022-03-17T22:25:34.000Z | #
# Copyright (C) 2006,2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 40.511059 | 90 | 0.679761 |
7940f7ce9519faa133ecd76ee74693a00d8a5a94 | 1,691 | py | Python | app/aspect/aspect_knowlege_base.py | ahmedAdel202090/Aspect-Model | 2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e | [
"MIT"
] | null | null | null | app/aspect/aspect_knowlege_base.py | ahmedAdel202090/Aspect-Model | 2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e | [
"MIT"
] | null | null | null | app/aspect/aspect_knowlege_base.py | ahmedAdel202090/Aspect-Model | 2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e | [
"MIT"
] | null | null | null | from app.aspect.utils import seq_to_vec
from app.aspect.aspect_extraction import AspectExtraction
class AspectKnowledgeBase(object):
def __init__(self):
self.texts = []
self.knowledge_set = {}
self.aspect_extraction = AspectExtraction()
self.num_keywords=0
def __call__(self,model,texts,ngram,skip_... | 43.358974 | 120 | 0.703726 |
7940f81c08a9717ff9a38f16b516bc37e6349c0c | 12,830 | py | Python | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Quotes API For Digital Portals
The quotes API combines endpoints for retrieving security end-of-day, delayed, and realtime prices with performance key figures and basic reference data on the security and market level. The API supports over 20 different price types for each quote and comes with basic searc... | 48.598485 | 1,302 | 0.593453 |
7940f99daaa46ff6b8d81dc0cb4f2c1e3d302dd7 | 3,683 | py | Python | ui/src/lib/pybitcointools/bitcoin/stealth.py | superzitao/Wallet | a7018511afcf47e04e563640e52b86fd4862f838 | [
"MIT"
] | null | null | null | ui/src/lib/pybitcointools/bitcoin/stealth.py | superzitao/Wallet | a7018511afcf47e04e563640e52b86fd4862f838 | [
"MIT"
] | null | null | null | ui/src/lib/pybitcointools/bitcoin/stealth.py | superzitao/Wallet | a7018511afcf47e04e563640e52b86fd4862f838 | [
"MIT"
] | null | null | null | import main as main
import transaction as tx
# Shared secrets and uncovering pay keys
def shared_secret_sender(scan_pubkey, ephem_privkey):
shared_point = main.multiply(scan_pubkey, ephem_privkey)
shared_secret = main.sha256(main.encode_pubkey(shared_point, 'bin_compressed'))
return shared_secret
def s... | 36.465347 | 120 | 0.754005 |
7940fa0932898a9c10c15ccba761695b30986434 | 4,671 | py | Python | hevc/convert2.py | dugle80/video-cleanup | 0274435deb74f49f4ff4827bedbc7f9186d22071 | [
"MIT"
] | null | null | null | hevc/convert2.py | dugle80/video-cleanup | 0274435deb74f49f4ff4827bedbc7f9186d22071 | [
"MIT"
] | 1 | 2022-03-18T04:54:47.000Z | 2022-03-18T04:54:47.000Z | hevc/convert2.py | dugle80/video-cleanup | 0274435deb74f49f4ff4827bedbc7f9186d22071 | [
"MIT"
] | null | null | null | from subprocess import PIPE
from ffprobe import FFProbe
from pathlib import Path
import multiprocessing
import time
import os
import signal
import subprocess
import shlex
import psutil
import send2trash
import logging
import shutil
useramdsk = 0
if useramdsk == 0:
ip = "/home/david/Downloads/jdownloader/"
elif use... | 27.803571 | 120 | 0.597731 |
7940fa5a8330931272881c3feb58f02432021d8d | 329 | py | Python | shop/urls.py | Zoki92/E-commerce | f5614f54ce06606d99f9b8360cb4f88a97c616f3 | [
"MIT"
] | null | null | null | shop/urls.py | Zoki92/E-commerce | f5614f54ce06606d99f9b8360cb4f88a97c616f3 | [
"MIT"
] | null | null | null | shop/urls.py | Zoki92/E-commerce | f5614f54ce06606d99f9b8360cb4f88a97c616f3 | [
"MIT"
] | 1 | 2019-05-24T06:14:04.000Z | 2019-05-24T06:14:04.000Z | from django.urls import path
from . import views
app_name = 'shop'
urlpatterns = [
path('', views.product_list, name='product_list'),
path('<slug:category_slug>/', views.product_list,
name="product_list_by_category"),
path('<int:id>/<slug:slug>/', views.product_detail,
name="product_deta... | 23.5 | 55 | 0.665653 |
7940fad5a60338301de94da34338f7699e423e7e | 1,368 | bzl | Python | java/java_grpc_library.bzl | purkhusid/rules_proto_grpc | 943656d049d2932a32d8f882bbb05c024b499020 | [
"Apache-2.0"
] | null | null | null | java/java_grpc_library.bzl | purkhusid/rules_proto_grpc | 943656d049d2932a32d8f882bbb05c024b499020 | [
"Apache-2.0"
] | null | null | null | java/java_grpc_library.bzl | purkhusid/rules_proto_grpc | 943656d049d2932a32d8f882bbb05c024b499020 | [
"Apache-2.0"
] | null | null | null | """Generated definition of java_grpc_library."""
load("//java:java_grpc_compile.bzl", "java_grpc_compile")
load("//internal:compile.bzl", "proto_compile_attrs")
load("@rules_java//java:defs.bzl", "java_library")
def java_grpc_library(name, **kwargs):
# Compile protos
name_pb = name + "_pb"
java_grpc_compi... | 33.365854 | 110 | 0.636696 |
7940fb81936a9262fb9c27a126f063374f6481b0 | 1,163 | py | Python | chapters/chp4/mlp.py | Tomspiano/D2L-PyTorch | c748c72a2da66211bd88c1adcd048b05be40e77c | [
"Apache-2.0"
] | 2 | 2021-06-29T15:42:24.000Z | 2021-07-21T08:09:52.000Z | chapters/chp4/mlp.py | Tomspiano/D2L-PyTorch | c748c72a2da66211bd88c1adcd048b05be40e77c | [
"Apache-2.0"
] | null | null | null | chapters/chp4/mlp.py | Tomspiano/D2L-PyTorch | c748c72a2da66211bd88c1adcd048b05be40e77c | [
"Apache-2.0"
] | null | null | null | import torch
from modules import base
from modules import fashionMNIST as fmnist
from torch import nn
from torch.nn import init
from modules import d2lCustom as custom
def train(num_inputs, num_hiddens, num_outputs, train_iter, test_iter, eps):
# epoch 46, loss 0.155, train acc 0.943, test acc 0.883, 546.2 exampl... | 25.282609 | 93 | 0.66638 |
7940fc23b1a7a6d6466c51140fa0bcf02baf53b8 | 1,393 | py | Python | PREPROCESSING/manual_labeling/mark_good_datasets_manually.py | MobMonRob/ArmMovementPredictionStudien | 7086f7b044d54b023c7d40e9413c35178a1ad084 | [
"Apache-2.0"
] | 2 | 2020-10-15T07:24:26.000Z | 2022-02-18T05:37:13.000Z | PREPROCESSING/manual_labeling/mark_good_datasets_manually.py | MobMonRob/ArmMovementPredictionStudien | 7086f7b044d54b023c7d40e9413c35178a1ad084 | [
"Apache-2.0"
] | null | null | null | PREPROCESSING/manual_labeling/mark_good_datasets_manually.py | MobMonRob/ArmMovementPredictionStudien | 7086f7b044d54b023c7d40e9413c35178a1ad084 | [
"Apache-2.0"
] | null | null | null | import os
from tkinter import *
from ArmMovementPredictionStudien.PREPROCESSING.utils.utils import open_dataset_numpy
from ArmMovementPredictionStudien.PREPROCESSING.visualisation.visualise_files import visualise
import matplotlib.pyplot as plt
first = True
file_list = os.listdir("../../DATA/0_raw/")
counter = 1090
... | 25.327273 | 94 | 0.676956 |
7940ffa57b85019cb993185eb941fad74f1d58e6 | 824 | py | Python | Examples/Python/SimpleTransformix.py | sorenchr2011/SimpleElastix | 2a79d151894021c66dceeb2c8a64ff61506e7155 | [
"Apache-2.0"
] | 1 | 2021-03-05T22:52:15.000Z | 2021-03-05T22:52:15.000Z | Examples/Python/SimpleTransformix.py | sorenchr2011/SimpleElastix | 2a79d151894021c66dceeb2c8a64ff61506e7155 | [
"Apache-2.0"
] | null | null | null | Examples/Python/SimpleTransformix.py | sorenchr2011/SimpleElastix | 2a79d151894021c66dceeb2c8a64ff61506e7155 | [
"Apache-2.0"
] | 1 | 2021-01-16T08:57:07.000Z | 2021-01-16T08:57:07.000Z | import SimpleITK as sitk
import sys
# Make transform
elastixImageFilter = sitk.ElastixImageFilter()
elastixImageFilter.SetFixedImage(sitk.ReadImage(str(sys.argv[1])))
elastixImageFilter.SetMovingImage(sitk.ReadImage(str(sys.argv[2])))
elastixImageFilter.SetParameterMap(sitk.ReadParameterFile(str(sys.argv[3])))
elasti... | 32.96 | 85 | 0.839806 |
794100e819f99a290a75a4d245839f314058c0bb | 22,254 | py | Python | mrcnn/visualize.py | felixstillger/Mask_RCNN | fab32b45cd104f8df63906157606024c2897ca3e | [
"MIT"
] | null | null | null | mrcnn/visualize.py | felixstillger/Mask_RCNN | fab32b45cd104f8df63906157606024c2897ca3e | [
"MIT"
] | null | null | null | mrcnn/visualize.py | felixstillger/Mask_RCNN | fab32b45cd104f8df63906157606024c2897ca3e | [
"MIT"
] | null | null | null | """
Mask R-CNN
Display and Visualization Functions.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import sys
import random
import itertools
import colorsys
import numpy as np
from skimage.measure import find_contours
import matplo... | 37.654822 | 92 | 0.580031 |
794100fc628723df100085b233fee0eef09588f7 | 3,454 | py | Python | osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py | RedHatProductSecurity/osidb-bindings | 5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846 | [
"MIT"
] | null | null | null | osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py | RedHatProductSecurity/osidb-bindings | 5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846 | [
"MIT"
] | null | null | null | osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py | RedHatProductSecurity/osidb-bindings | 5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846 | [
"MIT"
] | null | null | null | from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.token_refresh import TokenRefresh
from ...types import UNSET, Response, Unset
def _get_kwargs(
*,
client: Client,
form_data: TokenRefresh,
multipart_data: TokenRefresh,
json_body: TokenRefresh,
) -> D... | 24.496454 | 78 | 0.657209 |
79410163e2a053e67bd9da0f8807f3560be8e135 | 378 | py | Python | generators/abstract.py | lucasgeorgegustafson/MTG-pack-generator | 495df761f8163373268793cb74e274c42582fe3a | [
"MIT"
] | 1 | 2021-03-25T03:16:40.000Z | 2021-03-25T03:16:40.000Z | generators/abstract.py | lucasgeorgegustafson/MTG-pack-generator | 495df761f8163373268793cb74e274c42582fe3a | [
"MIT"
] | null | null | null | generators/abstract.py | lucasgeorgegustafson/MTG-pack-generator | 495df761f8163373268793cb74e274c42582fe3a | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class AbstractGenerator(ABC):
@abstractmethod
def sort_by_rarity(self):
pass
@abstractmethod
def roll_for_mythic(self):
pass
@abstractmethod
def fix_sort(self):
pass
@abstractmethod
def print_pack(self):
pass
@... | 15.12 | 35 | 0.634921 |
79410168ad7caffa8737a619c9d3f3d4b5db1dd9 | 10,855 | py | Python | ucsmsdk/mometa/sw/SwEthEstcPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/sw/SwEthEstcPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/sw/SwEthEstcPc.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for SwEthEstcPc ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class SwEthEstcPcConsts():
ADMIN_SPEED_10GBPS = "10gbps"
ADMIN_SPEED_1GBPS = "1g... | 60.642458 | 317 | 0.661354 |
7941019bdd915dfdf28221bcd1a6510512c373b0 | 3,120 | py | Python | models/necks/db_fpn.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | models/necks/db_fpn.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | models/necks/db_fpn.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# __author__:Song Zhenqi
# 2021-01-26
import torch
import torch.nn as nn
from torch.nn import functional as F
from . import register_neck
@register_neck('DBFPN')
class DBFPN(nn.Module):
def __init__(self, in_channels, out_channels, **kwargs):
super(DBFPN, self).__init__()
... | 37.142857 | 72 | 0.476282 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.