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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795f8c34a96f0ed1c6e3e863b86db03bf709dad6 | 4,171 | py | Python | gym_miniworld/envs/tworoomlarge.py | vivekveeriah/gym-miniworld | 0640074e34d24f61a637820980673b1503e9a840 | [
"Apache-2.0"
] | null | null | null | gym_miniworld/envs/tworoomlarge.py | vivekveeriah/gym-miniworld | 0640074e34d24f61a637820980673b1503e9a840 | [
"Apache-2.0"
] | null | null | null | gym_miniworld/envs/tworoomlarge.py | vivekveeriah/gym-miniworld | 0640074e34d24f61a637820980673b1503e9a840 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import math
from gym import spaces
from ..miniworld import MiniWorldEnv, Room
from ..entity import Box, ImageFrame, MeshEnt
from ..params import DEFAULT_PARAMS
class TwoRoomLarge(MiniWorldEnv):
"""
Outside environment with two rooms connected by a gap in a wall
"""
def __init__(self... | 31.839695 | 106 | 0.523615 |
795f8d4401de0e5766005b92e08cff34a24ba6c3 | 2,112 | py | Python | project_euler/solutions/problem_61.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | null | null | null | project_euler/solutions/problem_61.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | 9 | 2017-02-20T23:41:40.000Z | 2017-04-16T15:36:54.000Z | project_euler/solutions/problem_61.py | cryvate/project-euler | 6ed13880d7916c34554559f5f71662a863735eda | [
"MIT"
] | null | null | null | from collections import Counter
from typing import Optional, Tuple
from ..library.sequences import triangle_sequence, \
square_sequence, \
pentagonal_sequence, \
hexagonal_sequence, \
heptag... | 30.608696 | 77 | 0.487689 |
795f8e4ad51a10e94519ad23d7206a8ceeb57710 | 3,002 | py | Python | tests/test_reverse.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | 11 | 2019-05-20T16:47:03.000Z | 2021-12-17T10:24:22.000Z | tests/test_reverse.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | null | null | null | tests/test_reverse.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | 3 | 2019-05-24T02:24:30.000Z | 2020-03-17T09:55:40.000Z | #!/usr/bin/env pytest-3
# -*- coding: utf-8 -*-
__author__ = "Marc-Olivier Buob"
__maintainer__ = "Marc-Olivier Buob"
__email__ = "marc-olivier.buob@nokia-bell-labs.com"
__copyright__ = "Copyright (C) 2020, Nokia"
__license__ = "BSD-3"
from pybgl.breadth_first_search import (
DefaultBreadthFirstSearc... | 30.632653 | 73 | 0.597935 |
795f8e936625aefb4befc1a02b1f1a972adb56ef | 5,740 | py | Python | Student_Repository_Client.py | nicholasmiller1995/Python---Student-Repository | 0f7cac265416ff65e6c13a024905308eb6190f50 | [
"Unlicense"
] | null | null | null | Student_Repository_Client.py | nicholasmiller1995/Python---Student-Repository | 0f7cac265416ff65e6c13a024905308eb6190f50 | [
"Unlicense"
] | null | null | null | Student_Repository_Client.py | nicholasmiller1995/Python---Student-Repository | 0f7cac265416ff65e6c13a024905308eb6190f50 | [
"Unlicense"
] | null | null | null | import socket
import sys
import json
import docx
sock = socket.create_connection(('localhost', 10000))
average = 0
search_score_start = 0
search_score_end = 0
search_exact_id = {}
Students = {
10 : {
'Last Name' : 'Smith',
'First Name... | 33.764706 | 463 | 0.435017 |
795f8f7df903f468f6bdd8f69d5ce83aad9671d1 | 1,398 | py | Python | epytope/Data/pssms/syfpeithi/mat/C_0202_8.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | epytope/Data/pssms/syfpeithi/mat/C_0202_8.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | epytope/Data/pssms/syfpeithi/mat/C_0202_8.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | null | null | null | C_0202_8 = {0: {'A': 0, 'C': 0, 'D': 0, 'E': 0, 'F': 2, 'G': 0, 'H': 0, 'I': 0, 'K': 0, 'L': 0, 'M': 0, 'N': 0, 'P': 0, 'Q': 0, 'R': 0, 'S': 0, 'T': 0, 'V': 0, 'W': 0, 'Y': 2, 'X': 0}, 1: {'A': 10, 'C': 0, 'D': 0, 'E': 0, 'F': 0, 'G': 0, 'H': 0, 'I': 8, 'K': 0, 'L': 0, 'M': 0, 'N': 0, 'P': 0, 'Q': 6, 'R': 0, 'S': 8, 'T... | 1,398 | 1,398 | 0.253934 |
795f8f977799a1ad56fb7d9af95e9e1917bca85d | 918 | py | Python | social_core/backends/livejournal.py | BenRogersNewsome/social-core | 1ea27e8989657bb35dd37b6ee2e038e1358fbc96 | [
"BSD-3-Clause"
] | 1 | 2021-12-27T21:10:59.000Z | 2021-12-27T21:10:59.000Z | social_core/backends/livejournal.py | BenRogersNewsome/social-core | 1ea27e8989657bb35dd37b6ee2e038e1358fbc96 | [
"BSD-3-Clause"
] | null | null | null | social_core/backends/livejournal.py | BenRogersNewsome/social-core | 1ea27e8989657bb35dd37b6ee2e038e1358fbc96 | [
"BSD-3-Clause"
] | null | null | null | """
LiveJournal OpenId backend, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/livejournal.html
"""
from urllib.parse import urlsplit
from .open_id import OpenIdAuth
from ..exceptions import AuthMissingParameter
class LiveJournalOpenId(OpenIdAuth):
"""LiveJournal OpenID authentication ... | 34 | 81 | 0.69281 |
795f8fb83cb64a9c90e0a8c29a30e2fa7671e143 | 1,158 | py | Python | bookorbooks/school/admin.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | 1 | 2021-08-10T22:24:17.000Z | 2021-08-10T22:24:17.000Z | bookorbooks/school/admin.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | null | null | null | bookorbooks/school/admin.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | null | null | null | from school.models.student_list_model import StudentList
from school.models.class_model import Class
from school.models.school_model import School
from django.contrib import admin
class ClassInlineAdmin(admin.StackedInline):
model = Class
extra = 0
@admin.register(School)
class SchoolAdmin(admin.ModelAdmin):
... | 29.692308 | 76 | 0.696028 |
795f934ac658d367f56bec7b3924730940e63230 | 7,929 | py | Python | reports/github.py | lukecampbell/github-reporting | 62c3f7ef165f722b111a59d1a2b3d23de3cd6d28 | [
"Apache-2.0"
] | 1 | 2022-02-01T20:27:58.000Z | 2022-02-01T20:27:58.000Z | reports/github.py | lukecampbell/github-reporting | 62c3f7ef165f722b111a59d1a2b3d23de3cd6d28 | [
"Apache-2.0"
] | null | null | null | reports/github.py | lukecampbell/github-reporting | 62c3f7ef165f722b111a59d1a2b3d23de3cd6d28 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
monthly_report.py
A utility script to generate statistics about the github activity for certain
repositories
'''
from requests.auth import HTTPBasicAuth
from reports import config
from dateutil.parser import parse as dateparse
import os
import requests
import pytz
import re
import logging
A... | 26.69697 | 82 | 0.64737 |
795f935794071c27064e88aab40b3fa5c116fa9e | 2,081 | py | Python | BayesOpt/BayesOpt-SVM.py | Saoge123/ccgnet | 9359c642bd1faa4c15cae829615385761ebd8d92 | [
"MIT"
] | 17 | 2020-11-09T08:07:36.000Z | 2022-03-17T13:53:46.000Z | BayesOpt/BayesOpt-SVM.py | Saoge123/ccgnet | 9359c642bd1faa4c15cae829615385761ebd8d92 | [
"MIT"
] | 2 | 2021-05-05T14:18:36.000Z | 2021-10-22T02:58:53.000Z | BayesOpt/BayesOpt-SVM.py | Saoge123/ccgnet | 9359c642bd1faa4c15cae829615385761ebd8d92 | [
"MIT"
] | 2 | 2021-10-16T14:34:17.000Z | 2021-10-21T06:49:32.000Z | import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import classification_report, accuracy_score
from sklearn.svm import ... | 37.160714 | 118 | 0.71456 |
795f9450a707e92889cb2a779532847798681e46 | 1,239 | py | Python | blaze/tests/test_constructors.py | davidfischer/blaze-core | 19b55ed469aec742fd871b959115a3d87a89acb9 | [
"BSD-2-Clause"
] | 1 | 2015-01-02T18:16:07.000Z | 2015-01-02T18:16:07.000Z | blaze/tests/test_constructors.py | davidfischer/blaze-core | 19b55ed469aec742fd871b959115a3d87a89acb9 | [
"BSD-2-Clause"
] | null | null | null | blaze/tests/test_constructors.py | davidfischer/blaze-core | 19b55ed469aec742fd871b959115a3d87a89acb9 | [
"BSD-2-Clause"
] | null | null | null | """Test constructors
Test constructors for arrays of basic types.
"""
from blaze import zeros, ones, dshape
from numpy.testing.decorators import skipif
from unittest import TestCase
class ConstructTest(TestCase):
full_types = [
'10, int8',
'30, int16',
'40, int32',
'12, int64',... | 20.311475 | 52 | 0.513317 |
795f950ddc59501847ee15a02cf4016d8e7716c5 | 5,723 | py | Python | jinahub/encoders/text/TransformerTorchEncoder/transform_encoder.py | vivek2301/executors | 8159681d68408ab8f797497bc3374be77e6ca392 | [
"Apache-2.0"
] | null | null | null | jinahub/encoders/text/TransformerTorchEncoder/transform_encoder.py | vivek2301/executors | 8159681d68408ab8f797497bc3374be77e6ca392 | [
"Apache-2.0"
] | null | null | null | jinahub/encoders/text/TransformerTorchEncoder/transform_encoder.py | vivek2301/executors | 8159681d68408ab8f797497bc3374be77e6ca392 | [
"Apache-2.0"
] | null | null | null | __copyright__ = 'Copyright (c) 2021 Jina AI Limited. All rights reserved.'
__license__ = 'Apache-2.0'
from typing import Dict, Iterable, Optional, Tuple
import numpy as np
import torch
from jina import DocumentArray, Executor, requests
from jina_commons.batching import get_docs_batch_generator
from transformers impor... | 40.878571 | 98 | 0.651057 |
795f9512ce52b098efad89a52f957af0342fd8c3 | 1,067 | py | Python | RESSPyLab/reciprocal_barrier.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 7 | 2019-10-15T09:16:41.000Z | 2021-09-24T11:28:45.000Z | RESSPyLab/reciprocal_barrier.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 3 | 2020-10-22T14:27:22.000Z | 2021-11-15T17:46:49.000Z | RESSPyLab/reciprocal_barrier.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 6 | 2019-07-22T05:47:10.000Z | 2021-10-24T02:06:26.000Z | """@package reciprocal_barrier
Implements the reciprocal barrier function.
"""
from .barrier_function import BarrierFunction
class ReciprocalBarrier(BarrierFunction):
def __init__(self, initial_height=1., decrease_rate=1.):
""" Defines the reciprocal barrier function.
:param float initial_height... | 34.419355 | 110 | 0.68791 |
795f95b9ee59eba0d720fd1de7316678421773f4 | 6,010 | py | Python | datmo/core/entity/snapshot.py | datmo/datmo | a456d196006b67ce56af96cb4900682eab747bef | [
"MIT"
] | 331 | 2018-03-30T14:33:59.000Z | 2022-01-10T19:43:32.000Z | datmo/core/entity/snapshot.py | KIMS-Github/datmo | a456d196006b67ce56af96cb4900682eab747bef | [
"MIT"
] | 274 | 2018-04-08T17:12:44.000Z | 2020-07-29T02:45:22.000Z | datmo/core/entity/snapshot.py | KIMS-Github/datmo | a456d196006b67ce56af96cb4900682eab747bef | [
"MIT"
] | 28 | 2018-05-03T21:57:22.000Z | 2020-12-31T04:18:42.000Z | import os
from datetime import datetime
from datmo.core.util.json_store import JSONStore
from datmo.core.util.misc_functions import prettify_datetime, printable_object, format_table
class Snapshot():
"""Snapshot is an entity object to represent a version of the model. These snapshots
are the building blocks ... | 38.280255 | 95 | 0.621631 |
795f96d3dc112d2e0788ddba1e28b5d502651b1d | 1,852 | py | Python | prep_data.py | RomanShen/acl-srw | fe5ee1071f98cab1ef885868faa87f981cc19719 | [
"Apache-2.0"
] | null | null | null | prep_data.py | RomanShen/acl-srw | fe5ee1071f98cab1ef885868faa87f981cc19719 | [
"Apache-2.0"
] | null | null | null | prep_data.py | RomanShen/acl-srw | fe5ee1071f98cab1ef885868faa87f981cc19719 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author: romanshen
@file: prep_data.py
@time: 2021/05/06
@contact: xiangqing.shen@njust.edu.cn
"""
import os
import hydra
from omegaconf import OmegaConf
import pickle
from prep_utils import Lang, prepare_data, prepare_test_data
def run(cfg):
os.chdir(hydra.... | 26.84058 | 88 | 0.653348 |
795f974d3c6247b67019155fee8de39e00c40379 | 3,671 | py | Python | timm/scheduler/tanh_lr.py | bermanmaxim/pytorch-image-models | 1d7f2d93a68bdc3c5d8d634d869709f6cdd7cecd | [
"Apache-2.0"
] | 1 | 2021-12-28T10:41:13.000Z | 2021-12-28T10:41:13.000Z | scheduler/tanh_lr.py | hhy5277/pytorch-image-models | ff9962560368f31cf62397ff0c2930b632ef9f48 | [
"Apache-2.0"
] | null | null | null | scheduler/tanh_lr.py | hhy5277/pytorch-image-models | ff9962560368f31cf62397ff0c2930b632ef9f48 | [
"Apache-2.0"
] | 1 | 2019-07-09T08:30:49.000Z | 2019-07-09T08:30:49.000Z | import logging
import math
import numpy as np
import torch
from .scheduler import Scheduler
logger = logging.getLogger(__name__)
class TanhLRScheduler(Scheduler):
"""
Hyberbolic-Tangent decay with restarts.
This is described in the paper https://arxiv.org/abs/1806.01593
"""
def __init__(self,
... | 33.678899 | 106 | 0.535276 |
795f97eee2635fced69de5c7d374f7fd2b171b03 | 959 | py | Python | compile.py | WorkHardForever/ccxtOnDotNet | 5a0ed433b4b2fb8aba203736663be194f051eafc | [
"Apache-2.0"
] | 1 | 2022-02-15T19:37:31.000Z | 2022-02-15T19:37:31.000Z | compile.py | slctr/ccxtOnDotNet | 5a0ed433b4b2fb8aba203736663be194f051eafc | [
"Apache-2.0"
] | null | null | null | compile.py | slctr/ccxtOnDotNet | 5a0ed433b4b2fb8aba203736663be194f051eafc | [
"Apache-2.0"
] | null | null | null | from System import IO
from System.IO.Path import Combine
from System.Text.RegularExpressions import Regex
def walk(folder):
for file in IO.Directory.GetFiles(folder):
if (Regex.IsMatch(file, "\.pyc") or not Regex.IsMatch(file, "\.py")):
continue
yield file
for folder in IO.Directory... | 30.935484 | 77 | 0.699687 |
795f980031790ff0fe0ab5587c2c86f6e3d9f34b | 576 | py | Python | setup.py | s-scherrer/ecmwf_models | 723eb0b0e3e21b313209c377963939bac19385bf | [
"MIT"
] | 26 | 2016-09-05T18:31:11.000Z | 2022-03-10T02:48:51.000Z | setup.py | s-scherrer/ecmwf_models | 723eb0b0e3e21b313209c377963939bac19385bf | [
"MIT"
] | 9 | 2017-11-30T13:03:49.000Z | 2021-11-08T14:23:38.000Z | setup.py | s-scherrer/ecmwf_models | 723eb0b0e3e21b313209c377963939bac19385bf | [
"MIT"
] | 15 | 2016-09-05T18:31:15.000Z | 2021-12-15T12:08:23.000Z | # -*- coding: utf-8 -*-
"""
Setup file for ecmwf_models.
Use setup.cfg to configure your project.
This file was generated with PyScaffold 3.2.3.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""
import sys
from pkg_resources impor... | 24 | 75 | 0.704861 |
795f9845b6243a31b355dc6dab654a466c5e5fb6 | 4 | py | Python | test_data/parse_retree/expected/start_and_stop_symbols/only_start_symbol/source.py | aas-core-works/aas-core-codegen | afec2cf363b6cb69816e7724a2b58626e2165869 | [
"MIT"
] | 5 | 2021-12-29T12:55:34.000Z | 2022-03-01T17:57:21.000Z | test_data/parse_retree/expected/start_and_stop_symbols/only_start_symbol/source.py | aas-core-works/aas-core-codegen | afec2cf363b6cb69816e7724a2b58626e2165869 | [
"MIT"
] | 10 | 2021-12-29T02:15:55.000Z | 2022-03-09T11:04:22.000Z | test_data/parse_retree/expected/start_and_stop_symbols/only_start_symbol/source.py | aas-core-works/aas-core-codegen | afec2cf363b6cb69816e7724a2b58626e2165869 | [
"MIT"
] | 2 | 2021-12-29T01:42:12.000Z | 2022-02-15T13:46:33.000Z | "^"
| 2 | 3 | 0 |
795f98a5d4a3a2c8ac05dcb63711bf9564cc23b9 | 743 | py | Python | test/test_browser_output.py | mtkumar123/CSC510_Project_LectureAid | 678e39596ca583eda961413118781bafa02c6f1d | [
"MIT"
] | null | null | null | test/test_browser_output.py | mtkumar123/CSC510_Project_LectureAid | 678e39596ca583eda961413118781bafa02c6f1d | [
"MIT"
] | 45 | 2021-09-13T00:26:54.000Z | 2021-09-30T01:12:53.000Z | test/test_browser_output.py | mtkumar123/CSC510_Project_LectureAid | 678e39596ca583eda961413118781bafa02c6f1d | [
"MIT"
] | 2 | 2021-09-29T00:40:56.000Z | 2021-10-17T14:28:25.000Z | import unittest
from code.browser_output import content_formatter
class TestBrowserOutput(unittest.TestCase):
def setUp(self) -> None:
pass
def test_content_output_format(self):
"""
Asserts that content s returned as per the html format for browser output
"""
i = open(... | 28.576923 | 81 | 0.64603 |
795f98cf7f1ef3169e333940079bf758919ee20c | 1,568 | py | Python | lib/layer_utils/proposal_top_layer.py | lily0101/my-tf-faster-rcnn | 639670c7dabc212513f25577c3a8b95087a7459d | [
"MIT"
] | 32 | 2018-07-05T01:15:24.000Z | 2019-07-23T12:03:51.000Z | lib/layer_utils/proposal_top_layer.py | lily0101/my-tf-faster-rcnn | 639670c7dabc212513f25577c3a8b95087a7459d | [
"MIT"
] | 2 | 2019-01-12T07:08:20.000Z | 2019-04-02T11:13:58.000Z | lib/layer_utils/proposal_top_layer.py | lily0101/my-tf-faster-rcnn | 639670c7dabc212513f25577c3a8b95087a7459d | [
"MIT"
] | 9 | 2018-07-06T02:19:31.000Z | 2019-08-02T15:21:43.000Z | # --------------------------------------------------------
# Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_fun... | 36.465116 | 101 | 0.702806 |
795f994a7241eb2afdecfb67ea997789ce715ad0 | 4,589 | py | Python | liboh/plugins/js/scripts/unitTests/errorConditions/error.py | pathorn/sirikata | 5d366a822ef2fb57cd9f64cc4f6085c0a635fdfa | [
"BSD-3-Clause"
] | 1 | 2016-05-09T03:34:51.000Z | 2016-05-09T03:34:51.000Z | liboh/plugins/js/scripts/unitTests/errorConditions/error.py | pathorn/sirikata | 5d366a822ef2fb57cd9f64cc4f6085c0a635fdfa | [
"BSD-3-Clause"
] | null | null | null | liboh/plugins/js/scripts/unitTests/errorConditions/error.py | pathorn/sirikata | 5d366a822ef2fb57cd9f64cc4f6085c0a635fdfa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
'''
Returned when we call performErrorCheck on an Error object.
'''
class ErrorReturn:
def __init__(self, errorExists, errorMessage):
self.errorExists = errorExists;
self.errorMessage = errorMessage;
def getErrorExists(self):
return self.errorExists;
def getErrorM... | 29.416667 | 99 | 0.698627 |
795f9bff9e0e40eb8f3824fe77e744322e3c1365 | 32,910 | py | Python | chemprop/args.py | aivant/chemprop | 43ef898e8717f5ad9646cfccb99f6b6eb1a555ed | [
"MIT"
] | null | null | null | chemprop/args.py | aivant/chemprop | 43ef898e8717f5ad9646cfccb99f6b6eb1a555ed | [
"MIT"
] | null | null | null | chemprop/args.py | aivant/chemprop | 43ef898e8717f5ad9646cfccb99f6b6eb1a555ed | [
"MIT"
] | null | null | null | import json
import os
import pickle
from tempfile import TemporaryDirectory
from typing import List, Optional, Tuple
import torch
from tap import (
Tap,
) # pip install typed-argument-parser (https://github.com/swansonk14/typed-argument-parser)
from typing_extensions import Literal
import chemprop.data.utils
fro... | 37.871116 | 185 | 0.640778 |
795f9c9a36ce6c6e34cd99dde6bf07a6bae3ecf9 | 1,518 | py | Python | src/genie/libs/parser/junos/tests/ShowRouteAdvertisingProtocol/cli/equal/golden_output_2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/junos/tests/ShowRouteAdvertisingProtocol/cli/equal/golden_output_2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/junos/tests/ShowRouteAdvertisingProtocol/cli/equal/golden_output_2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"route-information": {
"route-table": {
"active-route-count": "10",
"destination-count": "10",
"hidden-route-count": "0",
"holddown-route-count": "0",
"rt": [
{
"rt-destination": "0.0.0.0/0",
... | 33.733333 | 61 | 0.279974 |
795f9d60fe81ea7e9ee17d36d0d81633d019db58 | 54,823 | py | Python | nikola/post.py | ChrisJefferson/nikola | 8cc31e0230a7209cc0bca558a9d085b2e179fe8c | [
"MIT"
] | null | null | null | nikola/post.py | ChrisJefferson/nikola | 8cc31e0230a7209cc0bca558a9d085b2e179fe8c | [
"MIT"
] | null | null | null | nikola/post.py | ChrisJefferson/nikola | 8cc31e0230a7209cc0bca558a9d085b2e179fe8c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2012-2021 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights t... | 42.139124 | 152 | 0.609325 |
795f9d766021f322a29f8ee30e41d441bab9ffcd | 95,227 | py | Python | petra_viewer/gui/icons_rc.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | petra_viewer/gui/icons_rc.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | petra_viewer/gui/icons_rc.py | yamedvedya/data_viewer | c6238b71edcf0178ebe8ab8f9bf6e56e41cd4916 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.11.3)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x01\x1e\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x... | 60.346641 | 129 | 0.725687 |
795f9f6e848a8faeee892d190495611dea5c8386 | 1,384 | py | Python | TiendaVirtual/store/migrations/0001_initial.py | edisonrosas/TECSUP-CPS-Lab03 | 0d36ea77eef94df37f1523fe7d1b51dd65fdbf41 | [
"MIT"
] | null | null | null | TiendaVirtual/store/migrations/0001_initial.py | edisonrosas/TECSUP-CPS-Lab03 | 0d36ea77eef94df37f1523fe7d1b51dd65fdbf41 | [
"MIT"
] | null | null | null | TiendaVirtual/store/migrations/0001_initial.py | edisonrosas/TECSUP-CPS-Lab03 | 0d36ea77eef94df37f1523fe7d1b51dd65fdbf41 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-10 06:17
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='product',
fields=[
('id', models.BigAutoFie... | 34.6 | 117 | 0.544798 |
795f9fa973956703ea322df96a19119523440cf2 | 1,725 | py | Python | tests/python/gaia-ui-tests/gaiatest/apps/ring_tone/app.py | marshall/gaia | 00722269f5d559595fd2f79d9dd70310758af08c | [
"Apache-2.0"
] | 1 | 2019-02-13T23:44:14.000Z | 2019-02-13T23:44:14.000Z | tests/python/gaia-ui-tests/gaiatest/apps/ring_tone/app.py | marshall/gaia | 00722269f5d559595fd2f79d9dd70310758af08c | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/apps/ring_tone/app.py | marshall/gaia | 00722269f5d559595fd2f79d9dd70310758af08c | [
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
try:
from marionette import Wait
from marionette.by import By
except:
from marionette_driver import Wait
... | 35.204082 | 95 | 0.694493 |
795fa066c23ccab9876bfb7da1fb087ea2a14dd6 | 14,342 | py | Python | tests/test_simulation/test_run/test_simulation_runner.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | tests/test_simulation/test_run/test_simulation_runner.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | tests/test_simulation/test_run/test_simulation_runner.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | import unittest
from itertools import product
from typing import List
from unittest import mock
from unittest.mock import MagicMock
from clovars.simulation import SimulationRunner
from clovars.utils import QuietPrinterMixin, SimulationError
class TestSimulationRunner(unittest.TestCase):
"""Class representing uni... | 53.118519 | 120 | 0.686445 |
795fa1f5ba51ec9bcd1952539cf7fcbd0a81baaa | 9,718 | py | Python | research/gan/progressive_gan/networks_test.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/gan/progressive_gan/networks_test.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/gan/progressive_gan/networks_test.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 39.028112 | 81 | 0.633978 |
795fa22d1f51d623727e41a431ba4e25cb61da2f | 12,277 | py | Python | PathPlanning/DynamicWindowApproach/dwa_3d.py | MHYNW/Dickhunter | dea7ab26854e0f3eb34af668b10e9c7474b87484 | [
"MIT"
] | null | null | null | PathPlanning/DynamicWindowApproach/dwa_3d.py | MHYNW/Dickhunter | dea7ab26854e0f3eb34af668b10e9c7474b87484 | [
"MIT"
] | null | null | null | PathPlanning/DynamicWindowApproach/dwa_3d.py | MHYNW/Dickhunter | dea7ab26854e0f3eb34af668b10e9c7474b87484 | [
"MIT"
] | 1 | 2021-08-23T01:35:57.000Z | 2021-08-23T01:35:57.000Z | # -*- coding: utf-8 -*-
"""
Mobile robot motion planning sample with Dynamic Window Approach
author: Atsushi Sakai (@Atsushi_twi), Göktuğ Karakaşlı
"""
import math
from enum import Enum
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
show_animation = True
def dwa_cont... | 32.651596 | 92 | 0.545736 |
795fa29654ca63a8af3e49c8607e125a985752b5 | 391 | py | Python | scripts/npc/talk_vasilituto.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 2 | 2020-04-15T03:16:07.000Z | 2020-08-12T23:28:32.000Z | scripts/npc/talk_vasilituto.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/npc/talk_vasilituto.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 3 | 2020-08-25T06:55:25.000Z | 2020-12-01T13:07:43.000Z | # Vasily (10305) | Maple Road : Port
if sm.hasQuestCompleted(32214):
if sm.sendAskYesNo("Thanks to you, we're ready to set sail to Lith Harbor"):
sm.warp(4000032, 0)
elif sm.hasQuest(32214):
if sm.sendAskYesNo("I'll let you on board. Go defeat the monsters rampaging my ship."):
sm.warp(4000033, ... | 39.1 | 91 | 0.680307 |
795fa2ab46f58c7819f5f7ba288f72ca11601df4 | 6,233 | py | Python | sudoku.py | Xorgon/SudokuSolver | 44ce1c8e37d7b559598d197ab29621089cadbb3e | [
"MIT"
] | null | null | null | sudoku.py | Xorgon/SudokuSolver | 44ce1c8e37d7b559598d197ab29621089cadbb3e | [
"MIT"
] | null | null | null | sudoku.py | Xorgon/SudokuSolver | 44ce1c8e37d7b559598d197ab29621089cadbb3e | [
"MIT"
] | null | null | null | import numpy as np
import math
sudoku = np.zeros([9, 9], dtype=list)
def deserialize_sudoku(serialized):
"""
a b c d e f g h i
j k l . . . . . .
. . . . . . . . .
would be from
abcdefghijkl...
"""
serialized = serialized.replace(",", "")
if len(serialized) != 9*9:
print(... | 27.579646 | 78 | 0.480507 |
795fa424771a5ee26615b5e58a5b5a9ed4dbf682 | 139,307 | py | Python | mne/viz/_brain/_brain.py | kimcoco/mne-python | df227e7a9f67f61cf1322686308a78627d2289f4 | [
"BSD-3-Clause"
] | null | null | null | mne/viz/_brain/_brain.py | kimcoco/mne-python | df227e7a9f67f61cf1322686308a78627d2289f4 | [
"BSD-3-Clause"
] | null | null | null | mne/viz/_brain/_brain.py | kimcoco/mne-python | df227e7a9f67f61cf1322686308a78627d2289f4 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Oleh Kozynets <ok7mailbox@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
# jona-sassenhagen <jona.sassenhagen@gmail.com>
# Joan Massich <mailsik@gmail.com>
#... | 39.961847 | 79 | 0.538659 |
795fa471e3dff93f0cc153a2062905bd9ccf52b9 | 3,724 | py | Python | official/nlp/tools/squad_evaluate_v1_1.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2022-02-14T08:47:00.000Z | 2022-02-14T08:47:00.000Z | official/nlp/tools/squad_evaluate_v1_1.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 8 | 2020-05-19T00:52:30.000Z | 2020-06-04T23:57:20.000Z | official/nlp/tools/squad_evaluate_v1_1.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 2 | 2021-10-07T04:47:04.000Z | 2021-12-18T04:18:19.000Z | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.803738 | 94 | 0.719656 |
795fa5144f791ce5c3932a97526bb96948c4077d | 285 | py | Python | app/user/urls.py | tomasz-zieba/recipe-app-api | 34749aa15dee40c3db332a0b8c0624127d82a939 | [
"MIT"
] | null | null | null | app/user/urls.py | tomasz-zieba/recipe-app-api | 34749aa15dee40c3db332a0b8c0624127d82a939 | [
"MIT"
] | null | null | null | app/user/urls.py | tomasz-zieba/recipe-app-api | 34749aa15dee40c3db332a0b8c0624127d82a939 | [
"MIT"
] | null | null | null | from django.urls import path
from user import views
app_name = 'user'
urlpatterns = [
path('create/', views.CreateUserView.as_view(), name='create'),
path('token/', views.CreateTokenView.as_view(), name='token'),
path('me/', views.ManageUserView.as_view(), name='me')
] | 25.909091 | 67 | 0.684211 |
795fa53e9a1c506aab0efbfbd35de375b196ac2c | 2,381 | py | Python | lhc/io/bed/iterator.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | lhc/io/bed/iterator.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | lhc/io/bed/iterator.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | from collections import namedtuple
from itertools import chain
from lhc.binf.genomic_coordinate import GenomicInterval as Interval
BedLine = namedtuple('BedLine', ('chr', 'start', 'stop', 'name', 'score', 'strand'))
BedEntry = namedtuple('BedEntry', ('ivl', 'name', 'score'))
class BedLineIterator(object):
def _... | 29.036585 | 84 | 0.543469 |
795fa59b17e3555ff1ec77b417f0558109fdb45c | 4,329 | py | Python | BCPNN/backend/_kernels/kernels_numpy.py | KTH-HPC/StreamBrain | 37b16e7c8e02e6d2800bcf89630a0f4419e90cd4 | [
"BSD-2-Clause"
] | 4 | 2020-10-20T22:15:25.000Z | 2022-02-10T10:25:24.000Z | BCPNN/backend/_kernels/kernels_numpy.py | KTH-HPC/StreamBrain | 37b16e7c8e02e6d2800bcf89630a0f4419e90cd4 | [
"BSD-2-Clause"
] | 1 | 2020-12-16T10:46:50.000Z | 2020-12-16T10:46:50.000Z | BCPNN/backend/_kernels/kernels_numpy.py | KTH-HPC/StreamBrain | 37b16e7c8e02e6d2800bcf89630a0f4419e90cd4 | [
"BSD-2-Clause"
] | 1 | 2020-10-20T22:15:29.000Z | 2020-10-20T22:15:29.000Z | import numpy as np
def update_state(state, weights, bias, inputs):
return np.matmul(inputs, weights) + bias
def add_bias(a, x):
# Assert shapes?
return a + x
def _softmax(x, axis):
t = np.exp(x - x.max(axis=axis, keepdims=True))
return t / np.sum(t, axis=axis, keepdims=True)
def softmax_mini... | 25.464706 | 87 | 0.507277 |
795fa5e26b2cf71c1d6eaa6b67fa016ba20b0d76 | 1,737 | py | Python | rev/sissyrev/solver.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | rev/sissyrev/solver.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | rev/sissyrev/solver.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | import sys
from binascii import *
def substitute(hexBlock):
#subtitusi digit hex
substitutedHexBlock = ""
substitution = [10, 13, 0, 8, 11, 7, 6, 12, 15, 14, 3, 4, 2, 1, 5, 9]
for hexDigit in hexBlock:
newDigit = substitution.index(int(hexDigit, 16))
substitutedHexBlock += hex(ne... | 32.166667 | 137 | 0.629246 |
795fa65628ee27e3bb9aa9675e1d011c3368ad49 | 850 | py | Python | extractor/sample_project/unsharpen.py | eddieir/Signure_extraction_detection | 1ae68946833abbf9f805826444891d43a1b1889f | [
"MIT"
] | 291 | 2018-11-27T05:06:38.000Z | 2022-03-25T08:45:50.000Z | sample_project/unsharpen.py | maky-hnou/signature_extractor | ca9b456df7bde9fbd55ab9fe6f882672da848dbf | [
"MIT"
] | 10 | 2019-04-30T16:01:44.000Z | 2021-12-18T02:57:24.000Z | sample_project/unsharpen.py | maky-hnou/signature_extractor | ca9b456df7bde9fbd55ab9fe6f882672da848dbf | [
"MIT"
] | 109 | 2018-11-18T03:40:14.000Z | 2022-03-04T08:56:03.000Z | #!/usr/bin/python
"""Soften an image."""
# -*- coding: utf-8 -*-
# -----------------------------------------
# author : Ahmet Ozlu
# mail : ahmetozlu93@gmail.com
# date : 05.05.2019
# -----------------------------------------
import cv2
def unsharpen_mask(image):
"""Soften an input image.
... | 25 | 78 | 0.561176 |
795fa74a08ec41b06ae41f169c5fce37eaf53c95 | 17,946 | py | Python | electrical_systems_model/core/model.py | kyleoliver22/electrical-systems-model | 41b0e4e14bb7733b6cba54212dc667095c8ff98b | [
"MIT"
] | null | null | null | electrical_systems_model/core/model.py | kyleoliver22/electrical-systems-model | 41b0e4e14bb7733b6cba54212dc667095c8ff98b | [
"MIT"
] | null | null | null | electrical_systems_model/core/model.py | kyleoliver22/electrical-systems-model | 41b0e4e14bb7733b6cba54212dc667095c8ff98b | [
"MIT"
] | null | null | null | import copy
import re
import treelib
from core.component import Component
from core.sink import ElectricalSink
from core.transmission import Cable, Panel
from helpers.input_utils import group_dictlist_by_key, import_csv_as_dictlist
from helpers.math_utils import taxicab_ship_distance
from helpers.tree_utils import ge... | 45.318182 | 146 | 0.601805 |
795fa93ee3eeacaede78535a2ddd2ee2bc0345a9 | 4,043 | py | Python | examples/campaign_management/get_campaigns_by_label.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | examples/campaign_management/get_campaigns_by_label.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | null | null | null | examples/campaign_management/get_campaigns_by_label.py | andy0937/google-ads-python | cb5da7f4a75076828d1fc3524b08cc167670435a | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | #!/usr/bin/env python
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 38.141509 | 80 | 0.664111 |
795fa9f700f7d09e4e9dc5bcac8964d4f363c757 | 103 | py | Python | config.py | SousaPedro11/webmel | 6d9d916bfc4eeb3d2aeb242c3c29a0fb6d6ddd61 | [
"MIT"
] | null | null | null | config.py | SousaPedro11/webmel | 6d9d916bfc4eeb3d2aeb242c3c29a0fb6d6ddd61 | [
"MIT"
] | null | null | null | config.py | SousaPedro11/webmel | 6d9d916bfc4eeb3d2aeb242c3c29a0fb6d6ddd61 | [
"MIT"
] | null | null | null | import os
class Config:
THREADED = True
SECRET_KEY = os.getenv('SECRET_KEY', os.urandom(16))
| 14.714286 | 56 | 0.679612 |
795faa3148ca10e455a3e28b578eda3422e746a8 | 2,247 | py | Python | devspace/commands/render.py | d12y12/DevSpace | 01956fdfabe21b3e389bbac86603bca453fa778d | [
"MIT"
] | null | null | null | devspace/commands/render.py | d12y12/DevSpace | 01956fdfabe21b3e389bbac86603bca453fa778d | [
"MIT"
] | null | null | null | devspace/commands/render.py | d12y12/DevSpace | 01956fdfabe21b3e389bbac86603bca453fa778d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import devspace
from devspace.commands import DevSpaceCommand
from devspace.exceptions import UsageError
from devspace.utils.misc import walk_modules
from devspace.servers import DevSpaceServer
import inspect
def _get_server_from_module(module_name, server_nam... | 31.647887 | 88 | 0.613707 |
795fab88af5a1324d6d72b41b8bd534896700ced | 9,137 | py | Python | grr/server/grr_response_server/foreman_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2021-07-01T01:43:06.000Z | 2021-07-01T01:43:06.000Z | grr/server/grr_response_server/foreman_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 44 | 2021-05-14T22:49:24.000Z | 2022-03-13T21:54:02.000Z | grr/server/grr_response_server/foreman_test.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Lint as: python3
"""Tests for the GRR Foreman."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
from grr_response_core.lib import rdfvalue
from grr_response_core.lib import utils
from grr_response_server impo... | 39.214592 | 79 | 0.68644 |
795fac5450dd4125b6127b64c5968c459857a82f | 635 | py | Python | mmrotate/models/detectors/rotated_reppoints.py | liuyanyi/mmrotate | d80310aa2c4a67c877c62432cddee246d2a4dbcd | [
"Apache-2.0"
] | 449 | 2022-02-18T08:26:58.000Z | 2022-03-31T11:58:32.000Z | mmrotate/models/detectors/rotated_reppoints.py | liuyanyi/mmrotate | d80310aa2c4a67c877c62432cddee246d2a4dbcd | [
"Apache-2.0"
] | 162 | 2022-02-18T09:54:46.000Z | 2022-03-31T15:40:46.000Z | mmrotate/models/detectors/rotated_reppoints.py | liuyanyi/mmrotate | d80310aa2c4a67c877c62432cddee246d2a4dbcd | [
"Apache-2.0"
] | 98 | 2022-02-18T08:28:48.000Z | 2022-03-31T08:52:11.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from ..builder import ROTATED_DETECTORS
from .single_stage import RotatedSingleStageDetector
@ROTATED_DETECTORS.register_module()
class RotatedRepPoints(RotatedSingleStageDetector):
"""Implementation of Rotated RepPoints."""
def __init__(self,
... | 33.421053 | 79 | 0.606299 |
795fac6e7e534b816d562d29d5d2c02aa9d23c27 | 1,889 | py | Python | plugins/servicenow/icon_servicenow/connection/connection.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/servicenow/icon_servicenow/connection/connection.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/servicenow/icon_servicenow/connection/connection.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import insightconnect_plugin_runtime
from .schema import ConnectionSchema, Input
# Custom imports below
import requests
from requests.auth import HTTPBasicAuth
from icon_servicenow.util.request_helper import RequestHelper
from insightconnect_plugin_runtime.exceptions import ConnectionTestException
class Connection(i... | 35.641509 | 111 | 0.663314 |
795facdaa741f732208fd4d4ccb230db4b2c4d8b | 2,643 | py | Python | analysis/dimensionalty_sim/make_spatial_random_model.py | htem/cb2_project_analysis | a677cbadc7e3bf0074975a94ed1d06b4801899c0 | [
"MIT"
] | null | null | null | analysis/dimensionalty_sim/make_spatial_random_model.py | htem/cb2_project_analysis | a677cbadc7e3bf0074975a94ed1d06b4801899c0 | [
"MIT"
] | null | null | null | analysis/dimensionalty_sim/make_spatial_random_model.py | htem/cb2_project_analysis | a677cbadc7e3bf0074975a94ed1d06b4801899c0 | [
"MIT"
] | null | null | null | import random
import copy
import logging
import sys
import compress_pickle
import argparse
import time
import numpy as np
# from run_tests_201204 import *
from run_tests_201210 import *
from spatial_model2 import SpatialModel
from global_random_model import GlobalRandomModel
from neurons import GranuleCell, MossyFiber... | 31.843373 | 171 | 0.738555 |
795fae429a395d7bc870bd693c86d6c22ef6d80e | 19,694 | py | Python | var/spack/repos/builtin/packages/gromacs/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-06-28T02:20:15.000Z | 2021-06-28T02:20:15.000Z | var/spack/repos/builtin/packages/gromacs/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 18 | 2021-03-12T16:22:58.000Z | 2022-03-02T17:07:08.000Z | var/spack/repos/builtin/packages/gromacs/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-06-28T04:48:37.000Z | 2021-06-28T04:48:37.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)
import os
class Gromacs(CMakePackage):
"""GROMACS (GROningen MAchine for Chemical Simulations) is a molecular
dy... | 49.235 | 101 | 0.623591 |
795fae6c86588f63bcac26ad3c095b54c4a7f83a | 4,721 | py | Python | application/classes/abstract_credentials.py | google/report2bq | 46721cdb9a87c207e410a1d900be814c178b050b | [
"Apache-2.0"
] | 9 | 2020-04-09T22:58:34.000Z | 2021-10-11T17:10:10.000Z | application/classes/abstract_credentials.py | google/report2bq | 46721cdb9a87c207e410a1d900be814c178b050b | [
"Apache-2.0"
] | 1 | 2020-07-24T08:27:28.000Z | 2020-07-24T08:27:28.000Z | application/classes/abstract_credentials.py | google/report2bq | 46721cdb9a87c207e410a1d900be814c178b050b | [
"Apache-2.0"
] | 4 | 2020-04-14T22:50:29.000Z | 2021-06-27T16:58:09.000Z | # Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.558621 | 80 | 0.707477 |
795faee6081de5409042fb01f4a48e4d79bcc6ea | 2,072 | py | Python | modules/cam.py | maxupravitelev/smart-mirror-toolkit | 4eea7eab8be0c325efdfd03f5c2f27d1d33657aa | [
"MIT"
] | null | null | null | modules/cam.py | maxupravitelev/smart-mirror-toolkit | 4eea7eab8be0c325efdfd03f5c2f27d1d33657aa | [
"MIT"
] | null | null | null | modules/cam.py | maxupravitelev/smart-mirror-toolkit | 4eea7eab8be0c325efdfd03f5c2f27d1d33657aa | [
"MIT"
] | null | null | null | # built upon: https://github.com/jrosebr1/imutils/blob/master/imutils/video/pivideostream.py
from threading import Thread
import cv2
import json
import time
# function to parse bool value from config file
from utils.boolcheck import boolcheck
class VideoStream:
def __init__(self, src=0, name="VideoStream"):
... | 29.6 | 92 | 0.597973 |
795faf507b1642c8588364a8fb60346c251933cd | 64 | py | Python | ctt/__init__.py | dpjrodrigues/home-assistant-custom-components | 105feec36ea065e62e839b5137a9ee2e2dcf3513 | [
"MIT"
] | null | null | null | ctt/__init__.py | dpjrodrigues/home-assistant-custom-components | 105feec36ea065e62e839b5137a9ee2e2dcf3513 | [
"MIT"
] | null | null | null | ctt/__init__.py | dpjrodrigues/home-assistant-custom-components | 105feec36ea065e62e839b5137a9ee2e2dcf3513 | [
"MIT"
] | 5 | 2018-12-29T16:39:25.000Z | 2019-12-21T22:29:22.000Z | REQUIREMENTS = ['pyCTT==1.0.1']
DEPENDENCIES = ['input_text']
| 21.333333 | 32 | 0.65625 |
795fafd394e90d81d98237ffe1679311a21dac2d | 3,381 | py | Python | test/functional/test_framework/coverage.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 30.736364 | 87 | 0.661934 |
795fb03fdb339895bff7960397ed6342d7a0cae9 | 605 | py | Python | examples/text_summarization/pointer_summarizer/config.py | JeremyZhao1998/PaddleNLP | 5a34684a7f0c8a186043fed386be4b62cb85fb15 | [
"Apache-2.0"
] | 7,091 | 2021-02-05T13:56:25.000Z | 2022-03-31T11:42:50.000Z | examples/text_summarization/pointer_summarizer/config.py | xihuanafeng/PaddleNLP | 14c3209118b2cadcce9a8f66b760c9cddb3a02ad | [
"Apache-2.0"
] | 844 | 2021-02-10T01:09:29.000Z | 2022-03-31T12:12:58.000Z | examples/text_summarization/pointer_summarizer/config.py | xihuanafeng/PaddleNLP | 14c3209118b2cadcce9a8f66b760c9cddb3a02ad | [
"Apache-2.0"
] | 1,035 | 2021-02-05T14:26:48.000Z | 2022-03-31T11:42:57.000Z | # Data directories
train_data_path = "./finished_files/chunked/train_*.json"
eval_data_path = "./finished_files/val.json"
decode_data_path = "./finished_files/test.json"
vocab_path = "./finished_files/vocab"
log_root = "./log"
# Hyperparameters
hidden_dim = 256
emb_dim = 128
batch_size = 8
max_enc_steps = 400
max_dec_... | 18.90625 | 57 | 0.760331 |
795fb078769dcdc62646d012d23e62058d421593 | 884 | py | Python | src/local_player.py | winsbe01/nq | d1c405509014fdc393f77e6b7fac33b5365d3c95 | [
"MIT"
] | null | null | null | src/local_player.py | winsbe01/nq | d1c405509014fdc393f77e6b7fac33b5365d3c95 | [
"MIT"
] | 12 | 2020-07-19T01:32:07.000Z | 2020-07-26T21:55:00.000Z | src/local_player.py | winsbe01/nq | d1c405509014fdc393f77e6b7fac33b5365d3c95 | [
"MIT"
] | null | null | null | from mpg123 import Mpg123, Out123
import logging
from player import Player
nqlog = logging.getLogger("nq")
class LocalPlayer(Player):
def __init__(self, loc):
super().__init__(loc)
self.setup_mp3()
def setup_mp3(self):
self.mp3 = Mpg123(self.loc)
self.mpgout = Out123()
self.frames = self.mp3.iter_frame... | 22.1 | 55 | 0.68552 |
795fb0eb4045d1d06c94cedc2bc69539cf061307 | 1,263 | py | Python | ceilometer/tests/ipmi/test_manager.py | vmturbo/ceilometer | f856d3c915b738a64bce14967ba8114fe923c1af | [
"Apache-2.0"
] | 2 | 2015-09-07T09:15:26.000Z | 2015-09-30T02:13:23.000Z | ceilometer/tests/ipmi/test_manager.py | vmturbo/ceilometer | f856d3c915b738a64bce14967ba8114fe923c1af | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/ipmi/test_manager.py | vmturbo/ceilometer | f856d3c915b738a64bce14967ba8114fe923c1af | [
"Apache-2.0"
] | 1 | 2019-09-16T02:11:41.000Z | 2019-09-16T02:11:41.000Z | # Copyright 2014 Intel Corp.
#
# Author: Zhai Edwin <edwin.zhai@intel.com>
#
# 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 requi... | 29.372093 | 75 | 0.742676 |
795fb1a9cfb00db55b9456f2e2685f237a10719c | 4,908 | py | Python | preprocessing/gen_negative_sampling.py | IgoRamli/IndoKEPLER | 79bd9c2784c0e336b718e0a151593ab3305b3a4c | [
"MIT"
] | null | null | null | preprocessing/gen_negative_sampling.py | IgoRamli/IndoKEPLER | 79bd9c2784c0e336b718e0a151593ab3305b3a4c | [
"MIT"
] | null | null | null | preprocessing/gen_negative_sampling.py | IgoRamli/IndoKEPLER | 79bd9c2784c0e336b718e0a151593ab3305b3a4c | [
"MIT"
] | null | null | null | import numpy as np
import math
import gc
import os
from argparse import ArgumentParser
from datasets import load_from_disk, load_dataset
from tqdm import tqdm
from pathlib import Path
parser = ArgumentParser(description='Generate negative sampling')
parser.add_argument('entity_dir', help='Path to directory containing... | 38.046512 | 114 | 0.662388 |
795fb260f978cedbb43c934124d5b0107b641791 | 1,442 | py | Python | Algorithms_easy/0235. Lowest Common Ancestor of a Binary Search Tree.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | 4 | 2020-08-11T20:45:15.000Z | 2021-03-12T00:33:34.000Z | Algorithms_easy/0235. Lowest Common Ancestor of a Binary Search Tree.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | Algorithms_easy/0235. Lowest Common Ancestor of a Binary Search Tree.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | """
235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q ... | 30.680851 | 229 | 0.651179 |
795fb3478b11e4ff055ac15a7b23c60237fd1892 | 389 | py | Python | floreal/migrations/0019_auto_20200421_1056.py | Francois133/caracole | 6853fee162643871b0b16a1752c11d9bbe89aaca | [
"MIT"
] | 6 | 2017-04-26T10:29:36.000Z | 2022-03-22T20:35:23.000Z | floreal/migrations/0019_auto_20200421_1056.py | Francois133/caracole | 6853fee162643871b0b16a1752c11d9bbe89aaca | [
"MIT"
] | 12 | 2018-07-23T22:32:39.000Z | 2021-12-02T15:37:48.000Z | floreal/migrations/0019_auto_20200421_1056.py | frchalaoux/caracole | 6853fee162643871b0b16a1752c11d9bbe89aaca | [
"MIT"
] | 7 | 2015-01-05T22:07:42.000Z | 2020-03-20T10:41:18.000Z | # Generated by Django 3.0.4 on 2020-04-21 08:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('floreal', '0018_remove_product_image'),
]
operations = [
migrations.AlterField(
model_name='subgroup',
name='name',
... | 20.473684 | 51 | 0.601542 |
795fb46c9c2b8e8d2fd6af24646e160606596609 | 1,242 | py | Python | stubs.min/System/__init___parts/InvalidProgramException.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/__init___parts/InvalidProgramException.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/__init___parts/InvalidProgramException.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class InvalidProgramException(SystemException,ISerializable,_Exception):
"""
The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.
InvalidProgramException()
InvalidProgramE... | 41.4 | 215 | 0.746377 |
795fb495e25b82be1f6829ca9eb2e0ac31637cf0 | 4,686 | py | Python | markov.py | DmytroZinkevych/Markov-algorithm-interpreter | 7fb57cd192a85cc87723b12a1af5231aa654b1ba | [
"MIT"
] | null | null | null | markov.py | DmytroZinkevych/Markov-algorithm-interpreter | 7fb57cd192a85cc87723b12a1af5231aa654b1ba | [
"MIT"
] | null | null | null | markov.py | DmytroZinkevych/Markov-algorithm-interpreter | 7fb57cd192a85cc87723b12a1af5231aa654b1ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def make_command (s):
if s=='>end':
return s
else:
if s.find("->") != -1:
i = s.find("->")
return (s[0:i], "->", s[i+2:])
elif s.find("=>") != -1:
i = s.find("=>")
return (s[0:i], "=>", s[i+2:])
... | 35.233083 | 159 | 0.404609 |
795fb59dff8ac06444b98bbb8f5a268fc650ea49 | 69 | py | Python | testfarhan/farhantest.py | attfarhan/testfarhan | 88cf6c05dc18248c1ac0206ecda97b3d1b9aee26 | [
"MIT"
] | null | null | null | testfarhan/farhantest.py | attfarhan/testfarhan | 88cf6c05dc18248c1ac0206ecda97b3d1b9aee26 | [
"MIT"
] | null | null | null | testfarhan/farhantest.py | attfarhan/testfarhan | 88cf6c05dc18248c1ac0206ecda97b3d1b9aee26 | [
"MIT"
] | null | null | null | def testfunc():
"""
this is version 0.6
"""
return 1
| 11.5 | 23 | 0.478261 |
795fb5a7c62f20a6f9b60e512e730e7e09c3010d | 824 | py | Python | setup.py | mfixstsci/jwst_backgrounds | 59cc118186d235037b94e0f6d5f02f13e86568d5 | [
"BSD-3-Clause"
] | 4 | 2019-12-09T18:36:48.000Z | 2022-03-10T06:47:01.000Z | setup.py | mfixstsci/jwst_backgrounds | 59cc118186d235037b94e0f6d5f02f13e86568d5 | [
"BSD-3-Clause"
] | 16 | 2017-12-12T21:40:21.000Z | 2021-09-21T20:37:37.000Z | setup.py | mfixstsci/jwst_backgrounds | 59cc118186d235037b94e0f6d5f02f13e86568d5 | [
"BSD-3-Clause"
] | 5 | 2017-12-12T21:49:11.000Z | 2020-01-24T19:46:51.000Z | from setuptools import setup
from jwst_backgrounds.version import __version__
setup(name='jwst_backgrounds',
version=__version__,
description='Retrieve and plot JWST background information',
author='Jane Rigby (GSFC) and Klaus Pontoppidan (STScI)',
author_email='Jane.Rigby@nasa.gov',
url... | 37.454545 | 93 | 0.623786 |
795fb7fe23dbdeac369514036f08e0e78987da7c | 1,290 | py | Python | logdevice/ops/ldops/types/node.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 1,831 | 2018-09-12T15:41:52.000Z | 2022-01-05T02:38:03.000Z | logdevice/ops/ldops/types/node.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 183 | 2018-09-12T16:14:59.000Z | 2021-12-07T15:49:43.000Z | logdevice/ops/ldops/types/node.py | YangKian/LogDevice | e5c2168c11e9de867a1bcf519f95016e1c879b5c | [
"BSD-3-Clause"
] | 228 | 2018-09-12T15:41:51.000Z | 2022-01-05T08:12:09.000Z | #!/usr/bin/env python3
# pyre-strict
# 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 dataclasses import dataclass
from typing import Optional
from ldops.... | 27.446809 | 75 | 0.656589 |
795fb878f6b07ea413183ad8eb23edb031147f2b | 45,600 | py | Python | SLpackage/private/pacbio/pythonpkgs/pbcore/lib/python2.7/site-packages/pbcore/io/align/CmpH5IO.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 5 | 2022-02-20T07:10:02.000Z | 2022-03-18T17:47:53.000Z | SLpackage/private/pacbio/pythonpkgs/pbcore/lib/python2.7/site-packages/pbcore/io/align/CmpH5IO.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | SLpackage/private/pacbio/pythonpkgs/pbcore/lib/python2.7/site-packages/pbcore/io/align/CmpH5IO.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | # Author: David Alexander
from __future__ import absolute_import
from __future__ import division
__all__ = [ "CmpH5Reader",
"CmpH5Alignment",
"EmptyCmpH5Error" ]
try:
import h5py
except ImportError:
from pbcore.util import h5py_dummy
h5py = h5py_dummy()
import numpy as np
import ... | 35.486381 | 97 | 0.572566 |
795fb9484e9bb3cac231f0bec2f4514b1f62aec0 | 4,453 | py | Python | examples/seven-day-baseline.py | LBNL-ETA/loadshape | 53155824d020ab8131f66c37e8284a9dd5b270d3 | [
"BSD-3-Clause-LBNL"
] | 16 | 2015-12-21T03:38:56.000Z | 2020-10-12T17:42:38.000Z | examples/seven-day-baseline.py | wuyou33/loadshape | 53155824d020ab8131f66c37e8284a9dd5b270d3 | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-03-12T10:19:11.000Z | 2021-03-27T19:44:40.000Z | examples/seven-day-baseline.py | wuyou33/loadshape | 53155824d020ab8131f66c37e8284a9dd5b270d3 | [
"BSD-3-Clause-LBNL"
] | 11 | 2015-11-12T23:53:02.000Z | 2021-11-16T15:30:20.000Z | # --------------------------------------------------
# Building Energy Baseline Analysis Package
#
# Copyright (c) 2013, The Regents of the University of California, Department
# of Energy contract-operators of the Lawrence Berkeley National Laboratory.
# All rights reserved.
#
# The Regents of the University of Calif... | 47.88172 | 84 | 0.681563 |
795fb94aab756e8638ab8244a09661d9225ffe8b | 2,623 | py | Python | thor_tests/test_image_overlays.py | warmtub/thor-iqa-cvpr-2018 | c007f170a7f8583306c2256a269ffd4e746785f5 | [
"Apache-2.0"
] | 113 | 2018-06-12T23:06:03.000Z | 2022-01-27T18:22:23.000Z | thor_tests/test_image_overlays.py | huizh1/thor-iqa-cvpr-2018 | 38358569422a93fa42a782f3022554672507a08a | [
"Apache-2.0"
] | 6 | 2018-07-10T13:44:59.000Z | 2022-01-21T10:47:59.000Z | thor_tests/test_image_overlays.py | huizh1/thor-iqa-cvpr-2018 | 38358569422a93fa42a782f3022554672507a08a | [
"Apache-2.0"
] | 29 | 2018-06-13T22:58:53.000Z | 2021-02-25T21:40:51.000Z | import os
import numpy as np
import scipy.misc
from utils import game_util
def assert_image(expected_image, actual_image, raise_if_fail=True):
try:
assert(np.all(expected_image == actual_image))
except AssertionError as e:
print('Failed image comparison')
import cv2
diff = (expe... | 35.445946 | 123 | 0.598933 |
795fba34815b58961cbb2b7863e845a06c7d1131 | 4,441 | py | Python | collection.py | lanhin/deckAdvisor | 0c9c6c3658a4ff30c16db9cd0b3d9d50364b320b | [
"MIT"
] | 1 | 2017-07-20T05:44:55.000Z | 2017-07-20T05:44:55.000Z | collection.py | lanhin/deckAdvisor | 0c9c6c3658a4ff30c16db9cd0b3d9d50364b320b | [
"MIT"
] | null | null | null | collection.py | lanhin/deckAdvisor | 0c9c6c3658a4ff30c16db9cd0b3d9d50364b320b | [
"MIT"
] | null | null | null | '''
@2017-07 by lanhin
'''
from hearthstone.deckstrings import Deck
# TODO: handle exceptions
class Collection:
"""The card collection class
To record all the card one have
"""
def __init__(self):
"""Constructor
All the member vars are listed
"""
self.collect_db = {} ... | 33.900763 | 104 | 0.567665 |
795fba3b8c819ca474d04b4f58b5a47806c95ae5 | 247 | py | Python | tools/project_gen/project_gen/celery.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | null | null | null | tools/project_gen/project_gen/celery.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | 8 | 2021-10-13T02:33:23.000Z | 2022-03-29T21:01:08.000Z | tools/project_gen/project_gen/celery.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | null | null | null | from celery import Celery
app = Celery(
"service",
backend="redis://localhost",
broker="redis://localhost",
include=["project_gen.tasks"],
)
app.conf.update(
result_expires=3600,
)
if __name__ == "__main__":
app.start()
| 15.4375 | 34 | 0.643725 |
795fbaafd9381c736856b70d84aa05c0327553e8 | 3,464 | py | Python | Class1/07-00 Simple_test_on_Keras/Traffic_sign_Classifier_On_Keras.py | vvchenvv/Self_Driving_Tutorial | 649fddeb1371aa2a02ed49e5dbb8204119b0a3c1 | [
"MIT"
] | 7 | 2018-12-27T11:06:21.000Z | 2021-09-16T03:07:20.000Z | Class1/07-00 Simple_test_on_Keras/Traffic_sign_Classifier_On_Keras.py | vvchenvv/Self_Driving_Tutorial | 649fddeb1371aa2a02ed49e5dbb8204119b0a3c1 | [
"MIT"
] | null | null | null | Class1/07-00 Simple_test_on_Keras/Traffic_sign_Classifier_On_Keras.py | vvchenvv/Self_Driving_Tutorial | 649fddeb1371aa2a02ed49e5dbb8204119b0a3c1 | [
"MIT"
] | 8 | 2019-02-22T22:20:56.000Z | 2021-12-16T06:04:45.000Z | # Load pickled data
import pickle
import numpy as np
import tensorflow as tf
tf.python.control_flow_ops = tf
#from generator import generator
# WAITING FOR CODE PACKAGE TO SYNC UP
with open('train.p', mode='rb') as f:
data = pickle.load(f)
X_train, y_train = data['features'], data['labels']
# Initial Setup for K... | 37.652174 | 151 | 0.702367 |
795fbbf100b229c9bd944a47beddfb263ce3dc87 | 10,412 | py | Python | config.py | ahsi/Multilingual_Event_Extraction | eed002e864e16dc06c2b2970267b1465adcf825c | [
"MIT"
] | 34 | 2017-11-28T12:23:00.000Z | 2022-01-19T16:10:52.000Z | config.py | ahsi/Multilingual_Event_Extraction | eed002e864e16dc06c2b2970267b1465adcf825c | [
"MIT"
] | 3 | 2018-12-24T09:53:45.000Z | 2019-11-19T03:26:41.000Z | config.py | ahsi/Multilingual_Event_Extraction | eed002e864e16dc06c2b2970267b1465adcf825c | [
"MIT"
] | 9 | 2018-01-16T03:37:17.000Z | 2021-11-05T21:18:07.000Z | # script to adjust the filepaths as needed
import sys
def parseConfigFile(filename):
input = open(filename, "r")
embeddingPath = ""
corenlpPath = ""
parserPath = ""
nerPath = ""
for line in input:
if line.startswith("WORD_EMBEDDING_DIR"):
embeddingPath = line.strip().split("=")[1]
elif line.startswith("C... | 31.173653 | 135 | 0.64224 |
795fbc88f025fc16142edfd7976c9f3d97a7780b | 159 | py | Python | 2018-2S/manha/aula6/outra_soma.py | WillianSagas/teste | 36208bf4a6ed3d4e07ce1e5bd8d0b77dfbd9bf38 | [
"MIT"
] | 2 | 2018-10-22T14:55:35.000Z | 2018-10-30T15:26:32.000Z | 2018-2S/manha/aula6/outra_soma.py | WillianSagas/teste | 36208bf4a6ed3d4e07ce1e5bd8d0b77dfbd9bf38 | [
"MIT"
] | null | null | null | 2018-2S/manha/aula6/outra_soma.py | WillianSagas/teste | 36208bf4a6ed3d4e07ce1e5bd8d0b77dfbd9bf38 | [
"MIT"
] | 1 | 2018-11-10T13:42:56.000Z | 2018-11-10T13:42:56.000Z | n = int(input("Digite um numero"))
contador = 1
soma = 0
while contador <= n:
soma = soma + contador
contador = contador + 1
print ("Soma :", soma) | 22.714286 | 34 | 0.610063 |
795fbcbf75c7909741e97f7490c9387e16313ed7 | 3,540 | py | Python | spr/modules/blacklist.py | ElricZ/SpamProtectionRobot | 711df7f0463a7321701edb495f139ca4c5197d06 | [
"MIT"
] | null | null | null | spr/modules/blacklist.py | ElricZ/SpamProtectionRobot | 711df7f0463a7321701edb495f139ca4c5197d06 | [
"MIT"
] | null | null | null | spr/modules/blacklist.py | ElricZ/SpamProtectionRobot | 711df7f0463a7321701edb495f139ca4c5197d06 | [
"MIT"
] | null | null | null | from pyrogram import filters
from pyrogram.types import Message
from spr import SPAM_LOG_CHANNEL, SUDOERS, spr
from spr.modules.info import get_info
from spr.utils.db import (add_chat, add_user, blacklist_chat,
blacklist_user, chat_exists,
is_chat_blacklisted, is_use... | 31.891892 | 70 | 0.623164 |
795fbd28605b5f9917563771e82bd4c696d6b7f6 | 17,381 | py | Python | imagenet/.ipynb_checkpoints/main-checkpoint.py | minhhn2910/conga2022 | 81ad2fb9c0055c332f8f305b2ea409b6577003f4 | [
"MIT"
] | null | null | null | imagenet/.ipynb_checkpoints/main-checkpoint.py | minhhn2910/conga2022 | 81ad2fb9c0055c332f8f305b2ea409b6577003f4 | [
"MIT"
] | null | null | null | imagenet/.ipynb_checkpoints/main-checkpoint.py | minhhn2910/conga2022 | 81ad2fb9c0055c332f8f305b2ea409b6577003f4 | [
"MIT"
] | null | null | null | import argparse
import os
import random
import shutil
import time
import warnings
from enum import Enum
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import ... | 38.2 | 91 | 0.605028 |
795fbfb269483f91b914bae8c7b22f03538c4237 | 911 | py | Python | SWE/hp/migrations/0009_auto_20200421_1804.py | anmolharsh/SWE_no_deco | 84f920265d2ce5733f188d2a37d04dcfdadab778 | [
"MIT"
] | null | null | null | SWE/hp/migrations/0009_auto_20200421_1804.py | anmolharsh/SWE_no_deco | 84f920265d2ce5733f188d2a37d04dcfdadab778 | [
"MIT"
] | null | null | null | SWE/hp/migrations/0009_auto_20200421_1804.py | anmolharsh/SWE_no_deco | 84f920265d2ce5733f188d2a37d04dcfdadab778 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-21 18:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hp', '0008_complaint_complaint_status'),
]
operations = [
migrations.RemoveField(
model_name='visitor',
name='dateti... | 27.606061 | 138 | 0.572997 |
795fc08f604ee657453ee1405a83b19a75426c49 | 49,720 | py | Python | lookerapi/apis/homepage_api.py | llooker/python_sdk | 8364839b1de0519771f2f749e45b4e6cb1c75577 | [
"MIT"
] | 12 | 2019-05-17T11:50:45.000Z | 2021-11-11T21:37:05.000Z | lookerapi/apis/homepage_api.py | meetup/lookerapi | 4e4160dbe007eb65ac8f449bead0cdc06090b07b | [
"MIT"
] | 4 | 2019-06-19T20:13:14.000Z | 2020-10-13T21:13:47.000Z | lookerapi/apis/homepage_api.py | meetup/lookerapi | 4e4160dbe007eb65ac8f449bead0cdc06090b07b | [
"MIT"
] | 10 | 2018-10-10T20:45:00.000Z | 2022-02-21T03:12:58.000Z | # coding: utf-8
"""
Looker API 3.0 Reference
### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token.... | 43.234783 | 1,625 | 0.580149 |
795fc0ead51014ac3ded6b3f848f2900036d5b70 | 21,306 | py | Python | astropy/utils/iers/tests/test_leap_second.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | 1 | 2019-03-11T12:26:49.000Z | 2019-03-11T12:26:49.000Z | astropy/utils/iers/tests/test_leap_second.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T18:54:27.000Z | 2019-10-09T18:54:27.000Z | astropy/utils/iers/tests/test_leap_second.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import urllib.request
import os
import locale
import platform
import pytest
import numpy as np
from numpy.testing import assert_array_equal
import erfa
from astropy.time import Time, TimeDelta
from astropy.utils.iers import iers
from astropy.utils.data i... | 43.042424 | 90 | 0.648597 |
795fc1a57fb196a837341c3235630edf39dfbc90 | 29,341 | py | Python | djangosaml2/views.py | ProbstDJakob/djangosaml2 | 755acfebd7d954c276c48bca16feaf4baca65b8c | [
"Apache-2.0"
] | null | null | null | djangosaml2/views.py | ProbstDJakob/djangosaml2 | 755acfebd7d954c276c48bca16feaf4baca65b8c | [
"Apache-2.0"
] | null | null | null | djangosaml2/views.py | ProbstDJakob/djangosaml2 | 755acfebd7d954c276c48bca16feaf4baca65b8c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2010-2013 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# 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
#
# ... | 45.001534 | 121 | 0.635323 |
795fc30008a8d0a582d19019fa7a3ecca161d7c5 | 969 | py | Python | tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_args__F_no_filtering__S_ls__1-3.3_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null | tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_args__F_no_filtering__S_ls__1-3.3_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | 1 | 2022-01-31T22:22:55.000Z | 2022-01-31T22:22:55.000Z | tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_args__F_no_filtering__S_ls__1-3.3_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null |
'''
Command line args
no filtering
sink: run ls in a dir
'''
'''
Created by Paul E. Black and William Mentzer 2020
This software was developed at the National Institute of Standards and Technology
by employees of the Federal Government in the course of their official duties.
Pursuant to title 17 Section 105 of the Un... | 20.617021 | 81 | 0.653251 |
795fc3cfb8a5190d11446926cf86bd92a62e9d72 | 555 | py | Python | lwr/tools/__init__.py | jmchilton/lwr | cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b | [
"Apache-2.0"
] | 1 | 2016-08-17T06:36:03.000Z | 2016-08-17T06:36:03.000Z | lwr/tools/__init__.py | jmchilton/lwr | cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b | [
"Apache-2.0"
] | null | null | null | lwr/tools/__init__.py | jmchilton/lwr | cd1e51b0b9b1a9fa01b92b0026e7b535d954e03b | [
"Apache-2.0"
] | null | null | null | """
Tools
:mod:`lwr.tools.toolbox` Module
-------------------------------
.. automodule:: lwr.tools.toolbox
:members:
:undoc-members:
:show-inheritance:
:mod:`lwr.tools.authorization` Module
--------------------------------
.. automodule:: lwr.tools.authorization
:members:
:undoc-members:
:... | 16.818182 | 39 | 0.554955 |
795fc440585cbb719e27a35d17f0864e7646e3b3 | 3,153 | py | Python | examples/rllib_agent.py | HONGcalmJIN/SMARTS | 0e2249a3bc985ee9279512d6154ce32732065835 | [
"MIT"
] | null | null | null | examples/rllib_agent.py | HONGcalmJIN/SMARTS | 0e2249a3bc985ee9279512d6154ce32732065835 | [
"MIT"
] | null | null | null | examples/rllib_agent.py | HONGcalmJIN/SMARTS | 0e2249a3bc985ee9279512d6154ce32732065835 | [
"MIT"
] | 1 | 2022-03-31T02:14:09.000Z | 2022-03-31T02:14:09.000Z | from pathlib import Path
import gym
import numpy as np
from ray.rllib.models import ModelCatalog
from ray.rllib.models.tf.fcnet_v2 import FullyConnectedNetwork
from ray.rllib.utils import try_import_tf
from smarts.core.agent_interface import AgentInterface, AgentType
from smarts.core.agent import AgentSpec, AgentPol... | 34.271739 | 88 | 0.709483 |
795fc447217afc0c56f4f71ed1cc2a7254937b9e | 20,482 | py | Python | source/brailleDisplayDrivers/eurobraille.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/brailleDisplayDrivers/eurobraille.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/brailleDisplayDrivers/eurobraille.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | # -*- coding: UTF-8 -*-
#brailleDisplayDrivers/esys.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2017-2019 NV Access Limited, Babbage B.V., Eurobraille
from collections import OrderedDict, defaultdict
from ... | 33.742998 | 133 | 0.702812 |
795fc5d5af01379bb0216d2746749b2a733ff674 | 13,450 | py | Python | embedseg_napari/utils/glasbey.py | juglab/EmbedSeg-napari | 28944dcb88e1cc14a71aea8f1ae9430cb7629cef | [
"BSD-3-Clause"
] | 3 | 2021-07-21T08:33:41.000Z | 2021-08-18T17:49:40.000Z | embedseg_napari/utils/glasbey.py | juglab/EmbedSeg-napari | 28944dcb88e1cc14a71aea8f1ae9430cb7629cef | [
"BSD-3-Clause"
] | null | null | null | embedseg_napari/utils/glasbey.py | juglab/EmbedSeg-napari | 28944dcb88e1cc14a71aea8f1ae9430cb7629cef | [
"BSD-3-Clause"
] | null | null | null | """
Modified from https://github.com/taketwo/glasbey
"""
#!/usr/bin/env python
# encoding: utf-8
import os
import sys
import ast
import argparse
import numpy as np
from colorspacious import cspace_convert
from embedseg_napari.utils.view_palette import palette_to_image
# try:
# # this works if you import Glasbe... | 37.465181 | 128 | 0.587584 |
795fc5db04d3b057493c611c64245fe8b364107b | 994 | py | Python | cride/users/models/profiles.py | Mborjas/cride | 83b6704ea2ef30556bd81980830cb51fedc90056 | [
"MIT"
] | null | null | null | cride/users/models/profiles.py | Mborjas/cride | 83b6704ea2ef30556bd81980830cb51fedc90056 | [
"MIT"
] | 4 | 2021-03-19T01:14:50.000Z | 2022-03-11T23:49:44.000Z | cride/users/models/profiles.py | Mborjas/cride | 83b6704ea2ef30556bd81980830cb51fedc90056 | [
"MIT"
] | null | null | null | """Profile model."""
# Django
from django.db import models
# Utilities
from cride.utils.models import CRideModel
class Profile(CRideModel):
"""Profile model.
A profile holds a user's public data like biography, picture,
and statistics.
"""
# django recomienda para agregar datos a partir del m... | 23.666667 | 75 | 0.669014 |
795fc782bc12866e22b364d3e3675eea85ebf4fd | 161 | py | Python | Lista09/ex005.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | 2 | 2021-09-05T22:29:33.000Z | 2021-09-09T00:13:16.000Z | Lista09/ex005.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | null | null | null | Lista09/ex005.py | Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110 | f306c8dc6385ee8c9580e687afa16a49ace68f95 | [
"MIT"
] | null | null | null | m = [[int(input()) for i in range(10)] for j in range(10)]
for i in range(10):
for j in range(10):
if i + j < 9:
print(m[i][j], end=' ')
| 26.833333 | 58 | 0.478261 |
795fc874ecd0064154e5c6f2e676c2188d05fb87 | 5,105 | py | Python | taurex_petitrad/model/transmission.py | ucl-exoplanets/taurex-petitrad | c7cb7904ce414cdd4194e10d753163d77e238738 | [
"BSD-3-Clause"
] | null | null | null | taurex_petitrad/model/transmission.py | ucl-exoplanets/taurex-petitrad | c7cb7904ce414cdd4194e10d753163d77e238738 | [
"BSD-3-Clause"
] | null | null | null | taurex_petitrad/model/transmission.py | ucl-exoplanets/taurex-petitrad | c7cb7904ce414cdd4194e10d753163d77e238738 | [
"BSD-3-Clause"
] | null | null | null | from .petitradtrans import petitRADTRANSModel
import numpy as np
from taurex.exceptions import InvalidModelException
from taurex.core import fitparam
class TransmissionRADTRANS(petitRADTRANSModel):
@classmethod
def input_keywords(self):
return ['transmission-petitrad', 'transit-petitrad', ]
def _... | 33.585526 | 130 | 0.586288 |
795fc982ef6573395b1818ec2165151d80af505f | 542 | py | Python | manage.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | 1 | 2020-06-05T16:01:21.000Z | 2020-06-05T16:01:21.000Z | manage.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | 4 | 2020-02-11T23:27:37.000Z | 2021-12-13T19:52:11.000Z | manage.py | 17621368758/tranpathPY | 01cf371c260275811e3750de116fa5b95718bafe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tranpathPY.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. A... | 33.875 | 74 | 0.688192 |
795fc9a855298d461def7c1b892818a8264e5cb9 | 144 | py | Python | tests/testing/__init__.py | LukichevaPolina/dpnp | 5f5a679905d237ac7be1cc9ad1075877a9f77e39 | [
"BSD-2-Clause"
] | 37 | 2020-09-08T00:38:52.000Z | 2022-03-18T01:44:10.000Z | tests/testing/__init__.py | LukichevaPolina/dpnp | 5f5a679905d237ac7be1cc9ad1075877a9f77e39 | [
"BSD-2-Clause"
] | 432 | 2020-09-07T09:48:41.000Z | 2022-03-25T17:50:55.000Z | tests/testing/__init__.py | LukichevaPolina/dpnp | 5f5a679905d237ac7be1cc9ad1075877a9f77e39 | [
"BSD-2-Clause"
] | 17 | 2020-09-07T10:00:34.000Z | 2022-03-25T13:53:43.000Z | from tests.testing.array import assert_allclose
from tests.testing.array import assert_array_equal
from tests.testing.array import assert_equal
| 36 | 50 | 0.875 |
795fca46dfd0ede6074ea8eea14f030b6a395e86 | 1,248 | py | Python | backend/routers/users.py | okynas/Sworkout | 45701cebb20050d31ee13928662dc7410b02ec91 | [
"MIT"
] | null | null | null | backend/routers/users.py | okynas/Sworkout | 45701cebb20050d31ee13928662dc7410b02ec91 | [
"MIT"
] | 1 | 2022-03-25T16:10:52.000Z | 2022-03-25T16:10:52.000Z | backend/routers/users.py | okynas/Sworkout | 45701cebb20050d31ee13928662dc7410b02ec91 | [
"MIT"
] | null | null | null | from typing import List
from config.middleware import get_current_user
from fastapi import APIRouter, Depends, status
import database
from schema import UserView, UserCreate, UserUpdate
from sqlalchemy.orm import Session
from repository import UserRepository
router = APIRouter(
prefix="/users",
tags=['Users']
... | 33.72973 | 127 | 0.775641 |
795fca58f3e303398047f1286e420103a39a6da2 | 739 | py | Python | otp/migrations/0001_initial.py | navjots18/otp-package | 1c691d46afeee03d42013b7b820f9a66e8809785 | [
"MIT"
] | null | null | null | otp/migrations/0001_initial.py | navjots18/otp-package | 1c691d46afeee03d42013b7b820f9a66e8809785 | [
"MIT"
] | null | null | null | otp/migrations/0001_initial.py | navjots18/otp-package | 1c691d46afeee03d42013b7b820f9a66e8809785 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2021-04-06 09:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='OtpModel',
fields=[
('id', models.AutoField... | 28.423077 | 114 | 0.569689 |
795fcb74d38c85389980b4d8193148cac55dfbe0 | 3,285 | py | Python | antlir/rpm/db_connection.py | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 28 | 2020-08-11T16:22:46.000Z | 2022-03-04T15:41:52.000Z | antlir/rpm/db_connection.py | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 137 | 2020-08-11T16:07:49.000Z | 2022-02-27T10:59:05.000Z | antlir/rpm/db_connection.py | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 10 | 2020-09-10T00:01:28.000Z | 2022-03-08T18:00:28.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import sqlite3
import urllib.parse
from contextlib import AbstractContextManager
from typing import Optional
from antl... | 32.205882 | 80 | 0.663623 |
795fcc43d2779a8b389cefafb6d3686c36b227ac | 1,709 | py | Python | package/spack-colm/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-colm/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-colm/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
... | 43.820513 | 78 | 0.683441 |
795fcc95f0114f0978ff041886179d6f2e6f34bd | 1,763 | py | Python | sippy/SipRoute.py | jevonearth/b2bua | 0bbc6f2d62b6473408cea2542b8ef1be38dea814 | [
"BSD-2-Clause"
] | null | null | null | sippy/SipRoute.py | jevonearth/b2bua | 0bbc6f2d62b6473408cea2542b8ef1be38dea814 | [
"BSD-2-Clause"
] | null | null | null | sippy/SipRoute.py | jevonearth/b2bua | 0bbc6f2d62b6473408cea2542b8ef1be38dea814 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved.
# Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistrib... | 43 | 82 | 0.75156 |
795fcd09f445dc8cbbb6f0902b4f82a1e12e2de6 | 233 | py | Python | word-o-mat.glyphsPlugin/Contents/MacOS/main.py | composerjk/word-o-mat | 5e5edb64d1046b983540330e2118ad7d3c2a76ec | [
"MIT"
] | null | null | null | word-o-mat.glyphsPlugin/Contents/MacOS/main.py | composerjk/word-o-mat | 5e5edb64d1046b983540330e2118ad7d3c2a76ec | [
"MIT"
] | null | null | null | word-o-mat.glyphsPlugin/Contents/MacOS/main.py | composerjk/word-o-mat | 5e5edb64d1046b983540330e2118ad7d3c2a76ec | [
"MIT"
] | null | null | null | def _run(script):
global __file__
import os, sys #, site
sys.frozen = 'macosx_plugin'
base = os.environ['RESOURCEPATH']
path = os.path.join(base, script)
__file__ = path
execfile(path, globals(), globals())
_run('plugin.py')
| 21.181818 | 37 | 0.699571 |
795fcd1b2b36fac62a2afb569ac042646f6ba595 | 1,144 | py | Python | merge2.py | InnovAnon-Inc/ftw2SQLite3 | 40916e6cbc4ce4ed8c41fc0bdb8504af1c04d14e | [
"Unlicense"
] | 1 | 2021-01-14T12:35:33.000Z | 2021-01-14T12:35:33.000Z | merge2.py | InnovAnon-Inc/ftw2SQLite3 | 40916e6cbc4ce4ed8c41fc0bdb8504af1c04d14e | [
"Unlicense"
] | null | null | null | merge2.py | InnovAnon-Inc/ftw2SQLite3 | 40916e6cbc4ce4ed8c41fc0bdb8504af1c04d14e | [
"Unlicense"
] | null | null | null | from argparse import ArgumentParser, REMAINDER
from multiprocessing import cpu_count
from oswalk import oswalk_flattens
from pathlib import Path
from sqlite3 import connect
from pwformat import PWFormat
from oswalk import oswalk_flatten
if __name__ == "__main__":
parser = ArgumentPa... | 31.777778 | 74 | 0.707168 |
795fce518c5cf2bcf73c8e84ab40ff0dfea8005c | 8,485 | py | Python | mmdet/apis/inference.py | PhilippMarquardt/mmdetection | 5979e13f7faea90f4b80079320b93585300c6a4f | [
"Apache-2.0"
] | 1 | 2021-12-10T15:08:22.000Z | 2021-12-10T15:08:22.000Z | mmdet/apis/inference.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | 1 | 2022-01-06T14:58:44.000Z | 2022-01-06T14:58:44.000Z | mmdet/apis/inference.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | 1 | 2021-12-13T02:37:50.000Z | 2021-12-13T02:37:50.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import warnings
from pathlib import Path
import mmcv
import numpy as np
import torch
from mmcv.ops import RoIPool
from mmcv.parallel import collate, scatter
from mmcv.runner import load_checkpoint
from mmdet.core import get_classes
from mmdet.datasets import replace_Ima... | 33.670635 | 79 | 0.611314 |
795fcf192043239001f8370f8cd607dc1868df2d | 12,629 | py | Python | orchid_ClimatePredict/enc-dec_byCZ.py | chengzee/climate_predict | a10f3701f9e2083ac9c0e0f4453dbe5158b481ba | [
"MIT"
] | null | null | null | orchid_ClimatePredict/enc-dec_byCZ.py | chengzee/climate_predict | a10f3701f9e2083ac9c0e0f4453dbe5158b481ba | [
"MIT"
] | null | null | null | orchid_ClimatePredict/enc-dec_byCZ.py | chengzee/climate_predict | a10f3701f9e2083ac9c0e0f4453dbe5158b481ba | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import csv
import time
import matplotlib.pyplot as plt
import tensorflow as tf
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
physical_devices = tf.config.list_physical_devices('GPU')
try:
tf.config.experimental.set_memory_growth(physical_devices[1], True)
except:
# Inva... | 48.573077 | 152 | 0.554834 |
795fcf6875e0683cb2facdb311a0a92711519018 | 1,703 | py | Python | Face_Recog/extendedmodels/Age.py | blueprintparadise/Embedding_Facenet | 9b4004243047a82f95739ad1cb508019d762e83b | [
"MIT"
] | null | null | null | Face_Recog/extendedmodels/Age.py | blueprintparadise/Embedding_Facenet | 9b4004243047a82f95739ad1cb508019d762e83b | [
"MIT"
] | null | null | null | Face_Recog/extendedmodels/Age.py | blueprintparadise/Embedding_Facenet | 9b4004243047a82f95739ad1cb508019d762e83b | [
"MIT"
] | null | null | null | from Face_Recog.basemodels import VGGFace
import os
from pathlib import Path
import gdown
import numpy as np
import tensorflow as tf
tf_version = int(tf.__version__.split(".")[0])
if tf_version == 1:
import keras
from keras.models import Model, Sequential
from keras.layers import Convolution2D, Flatten, Activation... | 28.864407 | 111 | 0.722255 |
795fcfbbbb69d4e38f10d9e6f393e399257db1c5 | 3,174 | py | Python | sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py | jbvaningen/feast | 70d4a1335312747521fc57e7742abf7eb85c12a6 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py | jbvaningen/feast | 70d4a1335312747521fc57e7742abf7eb85c12a6 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py | jbvaningen/feast | 70d4a1335312747521fc57e7742abf7eb85c12a6 | [
"Apache-2.0"
] | null | null | null | import uuid
from typing import Dict, List, Optional
import pandas as pd
from feast import RedshiftSource
from feast.data_source import DataSource
from feast.infra.offline_stores.redshift import RedshiftOfflineStoreConfig
from feast.infra.offline_stores.redshift_source import SavedDatasetRedshiftStorage
from feast.inf... | 34.5 | 95 | 0.672023 |
795fcfdf7b0955218c8c3aba1193f72e03de42cc | 9,037 | py | Python | DQMOffline/CalibCalo/test/dohistos.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | DQMOffline/CalibCalo/test/dohistos.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | DQMOffline/CalibCalo/test/dohistos.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #! /usr/bin/env python3
from __future__ import print_function
import os
import sys
import errno
#print error/help message and exit
def help_message():
print("Usage:\n\
dohistos [folder_name] [options] -v versions_to_compare -f files_to_compare\n\
Versions and files must be whitespace separated.\n\
If no folder is... | 38.455319 | 313 | 0.594334 |
795fd093eea8856b77b58365e8fe32ed3ea4537c | 1,907 | py | Python | graphgallery/nn/models/pytorch/appnp.py | Jie-Re/GraphGallery | 37a2e807bb21e5ed986ade935ac9619b62bfdd90 | [
"MIT"
] | null | null | null | graphgallery/nn/models/pytorch/appnp.py | Jie-Re/GraphGallery | 37a2e807bb21e5ed986ade935ac9619b62bfdd90 | [
"MIT"
] | null | null | null | graphgallery/nn/models/pytorch/appnp.py | Jie-Re/GraphGallery | 37a2e807bb21e5ed986ade935ac9619b62bfdd90 | [
"MIT"
] | null | null | null | import torch.nn as nn
from torch import optim
from graphgallery.nn.models import TorchKeras
from graphgallery.nn.layers.pytorch import APPNProp, PPNProp, activations
from graphgallery.nn.metrics.pytorch import Accuracy
class APPNP(TorchKeras):
def __init__(self,
in_features,
out... | 34.672727 | 76 | 0.478238 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.