hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c33fefabf986d86db96e95c9cf252d45ec4a026
2,502
py
Python
BaseTools/Source/Python/Common/Dictionary.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
151
2018-06-01T20:14:34.000Z
2022-03-13T08:34:07.000Z
BaseTools/Source/Python/Common/Dictionary.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
179
2018-06-21T18:07:54.000Z
2022-03-30T16:06:39.000Z
BaseTools/Source/Python/Common/Dictionary.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
58
2018-06-07T21:59:15.000Z
2022-03-16T23:26:38.000Z
## @file # Define a dictionary structure # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license...
32.493506
129
0.599121
import EdkLogger from DataType import * from Common.LongFilePathSupport import OpenLongFilePath as open (FileName, Dictionary, CommentCharacter, KeySplitCharacter, ValueSplitFlag, ValueSplitCharacter): try: F = open(FileName, 'r') Keys = [] for Line in F: if Line...
false
true
1c33ff10010a98d8a99a1b158c70877e9d59678f
997
py
Python
setup.py
brandonvfx/flask-lambda
29bb0d728037af076019cfbe398e084cd58821bb
[ "Apache-2.0" ]
6
2018-10-16T13:34:26.000Z
2020-06-15T22:20:15.000Z
setup.py
brandonvfx/flask-lambda
29bb0d728037af076019cfbe398e084cd58821bb
[ "Apache-2.0" ]
2
2019-07-08T09:22:25.000Z
2020-12-16T12:47:22.000Z
setup.py
brandonvfx/flask-lambda
29bb0d728037af076019cfbe398e084cd58821bb
[ "Apache-2.0" ]
5
2018-12-20T14:07:14.000Z
2021-05-15T02:14:29.000Z
from setuptools import setup, find_packages with open('README.rst') as f: long_description = f.read() setup( name='flask-lambda-support', version='0.1.5', description='Python 3.6+ module to make Flask compatible with AWS Lambda', long_description=long_description, keywords='flask aws amazon l...
32.16129
78
0.652959
from setuptools import setup, find_packages with open('README.rst') as f: long_description = f.read() setup( name='flask-lambda-support', version='0.1.5', description='Python 3.6+ module to make Flask compatible with AWS Lambda', long_description=long_description, keywords='flask aws amazon l...
true
true
1c33ff237e9a5bed9d42985f51dcd2d5a656d2e9
174
py
Python
Unit 2/2.8/2.8.4 Beaded Bracelet.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
1
2021-04-08T14:02:49.000Z
2021-04-08T14:02:49.000Z
Unit 2/2.8/2.8.4 Beaded Bracelet.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
null
null
null
Unit 2/2.8/2.8.4 Beaded Bracelet.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
null
null
null
speed(0) def make_bead(): forward(100) pendown() circle(10) penup() backward(100) penup() for i in range(36): make_bead() left(10)
12.428571
20
0.528736
speed(0) def make_bead(): forward(100) pendown() circle(10) penup() backward(100) penup() for i in range(36): make_bead() left(10)
true
true
1c33ffe24ec1e81536cab928d5fd3f8679749726
6,856
py
Python
cardea/fhir/Media.py
sarahmish/Cardea
85c4246c12178e6d1b9cc12eb39c264f3c20f3e9
[ "MIT" ]
69
2021-01-28T22:25:10.000Z
2022-03-15T00:23:33.000Z
cardea/fhir/Media.py
sarahmish/Cardea
85c4246c12178e6d1b9cc12eb39c264f3c20f3e9
[ "MIT" ]
30
2018-08-29T12:45:23.000Z
2019-12-24T11:08:12.000Z
cardea/fhir/Media.py
sarahmish/Cardea
85c4246c12178e6d1b9cc12eb39c264f3c20f3e9
[ "MIT" ]
14
2021-03-24T01:21:25.000Z
2022-03-12T11:53:40.000Z
from .fhirbase import fhirbase class Media(fhirbase): """ A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. Args: resourceType: This is a Media resource identifier: Identifiers associated with the image...
34.109453
86
0.575117
from .fhirbase import fhirbase class Media(fhirbase): __name__ = 'Media' def __init__(self, dict_values=None): self.resourceType = 'Media' self.basedOn = None self.type = None self.subtype = None self....
true
true
1c340161e4b6f7a3fc08face097e2d2cd16fb14c
735
py
Python
chap03/author-manager/src/api/config/config.py
matadorchw/rest_flask
b5b643d72e63e654f2d893621158e2e5db870b15
[ "MIT" ]
2
2020-10-21T14:04:42.000Z
2020-10-21T14:05:01.000Z
chap03/author-manager/src/api/config/config.py
matadorchw/rest_flask
b5b643d72e63e654f2d893621158e2e5db870b15
[ "MIT" ]
null
null
null
chap03/author-manager/src/api/config/config.py
matadorchw/rest_flask
b5b643d72e63e654f2d893621158e2e5db870b15
[ "MIT" ]
null
null
null
class Config(object): DEBUG = False TESTING = False SQLALCHEMY_TRACK_MODIFICATIONS = False class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = '' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:123456@localhost:3306/flaskrest' SECRET_KE...
22.96875
84
0.706122
class Config(object): DEBUG = False TESTING = False SQLALCHEMY_TRACK_MODIFICATIONS = False class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = '' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:123456@localhost:3306/flaskrest' SECRET_KE...
true
true
1c3402eecc1efe7833e69b853785cb075e895c8e
132
py
Python
blogmods/models/__init__.py
stonescar/multi-user-blog
a402dafde1f7d94031129638aa072ce39223e80e
[ "MIT" ]
null
null
null
blogmods/models/__init__.py
stonescar/multi-user-blog
a402dafde1f7d94031129638aa072ce39223e80e
[ "MIT" ]
null
null
null
blogmods/models/__init__.py
stonescar/multi-user-blog
a402dafde1f7d94031129638aa072ce39223e80e
[ "MIT" ]
null
null
null
from database import Database from users import Users from posts import Posts from comments import Comments from votes import Votes
22
29
0.848485
from database import Database from users import Users from posts import Posts from comments import Comments from votes import Votes
true
true
1c3404f181a064281760dfa67f303c16422cd5c3
529
py
Python
commands/upgrader/commands/blockdata.py
Red-Teapot/mc-commandblock-1.13-update
64106e1ecb5adca2aff1eeb3a1fcc11486940000
[ "MIT" ]
1
2020-07-27T16:53:26.000Z
2020-07-27T16:53:26.000Z
commands/upgrader/commands/blockdata.py
Red-Teapot/mc-commandblock-1.13-update
64106e1ecb5adca2aff1eeb3a1fcc11486940000
[ "MIT" ]
5
2019-01-02T14:21:32.000Z
2019-07-07T05:39:39.000Z
commands/upgrader/commands/blockdata.py
Red-Teapot/mc-commandblock-1.13-update
64106e1ecb5adca2aff1eeb3a1fcc11486940000
[ "MIT" ]
null
null
null
from commands.pre_1_13.cmdex import CMDEx from commands.upgrader.utils import command_upgrader_base CMDEXS = [ CMDEx('blockdata {coordinate:x} {coordinate:y} {coordinate:z} {nbtstr:nbt}'), ] def __upgrade(order, props): result = 'data merge block ' result += str(props['x']) + ' ' + str(props['y']) + ' '...
26.45
83
0.669187
from commands.pre_1_13.cmdex import CMDEx from commands.upgrader.utils import command_upgrader_base CMDEXS = [ CMDEx('blockdata {coordinate:x} {coordinate:y} {coordinate:z} {nbtstr:nbt}'), ] def __upgrade(order, props): result = 'data merge block ' result += str(props['x']) + ' ' + str(props['y']) + ' '...
true
true
1c3404f28196271ef1b09445916e0d69195037e1
16,628
py
Python
utils.py
creol-io/machine-manager
01108f0c26c15f515c1d9d3361f1c1a27c03d8ab
[ "Apache-2.0" ]
null
null
null
utils.py
creol-io/machine-manager
01108f0c26c15f515c1d9d3361f1c1a27c03d8ab
[ "Apache-2.0" ]
null
null
null
utils.py
creol-io/machine-manager
01108f0c26c15f515c1d9d3361f1c1a27c03d8ab
[ "Apache-2.0" ]
null
null
null
""" Copyright 2019 Cartesi Pte. Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
45.062331
172
0.674886
import subprocess import logging import logging.config import logging.handlers import traceback import grpc import json import time import os import cartesi_machine_pb2_grpc import cartesi_machine_pb2 import machine_manager_pb2 LOG_FILENAME = "manager.log" RUN_CYCLES_BATCH_SIZE = 10**7 UNIX = "unix" TCP = "tcp" SO...
true
true
1c34061109ca350266eae9e1a19f7c8cd8d30559
150
py
Python
terrascript/resource/dnsimple.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/dnsimple.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/dnsimple.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
# terrascript/resource/dnsimple.py import terrascript class dnsimple_record(terrascript.Resource): pass __all__ = [ "dnsimple_record", ]
11.538462
44
0.74
import terrascript class dnsimple_record(terrascript.Resource): pass __all__ = [ "dnsimple_record", ]
true
true
1c34064210bf3bb84e61b0d3413700caef45e132
2,375
py
Python
app/kaznlplib/tokenization/tokhmm.py
n1EzeR/reviews_tazalau
973b0a8ad1c4f54ad13e767424cf3d42fb1a0bbf
[ "CC0-1.0" ]
null
null
null
app/kaznlplib/tokenization/tokhmm.py
n1EzeR/reviews_tazalau
973b0a8ad1c4f54ad13e767424cf3d42fb1a0bbf
[ "CC0-1.0" ]
1
2021-06-02T00:47:32.000Z
2021-06-02T00:47:32.000Z
app/kaznlplib/tokenization/tokhmm.py
n1EzeR/reviews_tazalau
973b0a8ad1c4f54ad13e767424cf3d42fb1a0bbf
[ "CC0-1.0" ]
null
null
null
# -*- coding: UTF-8 -*- import re from kaznlp.models.hmm import HMM_DI # character processing regex with replacements CPREX = { # uppercase mathcer and replacer re.compile(u"[A-ZА-ЯЁӘІҢҒҮҰҚӨҺ]", re.U): "CAP", # lowercase mathcer and replacer re.compile(u"[a-zа-яёәіңғүұқөһ]", re.U): "LOW", # sente...
32.534247
77
0.507368
import re from kaznlp.models.hmm import HMM_DI CPREX = { re.compile(u"[A-ZА-ЯЁӘІҢҒҮҰҚӨҺ]", re.U): "CAP", re.compile(u"[a-zа-яёәіңғүұқөһ]", re.U): "LOW", re.compile(u"[\.\?\!]", re.U): "SFL", re.compile(u"\s", re.U): "SPC", re.compile(u"\d", re.U): "DIG", } class Token...
true
true
1c34065aa7e70f2a9d46f68e522f48e8db1adb12
25,852
py
Python
userbot/modules/scrapers.py
Saksham033/PaperplaneExtended
1480e25bcd2e012ba1e2d78c1ba29a3cbc449a23
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/scrapers.py
Saksham033/PaperplaneExtended
1480e25bcd2e012ba1e2d78c1ba29a3cbc449a23
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/scrapers.py
Saksham033/PaperplaneExtended
1480e25bcd2e012ba1e2d78c1ba29a3cbc449a23
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing various scrapers. """ import os import time import asyncio import shutil from bs4 import...
35.268759
152
0.572567
import os import time import asyncio import shutil from bs4 import BeautifulSoup import re from time import sleep from html import unescape from re import findall from selenium import webdriver from urllib.parse import quote_plus from urllib.error import HTTPError from selenium.webdriver.support.ui import Select ...
true
true
1c34067ecf84e3d35f17b9865cf821ee9efe0073
7,473
py
Python
account/tests/test_password.py
AHDCreative/django_user_accounts
5ab37c5298123189a29fb4c7048ea6a69e2509ff
[ "MIT" ]
null
null
null
account/tests/test_password.py
AHDCreative/django_user_accounts
5ab37c5298123189a29fb4c7048ea6a69e2509ff
[ "MIT" ]
null
null
null
account/tests/test_password.py
AHDCreative/django_user_accounts
5ab37c5298123189a29fb4c7048ea6a69e2509ff
[ "MIT" ]
null
null
null
import datetime import django from django.contrib.auth.hashers import check_password, make_password from django.contrib.auth.models import User from django.test import TestCase, modify_settings, override_settings import pytz from account.compat import reverse from account.models import PasswordExpiry, PasswordHistory f...
34.597222
124
0.63977
import datetime import django from django.contrib.auth.hashers import check_password, make_password from django.contrib.auth.models import User from django.test import TestCase, modify_settings, override_settings import pytz from account.compat import reverse from account.models import PasswordExpiry, PasswordHistory f...
true
true
1c3406c0154dcae2ad9030f6a2382d96e6ce407b
13,130
py
Python
extra_foam/special_suite/tests/test_gotthard.py
ebadkamil/EXtra-foam
8e58143040c788dc70ea98ea5adc1fb63b7cfe0d
[ "BSD-3-Clause" ]
7
2019-11-27T09:31:37.000Z
2022-02-12T21:28:49.000Z
extra_foam/special_suite/tests/test_gotthard.py
ebadkamil/EXtra-foam
8e58143040c788dc70ea98ea5adc1fb63b7cfe0d
[ "BSD-3-Clause" ]
172
2019-12-03T07:56:02.000Z
2022-03-25T15:46:45.000Z
extra_foam/special_suite/tests/test_gotthard.py
ebadkamil/EXtra-foam
8e58143040c788dc70ea98ea5adc1fb63b7cfe0d
[ "BSD-3-Clause" ]
9
2019-11-27T09:32:38.000Z
2022-01-05T09:56:10.000Z
import unittest from unittest.mock import MagicMock, patch, PropertyMock from collections import Counter import pytest import numpy as np from xarray import DataArray from PyQt5.QtCore import Qt from PyQt5.QtTest import QSignalSpy, QTest from extra_foam.pipeline.tests import _RawDataMixin from extra_foam.special_su...
37.947977
104
0.651942
import unittest from unittest.mock import MagicMock, patch, PropertyMock from collections import Counter import pytest import numpy as np from xarray import DataArray from PyQt5.QtCore import Qt from PyQt5.QtTest import QSignalSpy, QTest from extra_foam.pipeline.tests import _RawDataMixin from extra_foam.special_su...
true
true
1c3406df759000e6ee4b53c4ee71e09130029fa6
3,304
py
Python
openstack/network/v2/certificate.py
IamFive/sdk-python
223b04f90477f7de0f00b3e652d8672ba73271c8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
openstack/network/v2/certificate.py
IamFive/sdk-python
223b04f90477f7de0f00b3e652d8672ba73271c8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
openstack/network/v2/certificate.py
IamFive/sdk-python
223b04f90477f7de0f00b3e652d8672ba73271c8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
39.807229
109
0.681901
from openstack.network import network_service from openstack import resource2 class Certificate(resource2.Resource): resource_key = 'certificate' resources_key = 'certificates' base_path = '/lbaas/certificates' service = network_service.NetworkService() allow_create = True allow_...
true
true
1c3407eb73e0eefc84b416e84e029f9171d5bc7d
1,522
py
Python
bioinformatics_stronghold/tests/test_revc.py
nathaliagg/my_rosalind_answers
f5c95c63051360a34e2b599648d4d57cbaf693a8
[ "MIT" ]
null
null
null
bioinformatics_stronghold/tests/test_revc.py
nathaliagg/my_rosalind_answers
f5c95c63051360a34e2b599648d4d57cbaf693a8
[ "MIT" ]
null
null
null
bioinformatics_stronghold/tests/test_revc.py
nathaliagg/my_rosalind_answers
f5c95c63051360a34e2b599648d4d57cbaf693a8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """tests for revc .py""" import os import re from subprocess import getstatusoutput prg = '../revc.py' good_input = 'test_data/good_input_revc.txt' bad_input = 'test_data/bad_input_revc.txt' good_output = 'ACCGGGTTTT' # -------------------------------------------------- def test_exists(): ...
24.15873
64
0.508541
import os import re from subprocess import getstatusoutput prg = '../revc.py' good_input = 'test_data/good_input_revc.txt' bad_input = 'test_data/bad_input_revc.txt' good_output = 'ACCGGGTTTT' def test_exists(): assert os.path.isfile(prg) def test_usage(): for flag in ['-h', '--help']: rv, ...
true
true
1c3407ecd357dfc5ca2a544cbb74615755d2699b
1,696
py
Python
src/study/config.py
ppmzhang2/gpt3-study
1c4e34238301e06da8cbda23eb4e473567e15c80
[ "MIT" ]
null
null
null
src/study/config.py
ppmzhang2/gpt3-study
1c4e34238301e06da8cbda23eb4e473567e15c80
[ "MIT" ]
null
null
null
src/study/config.py
ppmzhang2/gpt3-study
1c4e34238301e06da8cbda23eb4e473567e15c80
[ "MIT" ]
null
null
null
"""project config""" import os import sys from logging.config import dictConfig basedir = os.path.abspath(os.path.dirname(__file__)) class Config: # pylint: disable=too-few-public-methods """default config""" # token OPENAI_KEY = os.getenv("OPENAI_KEY", "") # logging LOG_LEVEL = "WARNING" ...
29.241379
79
0.524175
import os import sys from logging.config import dictConfig basedir = os.path.abspath(os.path.dirname(__file__)) class Config: OPENAI_KEY = os.getenv("OPENAI_KEY", "") LOG_LEVEL = "WARNING" LOG_LINE_FORMAT = "%(asctime)s %(levelname)-5s %(threadName)s: %(message)s" LOG_DATETIME_FORMAT ...
true
true
1c340895d8ff7e0e155b6637d09d7adf5472fe3b
8,420
py
Python
notes/mainwithfacade.py
yeezysmem/notes.io
9ca7c2251f0fc4e38b6f50e0f0411ebf5ee132da
[ "MIT" ]
1
2020-12-02T14:31:02.000Z
2020-12-02T14:31:02.000Z
notes/mainwithfacade.py
yeezysmem/notes.io
9ca7c2251f0fc4e38b6f50e0f0411ebf5ee132da
[ "MIT" ]
null
null
null
notes/mainwithfacade.py
yeezysmem/notes.io
9ca7c2251f0fc4e38b6f50e0f0411ebf5ee132da
[ "MIT" ]
null
null
null
import time from prettytable import PrettyTable # from PIL import Image import tkinter as t from tkinter.filedialog import askopenfilename import webbrowser from sqlalchemy import create_engine from sqlalchemy.orm.session import sessionmaker engine = create_engine('sqlite:///DataBaseForNotes.db' , echo=False) fro...
23.852691
68
0.610095
import time from prettytable import PrettyTable import tkinter as t from tkinter.filedialog import askopenfilename import webbrowser from sqlalchemy import create_engine from sqlalchemy.orm.session import sessionmaker engine = create_engine('sqlite:///DataBaseForNotes.db' , echo=False) from sqlalchemy import Col...
true
true
1c340923dc4ec14bb7428534234c2587080e5110
7,169
py
Python
src/read_actual_data.py
gdalle/PartiallyObservedVectorAutoRegressions
28c9d34d7b6e45679e442721daf4946867fd5fb0
[ "MIT" ]
null
null
null
src/read_actual_data.py
gdalle/PartiallyObservedVectorAutoRegressions
28c9d34d7b6e45679e442721daf4946867fd5fb0
[ "MIT" ]
null
null
null
src/read_actual_data.py
gdalle/PartiallyObservedVectorAutoRegressions
28c9d34d7b6e45679e442721daf4946867fd5fb0
[ "MIT" ]
null
null
null
import itertools import os import zipfile from joblib import Parallel, delayed import pandas as pd from tqdm.notebook import tqdm # Constants YEARS = ["2018", "2019", "2020", "2021"] MONTHS = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"] DATA_COLUMNS = { "BETRIEBSTAG": ("date", "string...
35.490099
88
0.600921
import itertools import os import zipfile from joblib import Parallel, delayed import pandas as pd from tqdm.notebook import tqdm YEARS = ["2018", "2019", "2020", "2021"] MONTHS = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"] DATA_COLUMNS = { "BETRIEBSTAG": ("date", "string"), "FA...
true
true
1c340959bfcf319ad547abc637ac8cd4909c2e99
667
py
Python
LeetCode/347 Top K Frequent Elements.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/347 Top K Frequent Elements.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/347 Top K Frequent Elements.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
# Hash Table; Heap # Given a non-empty array of integers, return the k most frequent elements. # # Example 1: # # Input: nums = [1,1,1,2,2,3], k = 2 # Output: [1,2] # Example 2: # # Input: nums = [1], k = 1 # Output: [1] # Note: # # You may assume k is always valid, 1 ≤ k ≤ number of unique elements. # Your algorithm'...
25.653846
95
0.610195
class Solution: def topKFrequent(self, nums, k): numsDictKCommon = collections.Counter(nums).most_common(k) return [x[0] for x in numsDictKCommon]
true
true
1c3409b40d34943b071152c0968e0e9175ed142c
405
py
Python
exproject/cli.py
yatin-darbar/exproject
5cac45a28dc71d83215dabe33211dd758b83191a
[ "MIT" ]
null
null
null
exproject/cli.py
yatin-darbar/exproject
5cac45a28dc71d83215dabe33211dd758b83191a
[ "MIT" ]
null
null
null
exproject/cli.py
yatin-darbar/exproject
5cac45a28dc71d83215dabe33211dd758b83191a
[ "MIT" ]
null
null
null
"""Console script for exproject.""" import sys import click @click.command() def main(args=None): """Console script for exproject.""" click.echo("Replace this message by putting your code into " "exproject.cli.main") click.echo("See click documentation at https://click.palletsprojects.com/"...
23.823529
79
0.666667
import sys import click @click.command() def main(args=None): click.echo("Replace this message by putting your code into " "exproject.cli.main") click.echo("See click documentation at https://click.palletsprojects.com/") return 0 if __name__ == "__main__": sys.exit(main())
true
true
1c3409fa0f2cac32d7f09305197d2875ed50d8f8
1,325
py
Python
aiotdlib/api/functions/request_qr_code_authentication.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/request_qr_code_authentication.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/request_qr_code_authentication.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
47.321429
356
0.578113
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject class RequestQrCodeAuthentication(BaseObject): ID: str = Field("requestQrCodeAuthentication", alias="@type") other_user_ids: list[int] @staticmethod def read(q: dict) -> RequestQrCodeAuthentication: ...
true
true
1c340a57c3769de9448e4dae1c6352d7f424212f
15,644
py
Python
PaddleCV/PaddleGAN/trainer/Pix2pix.py
heavengate/models
f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7
[ "Apache-2.0" ]
2
2021-06-11T06:48:20.000Z
2021-09-02T10:23:07.000Z
PaddleCV/PaddleGAN/trainer/Pix2pix.py
heavengate/models
f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7
[ "Apache-2.0" ]
null
null
null
PaddleCV/PaddleGAN/trainer/Pix2pix.py
heavengate/models
f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7
[ "Apache-2.0" ]
1
2019-08-27T11:19:09.000Z
2019-08-27T11:19:09.000Z
#copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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 l...
43.576602
116
0.510483
from __future__ import absolute_import from __future__ import division from __future__ import print_function from network.Pix2pix_network import Pix2pix_model from util import utility import paddle.fluid as fluid from paddle.fluid import profiler import sys import time import numpy as np class GTrainer(...
true
true
1c340a6352846a6f94a05e23657cc0dadbe2b9f6
24,811
py
Python
test/functional/feature_csv_activation.py
Dollar-coin/Dollar
4b84e5d14408f3985d527aaccac21472b47c91d5
[ "MIT" ]
1
2021-02-06T22:18:29.000Z
2021-02-06T22:18:29.000Z
test/functional/feature_csv_activation.py
Dollar-coin/Dollar
4b84e5d14408f3985d527aaccac21472b47c91d5
[ "MIT" ]
1
2021-02-07T00:57:29.000Z
2021-02-07T10:22:29.000Z
test/functional/feature_csv_activation.py
Dollar-coin/Dollar
4b84e5d14408f3985d527aaccac21472b47c91d5
[ "MIT" ]
1
2021-02-26T22:29:45.000Z
2021-02-26T22:29:45.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test activation of the first version bits soft fork. This soft fork will activate the following BIPS: ...
51.05144
169
0.696506
from decimal import Decimal from itertools import product from io import BytesIO import time from test_framework.blocktools import create_coinbase, create_block, create_transaction from test_framework.messages import ToHex, CTransaction from test_framework.mininode import P2PDataStore from test_framework.script im...
true
true
1c340b1f2cbd9486c82f411e8186992ec5ca287f
3,885
py
Python
edb/edgeql/compiler/options.py
sfermigier/edgedb
13aff7004aa682777287157dea52642c374967e8
[ "Apache-2.0" ]
7,302
2018-05-10T18:36:31.000Z
2022-03-31T17:49:36.000Z
edb/edgeql/compiler/options.py
sfermigier/edgedb
13aff7004aa682777287157dea52642c374967e8
[ "Apache-2.0" ]
1,602
2018-05-10T17:45:38.000Z
2022-03-31T23:46:19.000Z
edb/edgeql/compiler/options.py
sfermigier/edgedb
13aff7004aa682777287157dea52642c374967e8
[ "Apache-2.0" ]
236
2018-05-13T14:15:29.000Z
2022-03-29T19:39:19.000Z
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
34.380531
79
0.732046
from __future__ import annotations from typing import * from dataclasses import dataclass, field as dc_field if TYPE_CHECKING: from edb.schema import functions as s_func from edb.schema import objects as s_obj from edb.schema import name as s_name from edb.schema import types as s...
true
true
1c340c823663b0eb355585b2deb48e95a2779621
182
py
Python
pyretri/models/__init__.py
dongan-beta/PyRetri
8756d5d5813a5211b58855373b6c6cd33d7a11f6
[ "Apache-2.0" ]
1,063
2020-04-21T12:42:05.000Z
2022-03-31T06:32:50.000Z
pyretri/models/__init__.py
dongan-beta/PyRetri
8756d5d5813a5211b58855373b6c6cd33d7a11f6
[ "Apache-2.0" ]
39
2020-05-07T07:24:19.000Z
2022-02-02T23:49:23.000Z
pyretri/models/__init__.py
dongan-beta/PyRetri
8756d5d5813a5211b58855373b6c6cd33d7a11f6
[ "Apache-2.0" ]
174
2020-04-26T04:33:11.000Z
2022-03-17T02:58:45.000Z
# -*- coding: utf-8 -*- from yacs.config import CfgNode from .config import get_model_cfg from .builder import build_model __all__ = [ 'get_model_cfg', 'build_model', ]
13
33
0.686813
from yacs.config import CfgNode from .config import get_model_cfg from .builder import build_model __all__ = [ 'get_model_cfg', 'build_model', ]
true
true
1c340cac809b176c6009ba616e4eda9d096d8527
722
py
Python
nazgul/messages/google_chat.py
avara1986/nazgul
21e32262acac2acda0232c3eb71b8aaa292e63b5
[ "Apache-2.0" ]
1
2019-06-17T20:28:24.000Z
2019-06-17T20:28:24.000Z
nazgul/messages/google_chat.py
avara1986/nazgul
21e32262acac2acda0232c3eb71b8aaa292e63b5
[ "Apache-2.0" ]
null
null
null
nazgul/messages/google_chat.py
avara1986/nazgul
21e32262acac2acda0232c3eb71b8aaa292e63b5
[ "Apache-2.0" ]
null
null
null
from nazgul.message import DriverMessage from nazgul.response import GoogleChatResponse class Message(DriverMessage): response = GoogleChatResponse use_ids = True def set_values(self): self.user_id = self.msg["user"]["name"] self.user_name = self.users.get(self.user_id, {}).get("name", Fa...
34.380952
96
0.641274
from nazgul.message import DriverMessage from nazgul.response import GoogleChatResponse class Message(DriverMessage): response = GoogleChatResponse use_ids = True def set_values(self): self.user_id = self.msg["user"]["name"] self.user_name = self.users.get(self.user_id, {}).get("name", Fa...
true
true
1c340da185a24d00ef78622ff2aacf41ea532c61
4,453
py
Python
tools/face/__make_cs6_split_annot.py
AruniRC/detectron-self-train
a5d0edc51aeab92b953948ef2401294e87efb719
[ "MIT" ]
128
2019-04-12T17:06:27.000Z
2022-02-26T10:24:43.000Z
tools/face/__make_cs6_split_annot.py
AruniRC/detectron-self-train
a5d0edc51aeab92b953948ef2401294e87efb719
[ "MIT" ]
15
2019-06-12T03:55:48.000Z
2021-03-12T07:09:53.000Z
tools/face/__make_cs6_split_annot.py
AruniRC/detectron-self-train
a5d0edc51aeab92b953948ef2401294e87efb719
[ "MIT" ]
24
2019-04-12T17:06:30.000Z
2021-07-12T12:38:20.000Z
""" Create ground-truth annotation files for IJBC-style evaluation on CS6. By default the "val" split is considered, using validation videos listed in data/CS6/list_video_val.txt. NOTE: create symlink to "/mnt/nfs/work1/elm/arunirc/Data/CS6_annots/" at "data/CS6_annots". Usage: srun --pty --mem 50000 python tool...
32.268116
111
0.543454
from __future__ import absolute_import from __future__ import division import matplotlib matplotlib.use('Agg') import sys sys.path.append('./tools') import _init_paths import numpy as np import os import argparse import os.path as osp import time from six.moves import xrange import utils.face_utils as face_utils ...
true
true
1c340e1d1cf5c12e33fe0ec46bb8d38eb17ee24d
1,016
py
Python
src/OFS/tests/testLockable.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
289
2015-01-05T12:38:21.000Z
2022-03-05T21:20:39.000Z
src/OFS/tests/testLockable.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
732
2015-02-09T23:35:57.000Z
2022-03-31T09:10:13.000Z
src/OFS/tests/testLockable.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
102
2015-01-12T14:03:35.000Z
2022-03-30T11:02:44.000Z
import unittest from OFS.interfaces import IWriteLock from zope.interface import implementer @implementer(IWriteLock) class LockableResource: def __init__(self, locked): self.locked = locked def wl_isLocked(self): return self.locked class UnlockableResource: pass class TestUtilFunct...
26.736842
58
0.729331
import unittest from OFS.interfaces import IWriteLock from zope.interface import implementer @implementer(IWriteLock) class LockableResource: def __init__(self, locked): self.locked = locked def wl_isLocked(self): return self.locked class UnlockableResource: pass class TestUtilFunct...
true
true
1c340e8db8d7a89fc4a7b2e9665f3d46e309f7d4
1,061
py
Python
git_gopher/DeleteTagRemote.py
derekhamilton/git-gud
7fd377a39796b0aa1268e7ecda6808e8e45173fe
[ "MIT" ]
15
2019-11-13T20:59:53.000Z
2020-12-15T05:21:21.000Z
git_gopher/DeleteTagRemote.py
derekhamilton/git-gud
7fd377a39796b0aa1268e7ecda6808e8e45173fe
[ "MIT" ]
50
2019-10-12T16:57:11.000Z
2019-10-27T21:03:22.000Z
git_gopher/DeleteTagRemote.py
derekhamilton/git-gud
7fd377a39796b0aa1268e7ecda6808e8e45173fe
[ "MIT" ]
1
2019-11-14T03:20:21.000Z
2019-11-14T03:20:21.000Z
from git_gopher.CommandInterface import CommandInterface from git_gopher.HistoryCommandRunner import HistoryCommandRunner from git_gopher.GitDataGetter import GitDataGetter class DeleteTagRemote(CommandInterface): def __init__(self, hist_command_runner: HistoryCommandRunner, git_data_getter: GitDataGetter): ...
42.44
130
0.664467
from git_gopher.CommandInterface import CommandInterface from git_gopher.HistoryCommandRunner import HistoryCommandRunner from git_gopher.GitDataGetter import GitDataGetter class DeleteTagRemote(CommandInterface): def __init__(self, hist_command_runner: HistoryCommandRunner, git_data_getter: GitDataGetter): ...
true
true
1c34115300559310ebe35a731ce334a5b031a186
1,907
py
Python
deepspeech_pytorch/loss.py
welgazil/DeDTW
05d46c68122521dfe706736aaff24d6f99807e6e
[ "MIT" ]
null
null
null
deepspeech_pytorch/loss.py
welgazil/DeDTW
05d46c68122521dfe706736aaff24d6f99807e6e
[ "MIT" ]
null
null
null
deepspeech_pytorch/loss.py
welgazil/DeDTW
05d46c68122521dfe706736aaff24d6f99807e6e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 3 11:53:32 2021 @author: louisbard """ # import numpy as np import torch import torch.nn as nn # import torch.nn.functional as F from deepspeech_pytorch.soft_dtw import SoftDTW from deepspeech_pytorch.gauss import distcos class DTWLosslabels(n...
32.87931
120
0.629261
import torch import torch.nn as nn from deepspeech_pytorch.soft_dtw import SoftDTW from deepspeech_pytorch.gauss import distcos class DTWLosslabels(nn.Module): def __init__(self, representation): super(DTWLosslabels, self).__init__() self.sdtw = SoftDTW(gamma=1.0, normalize=True, dist="cosi...
true
true
1c341224ea77f0c0bf517aac747cfaae30d1066b
4,287
py
Python
tools/lib-alert-tree/lib_alert_tree/prometheus.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
23
2018-03-16T09:06:46.000Z
2018-08-02T00:02:07.000Z
tools/lib-alert-tree/lib_alert_tree/prometheus.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
131
2018-03-13T07:31:34.000Z
2018-08-02T21:57:18.000Z
tools/lib-alert-tree/lib_alert_tree/prometheus.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
4
2018-04-03T07:18:39.000Z
2018-07-02T22:56:56.000Z
"""Classes for storing and serializing Prometheus alert rules.""" import abc import operator import yaml EXACT_MATCH_LABELS = frozenset(["alertstate", "alertname", "severity"]) class Serializable(metaclass=abc.ABCMeta): """Base-class for data serializable into YAML strings.""" @abc.abstractmethod def ...
29.163265
82
0.563798
import abc import operator import yaml EXACT_MATCH_LABELS = frozenset(["alertstate", "alertname", "severity"]) class Serializable(metaclass=abc.ABCMeta): @abc.abstractmethod def serialize(self): return {} def dump(self, out=None): return yaml.safe_dump( self.serialize(), s...
true
true
1c34131c9f689c78e777d6970a99f16b0f8b4b23
512
py
Python
src/Plot_tools/__init__.py
nishantsule/PyRsw
753788608a0d227b5c8dc8b863d85bfc3a907310
[ "MIT" ]
null
null
null
src/Plot_tools/__init__.py
nishantsule/PyRsw
753788608a0d227b5c8dc8b863d85bfc3a907310
[ "MIT" ]
null
null
null
src/Plot_tools/__init__.py
nishantsule/PyRsw
753788608a0d227b5c8dc8b863d85bfc3a907310
[ "MIT" ]
null
null
null
# Plot_tools # This module provides the functions used # for visualizing results from a PyRSW # simulation # Import the plotting tools from Plot_tools.initialize_plots_animsave_1D import initialize_plots_animsave_1D from Plot_tools.initialize_plots_animsave_2D import initialize_plots_animsave_2D from...
39.384615
80
0.849609
from Plot_tools.initialize_plots_animsave_1D import initialize_plots_animsave_1D from Plot_tools.initialize_plots_animsave_2D import initialize_plots_animsave_2D from Plot_tools.initialize_plots_hov import initialize_plots_hov from Plot_tools.plot_hov import plot_hov from Plot_tools.update_hov import update_hov f...
true
true
1c34131f5d8c76c9c56c1b80ea4408150a7a4aab
1,706
py
Python
ooobuild/lo/uno/x_reference.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/uno/x_reference.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/uno/x_reference.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.086957
249
0.732708
from abc import abstractmethod from .x_interface import XInterface as XInterface_8f010a43 class XReference(XInterface_8f010a43): __ooo_ns__: str = 'com.sun.star.uno' __ooo_full_ns__: str = 'com.sun.star.uno.XReference' __ooo_type_name__: str = 'interface' __pyunointerface__: str = '...
true
true
1c3413eb37c6a11a85248a02655f54824f19eeec
17,089
py
Python
tests/test_graceful_reload.py
twu/pypicloud
1ff40b8bcb2f123acab93248368e114cca123504
[ "MIT" ]
336
2016-10-05T14:15:23.000Z
2022-03-17T12:42:10.000Z
tests/test_graceful_reload.py
twu/pypicloud
1ff40b8bcb2f123acab93248368e114cca123504
[ "MIT" ]
215
2016-10-03T20:17:09.000Z
2022-03-29T18:03:46.000Z
tests/test_graceful_reload.py
twu/pypicloud
1ff40b8bcb2f123acab93248368e114cca123504
[ "MIT" ]
104
2016-10-03T18:58:26.000Z
2022-02-10T00:23:28.000Z
""" Tests for gracefully reloading the caches """ import unittest from datetime import timedelta import redis import transaction from mock import MagicMock from pyramid.testing import DummyRequest from sqlalchemy.exc import OperationalError from pypicloud.cache import RedisCache, SQLCache from pypicloud.cache.dynamo ...
37.069414
91
0.6259
import unittest from datetime import timedelta import redis import transaction from mock import MagicMock from pyramid.testing import DummyRequest from sqlalchemy.exc import OperationalError from pypicloud.cache import RedisCache, SQLCache from pypicloud.cache.dynamo import DynamoCache, DynamoPackage, PackageSummary ...
true
true
1c34149b9cfd658fb4f97781ad55439fe6439063
1,442
py
Python
Electronic Station/timeConverter12Hto24H.py
amatsuraki/CheckiO-Elementary-
e041ea41b1f5ff59618c810468dec005bb797883
[ "MIT" ]
null
null
null
Electronic Station/timeConverter12Hto24H.py
amatsuraki/CheckiO-Elementary-
e041ea41b1f5ff59618c810468dec005bb797883
[ "MIT" ]
null
null
null
Electronic Station/timeConverter12Hto24H.py
amatsuraki/CheckiO-Elementary-
e041ea41b1f5ff59618c810468dec005bb797883
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- Coding: utf-8 -*- """ [Time converter 12h to 24h] You are the modern man who prefers the 24-hour time format. But the 12-hour format is used in some places. Your task is to convert the time from the 12-h format into 24-h by following the next rules: - the output format should be 'hh:mm' - ...
28.84
200
0.574896
def time_converter(time): time = time.split(" ") time0 = time[0].split(":") hour = int(time0[0]) minute = time0[1] if time[1] == "a.m.": if hour is not 12: hour = "{0:02d}".format(hour) else: hour = "00" else: if hour is not 12...
true
true
1c3415006f05237c1c53f3c865f96ea8235e73ac
2,684
py
Python
plot_grid.py
jonasvj/TFDE
c5d25947b28524c7a40626f797ca8c157fa70a53
[ "MIT" ]
null
null
null
plot_grid.py
jonasvj/TFDE
c5d25947b28524c7a40626f797ca8c157fa70a53
[ "MIT" ]
null
null
null
plot_grid.py
jonasvj/TFDE
c5d25947b28524c7a40626f797ca8c157fa70a53
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt def tt_params(K, M): return K + 3*M*K**2 def tt_dof(K, M): return (K-1) + M*K*(K-1) + 2*M*K**2 def bic(n, k, nllh_per_sample): log_lh = -1*nllh_per_sample*n return k*np.log(n) - 2*log_lh def aic(...
33.974684
80
0.618107
import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt def tt_params(K, M): return K + 3*M*K**2 def tt_dof(K, M): return (K-1) + M*K*(K-1) + 2*M*K**2 def bic(n, k, nllh_per_sample): log_lh = -1*nllh_per_sample*n return k*np.log(n) - 2*log_lh def aic(n, k, nllh_per_sample)...
true
true
1c341554ac9b7a0b6cb004b22f6f12d6d712fcb7
267
py
Python
jp.atcoder/abc136/abc136_c/12000304.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc136/abc136_c/12000304.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc136/abc136_c/12000304.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys n, *h = map(int, sys.stdin.read().split()) def main(): ans = 'Yes' for i in range(n - 1, 0, -1): if h[i-1] > h[i]: h[i-1] -= 1 if h[i-1] > h[i]: ans = 'No'; break print(ans) if __name__ == '__main__': main()
19.071429
44
0.449438
import sys n, *h = map(int, sys.stdin.read().split()) def main(): ans = 'Yes' for i in range(n - 1, 0, -1): if h[i-1] > h[i]: h[i-1] -= 1 if h[i-1] > h[i]: ans = 'No'; break print(ans) if __name__ == '__main__': main()
true
true
1c34161cb6d656bb855f3974b66bc85b05c6f779
6,909
py
Python
test/test_catalog.py
mickybart/openbrokerapi
a2d57334da0061425731adc4e10376f2123f71f1
[ "MIT" ]
null
null
null
test/test_catalog.py
mickybart/openbrokerapi
a2d57334da0061425731adc4e10376f2123f71f1
[ "MIT" ]
null
null
null
test/test_catalog.py
mickybart/openbrokerapi
a2d57334da0061425731adc4e10376f2123f71f1
[ "MIT" ]
null
null
null
import http from openbrokerapi.catalog import ( ServiceDashboardClient, ServiceMetadata, ServicePlan, ServicePlanCost, ServicePlanMetaData, ) from openbrokerapi.service_broker import Service from test import BrokerTestCase class CatalogTest(BrokerTestCase): service = Service( id="s1",...
38.383333
106
0.4099
import http from openbrokerapi.catalog import ( ServiceDashboardClient, ServiceMetadata, ServicePlan, ServicePlanCost, ServicePlanMetaData, ) from openbrokerapi.service_broker import Service from test import BrokerTestCase class CatalogTest(BrokerTestCase): service = Service( id="s1",...
true
true
1c3416ab88fda022aac2cf4ef1c028fed8372863
427
py
Python
Problem Solving/Search Algorithms/Data Structure Examples/Stack.py
cholazzzb/A-Study-of-AI
b069d536eb344a363d1b042086926d026afc0360
[ "MIT" ]
null
null
null
Problem Solving/Search Algorithms/Data Structure Examples/Stack.py
cholazzzb/A-Study-of-AI
b069d536eb344a363d1b042086926d026afc0360
[ "MIT" ]
null
null
null
Problem Solving/Search Algorithms/Data Structure Examples/Stack.py
cholazzzb/A-Study-of-AI
b069d536eb344a363d1b042086926d026afc0360
[ "MIT" ]
null
null
null
class Stack(object): 'Stack' def __init__(self, build): self.data = [build] print("Stack :", self.data) def push(self, new): self.data.append(new) print("Stack :", self.data) def pop(self): out = self.data.pop(-1) print("Stack :", self.data) ...
17.08
35
0.552693
class Stack(object): def __init__(self, build): self.data = [build] print("Stack :", self.data) def push(self, new): self.data.append(new) print("Stack :", self.data) def pop(self): out = self.data.pop(-1) print("Stack :", self.data) return out ...
true
true
1c34177280393478e3fc7c88fc4d2eed5f5f808e
524
py
Python
backend/home/migrations/0002_homme1.py
crowdbotics-dev/retyetuytrd-dev-23670
ed9bf7a6d019152274452ca82896664771233b81
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0002_homme1.py
crowdbotics-dev/retyetuytrd-dev-23670
ed9bf7a6d019152274452ca82896664771233b81
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0002_homme1.py
crowdbotics-dev/retyetuytrd-dev-23670
ed9bf7a6d019152274452ca82896664771233b81
[ "FTL", "AML", "RSA-MD" ]
null
null
null
# Generated by Django 2.2.26 on 2022-03-11 07:27 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('home', '0001_load_initial_data'), ] operations = [ migrations.CreateModel( name='Homme1', field...
22.782609
114
0.572519
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('home', '0001_load_initial_data'), ] operations = [ migrations.CreateModel( name='Homme1', fields=[ ('id', models.AutoField(auto...
true
true
1c3418889fe5c8db858f699a6da7c157d7e3c801
8,302
py
Python
src/m5r_fancy_iterating.py
munnamn/11-Sequences
8e03697d635fb7121e393402462b1caa341ba45b
[ "MIT" ]
null
null
null
src/m5r_fancy_iterating.py
munnamn/11-Sequences
8e03697d635fb7121e393402462b1caa341ba45b
[ "MIT" ]
null
null
null
src/m5r_fancy_iterating.py
munnamn/11-Sequences
8e03697d635fb7121e393402462b1caa341ba45b
[ "MIT" ]
null
null
null
""" This module shows how to ITERATE (i.e. loop) through a SEQUENCE in ways OTHER than just going thru the sequence from BEGINNING to END. It also shows how to SELECT items in a sequence, e.g.: -- the items that are strings -- the items that are even integers (e.g. 2, 4, 6, ...) Note that: -- SELECTING items th...
34.448133
79
0.503252
true
true
1c3418a9ba18af2f77f23c15c0404c43548e23c4
1,446
py
Python
setup.py
ChaitanyaSinghBisht/PyWhatKit
ff4b876fb8846f3afa4c9a84b1aa1bd676225207
[ "MIT" ]
1
2021-01-27T11:34:24.000Z
2021-01-27T11:34:24.000Z
setup.py
AshleyAlexJacob/PyWhatKit
866f960f6309378959d9a47e1e2d6854952ca273
[ "MIT" ]
3
2021-09-08T03:19:26.000Z
2022-03-12T00:58:05.000Z
setup.py
AshleyAlexJacob/PyWhatKit
866f960f6309378959d9a47e1e2d6854952ca273
[ "MIT" ]
null
null
null
from distutils.core import setup import setuptools def readme(): with open(r'README.md') as f: README = f.read() return README setup( name = 'pywhatkit', packages = setuptools.find_packages(), version = '2.9', license='MIT', description = 'pywhatkit is a Python library...
32.863636
132
0.609267
from distutils.core import setup import setuptools def readme(): with open(r'README.md') as f: README = f.read() return README setup( name = 'pywhatkit', packages = setuptools.find_packages(), version = '2.9', license='MIT', description = 'pywhatkit is a Python library...
true
true
1c341977f01cd73a75c3fd0b665b08c602d34f78
1,857
py
Python
Python-Programs/Sorting Algorithms/pancakeSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
null
null
null
Python-Programs/Sorting Algorithms/pancakeSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
null
null
null
Python-Programs/Sorting Algorithms/pancakeSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
1
2021-10-09T09:51:22.000Z
2021-10-09T09:51:22.000Z
import pygame, sys, random WHITE = (255, 255, 255) BLACK = (0, 0, 0) WIDTH = 720 HEIGHT = 400 win_size = (WIDTH, HEIGHT) pygame.init() win = pygame.display.set_mode(win_size) pygame.display.set_caption('Pancake Sort') clock = pygame.time.Clock() #width of the bars n = 4 w = int(WIDTH/n) h_arr =...
22.925926
116
0.501885
import pygame, sys, random WHITE = (255, 255, 255) BLACK = (0, 0, 0) WIDTH = 720 HEIGHT = 400 win_size = (WIDTH, HEIGHT) pygame.init() win = pygame.display.set_mode(win_size) pygame.display.set_caption('Pancake Sort') clock = pygame.time.Clock() n = 4 w = int(WIDTH/n) h_arr = [] states = [] ...
true
true
1c341a125f820f2c895baafa6db006a93966988e
6,374
py
Python
tempest/api/image/base.py
BeenzSyed/tempest
7a64ee1216d844f6b99928b53f5c665b84cb8719
[ "Apache-2.0" ]
null
null
null
tempest/api/image/base.py
BeenzSyed/tempest
7a64ee1216d844f6b99928b53f5c665b84cb8719
[ "Apache-2.0" ]
null
null
null
tempest/api/image/base.py
BeenzSyed/tempest
7a64ee1216d844f6b99928b53f5c665b84cb8719
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
38.167665
79
0.617038
import cStringIO as StringIO from tempest import clients from tempest.common import isolated_creds from tempest.common.utils import data_utils from tempest import exceptions from tempest.openstack.common import log as logging import tempest.test LOG = logging.getLogger(__name__) class BaseImageTest(te...
true
true
1c341a4206dc737794cdb1f0ff36a1413b41be48
8,291
py
Python
FaceDetection/detector.py
onkarsiyag/face
3437ebb552367e4eb7665a1ae1fe7e025eb47654
[ "MIT" ]
165
2016-04-27T15:04:52.000Z
2022-01-28T16:44:12.000Z
FaceDetection/detector.py
onkarsiyag/face
3437ebb552367e4eb7665a1ae1fe7e025eb47654
[ "MIT" ]
16
2016-09-01T14:01:28.000Z
2020-06-22T14:13:18.000Z
FaceDetection/detector.py
onkarsiyag/face
3437ebb552367e4eb7665a1ae1fe7e025eb47654
[ "MIT" ]
92
2016-04-26T12:36:05.000Z
2022-03-10T09:32:35.000Z
""" Programmer : EOF File : detector.py E-mail : jasonleaster@163.com Date : 2016.01.18 """ from config import TRAINING_IMG_WIDTH from config import TRAINING_IMG_HEIGHT from config import HAAR_FEATURE_TYPE_I from config import HAAR_FEATURE_TYPE_II ...
36.047826
113
0.527801
""" Programmer : EOF File : detector.py E-mail : jasonleaster@163.com Date : 2016.01.18 """ from config import TRAINING_IMG_WIDTH from config import TRAINING_IMG_HEIGHT from config import HAAR_FEATURE_TYPE_I from config import HAAR_FEATURE_TYPE_II ...
false
true
1c341a4678e8e2200ae0b0556e8e280719fa2b93
8,103
py
Python
wrappers/python/virgil_crypto_lib/foundation/aes256_cbc.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
26
2018-12-17T13:45:25.000Z
2022-01-16T20:00:04.000Z
wrappers/python/virgil_crypto_lib/foundation/aes256_cbc.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
4
2019-01-03T12:08:52.000Z
2021-12-02T05:21:13.000Z
wrappers/python/virgil_crypto_lib/foundation/aes256_cbc.py
odidev/virgil-crypto-c
3d5d5cb19fdcf81eab08cdc63647f040117ecbd8
[ "BSD-3-Clause" ]
8
2019-01-24T08:22:06.000Z
2022-02-07T11:37:00.000Z
# Copyright (C) 2015-2021 Virgil Security, 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: # # (1) Redistributions of source code must retain the above copyright # notice, this li...
40.515
117
0.710971
from ctypes import * from ._c_bridge import VscfAes256Cbc from ._c_bridge import VscfImplTag from ._c_bridge import VscfStatus from virgil_crypto_lib.common._c_bridge import Data from virgil_crypto_lib.common._c_bridge import Buffer from .alg import Alg from .encrypt import Encrypt fr...
true
true
1c341b88dfddbd4f7080f9bdde084e142e7f3d29
1,008
py
Python
code/Solution_0447_numberOfBoomerangs.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0447_numberOfBoomerangs.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0447_numberOfBoomerangs.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 09:43:47 2021 @author: qizhe """ class Solution: def numberOfBoomerangs(self, points) -> int: result = 0 for pi in points: distdict = {} for pj in points: dist = (pi[0] - pj[0])**2 + (pi[1] - pj[1])...
24
62
0.499008
class Solution: def numberOfBoomerangs(self, points) -> int: result = 0 for pi in points: distdict = {} for pj in points: dist = (pi[0] - pj[0])**2 + (pi[1] - pj[1])**2 if dist not in distdict: distdict[dist] = 1...
true
true
1c341bbaa6104c7364e7f7be8428c56c2f7c75d0
8,832
py
Python
sdk/python/pulumi_azure/network/virtual_hub_connection.py
adnang/pulumi-azure
32360d2f1e41e27d7fdd6522cb26d65e531f279f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/network/virtual_hub_connection.py
adnang/pulumi-azure
32360d2f1e41e27d7fdd6522cb26d65e531f279f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/network/virtual_hub_connection.py
adnang/pulumi-azure
32360d2f1e41e27d7fdd6522cb26d65e531f279f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Virtua...
61.762238
292
0.733809
import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class VirtualHubConnection(pulumi.CustomResource): hub_to_vitual_network_traffic_allowed: pulumi.Output[bool] internet_security_enabled: pulumi.Output[bool] name: pulumi.Output[str]...
true
true
1c341d52ced8863d3db0904b9b5e9e622394c7a9
2,735
py
Python
CustomExtension.extension/STVTools.tab/MEP Tools.panel/Rotate Fitting.pushbutton/script.py
Melca-G/Aeolus
e014cdbbffc1c650d569efd8750480bc5a4cdc3b
[ "MIT" ]
null
null
null
CustomExtension.extension/STVTools.tab/MEP Tools.panel/Rotate Fitting.pushbutton/script.py
Melca-G/Aeolus
e014cdbbffc1c650d569efd8750480bc5a4cdc3b
[ "MIT" ]
null
null
null
CustomExtension.extension/STVTools.tab/MEP Tools.panel/Rotate Fitting.pushbutton/script.py
Melca-G/Aeolus
e014cdbbffc1c650d569efd8750480bc5a4cdc3b
[ "MIT" ]
null
null
null
import math from Autodesk.Revit.DB import Document, FilteredElementCollector, PerformanceAdviser, FamilySymbol,BuiltInCategory, \ MEPCurveType, RoutingPreferenceRuleGroupType, RoutingConditions, RoutingPreferenceErrorLevel, RoutingPreferenceRule,\ PreferredJunctionType,Transaction, BuiltInParameter, XYZ, Line, ...
32.951807
121
0.757587
import math from Autodesk.Revit.DB import Document, FilteredElementCollector, PerformanceAdviser, FamilySymbol,BuiltInCategory, \ MEPCurveType, RoutingPreferenceRuleGroupType, RoutingConditions, RoutingPreferenceErrorLevel, RoutingPreferenceRule,\ PreferredJunctionType,Transaction, BuiltInParameter, XYZ, Line, ...
false
true
1c341e35933bcdb0812891953bdb7c49dedc7b37
578
py
Python
text/color/_rgb/_rgba.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/color/_rgb/_rgba.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/color/_rgb/_rgba.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
""" *Rgba* The color spectral measure using the RGBA system. """ from dataclasses import dataclass # from wich.measure.spectral import Spectral from .red import Red from .green import Green from .blue import Blue __all__ = [ "Rgba", ] @dataclass class Rgba( # Spectral, # GraphicalColor, ): ...
12.844444
51
0.550173
from dataclasses import dataclass from .red import Red from .green import Green from .blue import Blue __all__ = [ "Rgba", ] @dataclass class Rgba( ): red: Red green: Green blue: Blue @classmethod def create( cls, red: int, green: int, blue: in...
true
true
1c341e9953b24c6332cd370640c276a8aedd7d2e
1,687
py
Python
kontenjan.py
abkkl/me
a0ba942d02c5d503f977c2db62c21e3083c8e5cb
[ "Apache-2.0" ]
null
null
null
kontenjan.py
abkkl/me
a0ba942d02c5d503f977c2db62c21e3083c8e5cb
[ "Apache-2.0" ]
null
null
null
kontenjan.py
abkkl/me
a0ba942d02c5d503f977c2db62c21e3083c8e5cb
[ "Apache-2.0" ]
null
null
null
import mechanize from bs4 import BeautifulSoup import openpyxl import time import ctypes wb = openpyxl.Workbook() ws = wb.active print("Course Capacity Checker Created by Ahmet Bakkal 2022\n") ders = input("Course Code (i.e. END458E):").upper() crn = input("CRN Number (i.e. 21268):") def itukont(ders,...
27.209677
147
0.5246
import mechanize from bs4 import BeautifulSoup import openpyxl import time import ctypes wb = openpyxl.Workbook() ws = wb.active print("Course Capacity Checker Created by Ahmet Bakkal 2022\n") ders = input("Course Code (i.e. END458E):").upper() crn = input("CRN Number (i.e. 21268):") def itukont(ders,...
true
true
1c341ec043178dd20596c680ef1491f1e21f2686
12,564
py
Python
python/ccxt/async_support/base/exchange.py
1Konto/ccxt
817eace045a87b441f009c2303827b3df5e1f339
[ "MIT" ]
null
null
null
python/ccxt/async_support/base/exchange.py
1Konto/ccxt
817eace045a87b441f009c2303827b3df5e1f339
[ "MIT" ]
1
2019-09-19T06:38:21.000Z
2019-09-19T06:38:21.000Z
python/ccxt/async_support/base/exchange.py
1Konto/ccxt
817eace045a87b441f009c2303827b3df5e1f339
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- __version__ = '1.18.1165' # ----------------------------------------------------------------------------- import asyncio import concurrent import socket import time import math import random import certifi import...
41.740864
355
0.610236
__version__ = '1.18.1165' import asyncio import concurrent import socket import time import math import random import certifi import aiohttp import ssl import sys import yarl from ccxt.async_support.base.throttle import throttle from ccxt.base.errors import ExchangeError from ccxt.base.errors import Exchan...
true
true
1c341f0ecec81fd94df513cec1e8797119db1d81
195
py
Python
setup.py
AdamBlomfield/mod_4_project
dad5775535d50ad4d3d9a8cafdc638572d978ca3
[ "RSA-MD" ]
2
2019-06-18T12:57:42.000Z
2019-07-10T15:28:48.000Z
setup.py
AdamBlomfield/mod_4_project
dad5775535d50ad4d3d9a8cafdc638572d978ca3
[ "RSA-MD" ]
null
null
null
setup.py
AdamBlomfield/mod_4_project
dad5775535d50ad4d3d9a8cafdc638572d978ca3
[ "RSA-MD" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='mod_4_final_project', author='far', #license='', )
17.727273
43
0.651282
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='mod_4_final_project', author='far', )
true
true
1c341fc8a17cbd253c660ba3cf5f1ac0c9f71bb8
16,537
py
Python
sans_tools/NotesAppFe.py
Developernation/PythonProjects
d682960d060cb1daede3f2f8e814a5aea05c0ec6
[ "BSD-3-Clause" ]
11
2022-02-12T23:50:27.000Z
2022-03-04T01:24:14.000Z
sans_tools/NotesAppFe.py
Developernation/PythonProjects
d682960d060cb1daede3f2f8e814a5aea05c0ec6
[ "BSD-3-Clause" ]
null
null
null
sans_tools/NotesAppFe.py
Developernation/PythonProjects
d682960d060cb1daede3f2f8e814a5aea05c0ec6
[ "BSD-3-Clause" ]
1
2022-03-27T22:28:37.000Z
2022-03-27T22:28:37.000Z
from tkinter.filedialog import askopenfilename from tkinter.messagebox import showinfo from NotesApp import SansNotesApp as snp from datetime import datetime from tkinter import ttk import tkinter as tk import pandas as pd import os pd.set_option('display.max_rows', None) #database connection notes_db = snp() notes_db...
32.173152
138
0.600774
from tkinter.filedialog import askopenfilename from tkinter.messagebox import showinfo from NotesApp import SansNotesApp as snp from datetime import datetime from tkinter import ttk import tkinter as tk import pandas as pd import os pd.set_option('display.max_rows', None) notes_db = snp() notes_db.database_name = 'sa...
true
true
1c3421c57b17d9a16190870d5ee5157487dc1ffc
5,474
py
Python
gluon/_compat.py
zhiyongwang/web2py
759616e537deb6148b8f32430e214142b4a65261
[ "BSD-3-Clause" ]
null
null
null
gluon/_compat.py
zhiyongwang/web2py
759616e537deb6148b8f32430e214142b4a65261
[ "BSD-3-Clause" ]
null
null
null
gluon/_compat.py
zhiyongwang/web2py
759616e537deb6148b8f32430e214142b4a65261
[ "BSD-3-Clause" ]
null
null
null
import sys import hashlib import os PY2 = sys.version_info[0] == 2 _identity = lambda x: x if PY2: import cPickle as pickle from cStringIO import StringIO import copy_reg as copyreg from HTMLParser import HTMLParser import urlparse from htmlentitydefs import entitydefs, name2codepoint imp...
31.641618
88
0.654183
import sys import hashlib import os PY2 = sys.version_info[0] == 2 _identity = lambda x: x if PY2: import cPickle as pickle from cStringIO import StringIO import copy_reg as copyreg from HTMLParser import HTMLParser import urlparse from htmlentitydefs import entitydefs, name2codepoint imp...
true
true
1c3421ddc32d9035bd1863f644152cdb8cfd4a61
6,610
py
Python
django_sass_finder/finders.py
Tru-Dev/django_sass_finder
2541e30b1167abd4154ed946aaae7531d3f2a94a
[ "MIT" ]
1
2020-10-24T23:17:18.000Z
2020-10-24T23:17:18.000Z
django_sass_finder/finders.py
Tru-Dev/django_sass_finder
2541e30b1167abd4154ed946aaae7531d3f2a94a
[ "MIT" ]
2
2021-09-13T09:41:16.000Z
2021-09-17T15:56:24.000Z
django_sass_finder/finders.py
Tru-Dev/django_sass_finder
2541e30b1167abd4154ed946aaae7531d3f2a94a
[ "MIT" ]
3
2021-04-13T18:16:45.000Z
2021-09-12T12:05:34.000Z
# -*- coding: utf-8 -*- import stat from pathlib import Path import sass from django.apps import apps from django.conf import settings from django.contrib.staticfiles.finders import FileSystemFinder, AppDirectoriesFinder, BaseFinder from django.core.checks import Error from django.core.files.storage import FileSystem...
38.208092
103
0.581997
import stat from pathlib import Path import sass from django.apps import apps from django.conf import settings from django.contrib.staticfiles.finders import FileSystemFinder, AppDirectoriesFinder, BaseFinder from django.core.checks import Error from django.core.files.storage import FileSystemStorage __all__ = ( ...
true
true
1c34231126a265909f39756cbb8e3e90cd5157cc
652
py
Python
pywikibot/compat/userlib.py
notconfusing/pywikibot-fr-welcome-bot
6e07b7e74166a47c9425816e79786308df369ac2
[ "MIT" ]
1
2020-01-03T11:52:01.000Z
2020-01-03T11:52:01.000Z
pywikibot/compat/userlib.py
notconfusing/pywikibot-fr-welcome-bot
6e07b7e74166a47c9425816e79786308df369ac2
[ "MIT" ]
2
2019-11-07T13:46:32.000Z
2019-11-07T14:20:53.000Z
pywikibot/compat/userlib.py
notconfusing/pywikibot-fr-welcome-bot
6e07b7e74166a47c9425816e79786308df369ac2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ WARNING: THIS MODULE EXISTS SOLELY TO PROVIDE BACKWARDS-COMPATIBILITY. Do not use in new scripts; use the source to find the appropriate function/method instead. """ # # (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_impo...
26.08
70
0.707055
from __future__ import absolute_import, division, unicode_literals from pywikibot.page import User from pywikibot.tools import ModuleDeprecationWrapper __all__ = ('User',) wrapper = ModuleDeprecationWrapper(__name__) wrapper._add_deprecated_attr('User', replacement_name='pywikibot....
true
true
1c34234f58c4cfb7a22a62835900d0f0b2695b61
13,645
py
Python
thrift/compiler/test/fixtures/complex-union/gen-py3lite/module/lite_metadata.py
dgrnbrg-meta/fbthrift
1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed
[ "Apache-2.0" ]
null
null
null
thrift/compiler/test/fixtures/complex-union/gen-py3lite/module/lite_metadata.py
dgrnbrg-meta/fbthrift
1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed
[ "Apache-2.0" ]
1
2022-03-03T09:40:25.000Z
2022-03-03T09:40:25.000Z
thrift/compiler/test/fixtures/complex-union/gen-py3lite/module/lite_metadata.py
dgrnbrg-meta/fbthrift
1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Thrift # # DO NOT EDIT # @generated # import apache.thrift.metadata.lite_types as _fbthrift_metadata # TODO (ffrancet): This general pattern can be optimized by using tuples and dicts # instead of re-generating thrift structs def _fbthrift_gen_metadata_struct_ComplexUnion(metadata_struct: _fbthr...
54.36255
403
0.785196
import apache.thrift.metadata.lite_types as _fbthrift_metadata def _fbthrift_gen_metadata_struct_ComplexUnion(metadata_struct: _fbthrift_metadata.ThriftMetadata) -> _fbthrift_metadata.ThriftMetadata: qualified_name = "module.ComplexUnion" if qualified_name in metadata_struct.structs: return m...
true
true
1c3423996610ed84883be5d37c04c4b1a7904461
10,743
py
Python
src/pystockwatch/pystockwatch.py
UBC-MDS/Pystockwatch
4c72dae96d392cf2681b043db6e2fd440c936e49
[ "MIT" ]
null
null
null
src/pystockwatch/pystockwatch.py
UBC-MDS/Pystockwatch
4c72dae96d392cf2681b043db6e2fd440c936e49
[ "MIT" ]
55
2022-01-13T08:26:19.000Z
2022-02-05T11:24:07.000Z
src/pystockwatch/pystockwatch.py
UBC-MDS/Pystockwatch
4c72dae96d392cf2681b043db6e2fd440c936e49
[ "MIT" ]
1
2022-01-29T19:33:30.000Z
2022-01-29T19:33:30.000Z
# authors: Affrin Sultana, Helin Wang, Shi Yan Wang and Pavel Levchenko # January,2022 # import plotly.express as px import plotly.graph_objects as go import altair as alt import pandas as pd import numpy as np import yfinance as yf import pandas_datareader as pdr import datetime import warnings alt.renderers.enable('...
35.572848
164
0.626361
import plotly.graph_objects as go import altair as alt import pandas as pd import numpy as np import yfinance as yf import pandas_datareader as pdr import datetime import warnings alt.renderers.enable('altair_viewer') def percent_change(stock_ticker, start_date, end_date): ticker = yf.Ticker(stock_ti...
true
true
1c3423a4b26e69f635ef04ef776574436569154e
2,900
py
Python
npxconv.py
LeeTehi/nnvolterra
d6a084d2f5b4b716423cb4b952cf58a09ea84c23
[ "MIT" ]
1
2021-11-28T17:16:57.000Z
2021-11-28T17:16:57.000Z
npxconv.py
LeeTehi/nnvolterra
d6a084d2f5b4b716423cb4b952cf58a09ea84c23
[ "MIT" ]
null
null
null
npxconv.py
LeeTehi/nnvolterra
d6a084d2f5b4b716423cb4b952cf58a09ea84c23
[ "MIT" ]
null
null
null
import libnpxconv as libx import numpy as np # params for libx (sedt, kernel, srcx, /, padleft, stride) def conv_ordern(ker, *src, oshape=None, padleft=0, stride=1): if len(src) == 1: src = src[0] if oshape is None: if isinstance(src, (list, tuple)): assert np.ndim(ker) == len(sr...
29
72
0.553103
import libnpxconv as libx import numpy as np def conv_ordern(ker, *src, oshape=None, padleft=0, stride=1): if len(src) == 1: src = src[0] if oshape is None: if isinstance(src, (list, tuple)): assert np.ndim(ker) == len(src) oshape = np.min([np.min(s.shape) for s in s...
true
true
1c3423dccd807fb1332a750f36dae9ff22191dc5
92,796
py
Python
unittests/test_rest_framework.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
null
null
null
unittests/test_rest_framework.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
206
2020-04-20T16:03:18.000Z
2022-01-15T23:07:48.000Z
unittests/test_rest_framework.py
maerifat/django-DefectDojo
ba1a415219ff20e8b4e909ef14f750de9b80297e
[ "BSD-3-Clause" ]
1
2020-12-06T15:44:44.000Z
2020-12-06T15:44:44.000Z
from collections import OrderedDict from drf_spectacular.drainage import GENERATOR_STATS # from drf_spectacular.renderers import OpenApiJsonRenderer from unittest.mock import call, patch, ANY from dojo.models import Product, Engagement, Test, Finding, \ JIRA_Issue, Tool_Product_Settings, Tool_Configuration, Tool_Ty...
40.504583
140
0.621255
from collections import OrderedDict from drf_spectacular.drainage import GENERATOR_STATS from unittest.mock import call, patch, ANY from dojo.models import Product, Engagement, Test, Finding, \ JIRA_Issue, Tool_Product_Settings, Tool_Configuration, Tool_Type, \ User, Stub_Finding, Endpoint, JIRA_Project, JIRA_...
true
true
1c34242f0b455f83fd1b2afa16dbd1a4e385d199
18,161
py
Python
Civ4/Assets/Python/Screens/CvReligionScreen.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
Civ4/Assets/Python/Screens/CvReligionScreen.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
Civ4/Assets/Python/Screens/CvReligionScreen.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
## Sid Meier's Civilization 4 ## Copyright Firaxis Games 2005 from CvPythonExtensions import * import PyHelpers import CvUtil import ScreenInput import CvScreenEnums PyPlayer = PyHelpers.PyPlayer # globals gc = CyGlobalContext() ArtFileMgr = CyArtFileMgr() localText = CyTranslator() class CvReligionSc...
45.176617
358
0.729035
005 from CvPythonExtensions import * import PyHelpers import CvUtil import ScreenInput import CvScreenEnums PyPlayer = PyHelpers.PyPlayer # globals gc = CyGlobalContext() ArtFileMgr = CyArtFileMgr() localText = CyTranslator() class CvReligionScreen: def __init__(self): self.SCREEN_NAME = "Re...
true
true
1c34246ce637530967a2bee08f523a8a7a9369c3
320
py
Python
fdk_client/platform/models/Closing.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/Closing.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/Closing.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema class Closing(BaseSchema): # Order swagger.json hour = fields.Int(required=False) minute = fields.Int(required=False)
14.545455
42
0.7
from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema class Closing(BaseSchema): hour = fields.Int(required=False) minute = fields.Int(required=False)
true
true
1c342489fb983dedab183c7013a31c7de3874fc7
456
py
Python
thecut/pages/migrations/0003_auto_20160211_1514.py
exemplarysoftware/thecut-pagse
94126622ec790721b0a05db0742bbc4c6733ba2c
[ "Apache-2.0" ]
null
null
null
thecut/pages/migrations/0003_auto_20160211_1514.py
exemplarysoftware/thecut-pagse
94126622ec790721b0a05db0742bbc4c6733ba2c
[ "Apache-2.0" ]
null
null
null
thecut/pages/migrations/0003_auto_20160211_1514.py
exemplarysoftware/thecut-pagse
94126622ec790721b0a05db0742bbc4c6733ba2c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pages', '0002_set_ondelete'), ] operations = [ migrations.AlterField( model_name='page', name='url',...
22.8
117
0.614035
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pages', '0002_set_ondelete'), ] operations = [ migrations.AlterField( model_name='page', name='url', field=mode...
true
true
1c3424aa4b61bdff7606f6972ad265b4e7b500d6
5,469
py
Python
scripts/e271.py
JackKelly/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
38
2015-08-14T14:38:52.000Z
2021-12-15T03:21:04.000Z
scripts/e271.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
null
null
null
scripts/e271.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
26
2015-09-24T20:55:26.000Z
2021-12-07T15:42:09.000Z
from __future__ import print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer from neuralnilm.net import BidirectionalRecurrentLayer from lasagne.nonlinearities import sigmoid, r...
26.678049
109
0.674163
from __future__ import print_function, division import matplotlib matplotlib.use('Agg') from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer from neuralnilm.net import BidirectionalRecurrentLayer from lasagne.nonlinearities import sigmoid, rectify, tanh from lasagne.objectives import crossentro...
true
true
1c3425cee571a808d9c84539b9ebe5165cfce67e
1,134
py
Python
tests/test_set_attr.py
joinee0208/manim
8e1407e7fd5c01258f75748cc947d31d67ffd92b
[ "MIT" ]
null
null
null
tests/test_set_attr.py
joinee0208/manim
8e1407e7fd5c01258f75748cc947d31d67ffd92b
[ "MIT" ]
null
null
null
tests/test_set_attr.py
joinee0208/manim
8e1407e7fd5c01258f75748cc947d31d67ffd92b
[ "MIT" ]
null
null
null
from __future__ import annotations import numpy as np from manim import config from manim.constants import RIGHT from manim.mobject.geometry import Square def test_Data(): config.renderer = "opengl" a = Square().move_to(RIGHT) data_bb = a.data["bounding_box"] assert np.array_equal( data_bb, ...
26.372093
88
0.62522
from __future__ import annotations import numpy as np from manim import config from manim.constants import RIGHT from manim.mobject.geometry import Square def test_Data(): config.renderer = "opengl" a = Square().move_to(RIGHT) data_bb = a.data["bounding_box"] assert np.array_equal( data_bb, ...
true
true
1c3426d04076f8ffbda91a465f8b7007e6e7c23c
13,436
py
Python
userbot/plugins/stickers.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
userbot/plugins/stickers.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
userbot/plugins/stickers.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
"""Make / Download Telegram Sticker Packs without installing Third Party applications Available Commands: .kangsticker [Optional Emoji] .packinfo .getsticker""" from telethon import events from io import BytesIO from PIL import Image import asyncio import datetime from collections import defaultdict import m...
39.751479
143
0.620572
from telethon import events from io import BytesIO from PIL import Image import asyncio import datetime from collections import defaultdict import math import os import requests import zipfile from telethon.errors.rpcerrorlist import StickersetInvalidError from telethon.errors import MessageNotModifiedError ...
true
true
1c3427370eeee82128768c3f43bb6fff1f493fe1
20,617
py
Python
keystoneclient/shell.py
citrix-openstack-build/python-keystoneclient
e170955d6de5cbf521d54105bdefaf606ccdb356
[ "Apache-1.1" ]
null
null
null
keystoneclient/shell.py
citrix-openstack-build/python-keystoneclient
e170955d6de5cbf521d54105bdefaf606ccdb356
[ "Apache-1.1" ]
null
null
null
keystoneclient/shell.py
citrix-openstack-build/python-keystoneclient
e170955d6de5cbf521d54105bdefaf606ccdb356
[ "Apache-1.1" ]
null
null
null
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
41.482897
79
0.51962
from __future__ import print_function import argparse import getpass import os import sys import keystoneclient from keystoneclient import access from keystoneclient.contrib.bootstrap import shell as shell_bootstrap from keystoneclient import exceptions as exc from keystoneclient.generic import shel...
true
true
1c3427fc0b2f89af9bf052f3f2803cfd4c032dfd
7,351
py
Python
bccs_dump.py
sasquatch-jr/bcldb_wholesale_cannabis_price_list
c39b6172a1ed34945361774a6cc0024e7a1393c1
[ "MIT" ]
8
2021-02-12T03:00:08.000Z
2021-12-19T21:18:17.000Z
bccs_dump.py
sasquatch-jr/bcldb_wholesale_cannabis_price_list
c39b6172a1ed34945361774a6cc0024e7a1393c1
[ "MIT" ]
null
null
null
bccs_dump.py
sasquatch-jr/bcldb_wholesale_cannabis_price_list
c39b6172a1ed34945361774a6cc0024e7a1393c1
[ "MIT" ]
6
2021-02-12T03:00:10.000Z
2021-02-24T03:05:53.000Z
import csv import time import jinja2 import requests from datetime import datetime template = """<html> <head><title>BCLDB Wholesale Cannabis Price List</title></head> <body> <h1>BCLDB Wholesale Cannabis Price List</h1> <h2><a href="https://github.com/sasquatch-jr/bcldb_wholesale_cannabis_price_list/blob/main/README...
41.067039
492
0.543736
import csv import time import jinja2 import requests from datetime import datetime template = """<html> <head><title>BCLDB Wholesale Cannabis Price List</title></head> <body> <h1>BCLDB Wholesale Cannabis Price List</h1> <h2><a href="https://github.com/sasquatch-jr/bcldb_wholesale_cannabis_price_list/blob/main/README...
true
true
1c3429d36012e6fbbc3345c7e7d976ddbaa9eef1
1,966
py
Python
waveconverter.py
SMMoseley/Background_Colony_Noise
eb88ccf725939d501f02854b4c82659e8f6d5a3a
[ "MIT" ]
null
null
null
waveconverter.py
SMMoseley/Background_Colony_Noise
eb88ccf725939d501f02854b4c82659e8f6d5a3a
[ "MIT" ]
null
null
null
waveconverter.py
SMMoseley/Background_Colony_Noise
eb88ccf725939d501f02854b4c82659e8f6d5a3a
[ "MIT" ]
null
null
null
##Packages## import h5py as h5 import numpy as np import pandas as pd import os import ewave ##Functions## def wav_intervals(csv, sample_rate, hour_to_sample_rate): for row in csv.itertuples(): #iterates through each row in the csv file arf_file = row[0] start_time = row[1]*hour_to_sample_rate #tak...
50.410256
227
0.725331
s h5 import numpy as np import pandas as pd import os import ewave als(csv, sample_rate, hour_to_sample_rate): for row in csv.itertuples(): arf_file = row[0] start_time = row[1]*hour_to_sample_rate duration = row[2]*sample_rate return arf_file, start_time, duration def wavda...
true
true
1c342a98c9f0dd3f9df730fa05eb9f4315d5f656
503
py
Python
leetcode/algorithm/roman_int.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
1
2018-12-19T22:07:56.000Z
2018-12-19T22:07:56.000Z
leetcode/algorithm/roman_int.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
12
2020-03-14T05:32:26.000Z
2022-03-12T00:08:49.000Z
leetcode/algorithm/roman_int.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
1
2018-12-19T22:08:00.000Z
2018-12-19T22:08:00.000Z
""" @author: magician @date: 2019/12/18 @file: roman_int.py """ def roman_to_int(s: str) -> int: """ roman_to_int :param s: :return: """ roman_dict = { 'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000, '...
14.371429
39
0.399602
def roman_to_int(s: str) -> int: roman_dict = { 'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000, 'IV': 4, 'XL': 40, 'XC': 90, 'CD': 400, 'CM': 900, } return True if __name__ == '__main__': ...
true
true
1c342aefb37a2171edc1cc7cf09da1834a0464a8
2,461
py
Python
examples/bank_reserves/bank_reserves/server.py
DoofCoder/mesa
b290439e4f68a1a5a4906246546b69e7d783dcfb
[ "Apache-2.0" ]
2
2017-05-30T02:46:20.000Z
2017-07-18T19:42:33.000Z
examples/bank_reserves/bank_reserves/server.py
DoofCoder/mesa
b290439e4f68a1a5a4906246546b69e7d783dcfb
[ "Apache-2.0" ]
40
2019-08-07T13:57:52.000Z
2022-03-18T05:21:42.000Z
examples/bank_reserves/bank_reserves/server.py
DoofCoder/mesa
b290439e4f68a1a5a4906246546b69e7d783dcfb
[ "Apache-2.0" ]
2
2017-07-17T15:25:41.000Z
2022-03-31T07:00:41.000Z
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid, ChartModule from mesa.visualization.UserParam import UserSettableParameter from bank_reserves.agents import Person from bank_reserves.model import BankReserves """ Citation: The following code was adapt...
26.462366
88
0.663145
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid, ChartModule from mesa.visualization.UserParam import UserSettableParameter from bank_reserves.agents import Person from bank_reserves.model import BankReserves RICH_COLOR = "#46FF33" POOR_COLOR = "#F...
true
true
1c342be00019af11edb90f23f188a1168dbdeff5
91
py
Python
thirdparty/his_evaluators/his_evaluators/__init__.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
1
2020-05-11T19:10:27.000Z
2020-05-11T19:10:27.000Z
thirdparty/his_evaluators/his_evaluators/__init__.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
4
2020-05-11T19:12:18.000Z
2021-10-12T22:52:12.000Z
thirdparty/his_evaluators/his_evaluators/__init__.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
1
2020-05-27T01:59:41.000Z
2020-05-27T01:59:41.000Z
from .evaluators.motion_imitation import MotionImitationModel, IPERMotionImitationEvaluator
91
91
0.923077
from .evaluators.motion_imitation import MotionImitationModel, IPERMotionImitationEvaluator
true
true
1c342c58860d1a2185286318dccd14166af7af0f
94,847
py
Python
plugins/modules/oci_compute_management_instance_configuration_actions.py
sohwaje/oci-ansible-collection
9e6b8cf55e596a96560710a457a7df05886fc59c
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_compute_management_instance_configuration_actions.py
sohwaje/oci-ansible-collection
9e6b8cf55e596a96560710a457a7df05886fc59c
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_compute_management_instance_configuration_actions.py
sohwaje/oci-ansible-collection
9e6b8cf55e596a96560710a457a7df05886fc59c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
52.056531
160
0.49155
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_compute_management_instance_configuration_actions short_description: Per...
true
true
1c342deba119b31588f50bdd551a7d92b6156a77
9,947
py
Python
huskar_api/api/webhook.py
mowangdk/huskar
7692fbc5672a5ae6e2a33616c493466a7137f8cd
[ "MIT" ]
59
2019-10-31T10:50:10.000Z
2021-11-26T04:32:25.000Z
huskar_api/api/webhook.py
mowangdk/huskar
7692fbc5672a5ae6e2a33616c493466a7137f8cd
[ "MIT" ]
5
2019-10-31T10:37:30.000Z
2020-03-02T06:45:46.000Z
huskar_api/api/webhook.py
mowangdk/huskar
7692fbc5672a5ae6e2a33616c493466a7137f8cd
[ "MIT" ]
9
2019-10-31T10:35:00.000Z
2019-12-01T14:13:58.000Z
from __future__ import absolute_import import logging import itertools from operator import attrgetter from flask import request, abort, g from flask.views import MethodView from huskar_api.models.webhook import Webhook from huskar_api.models.audit import action_types from huskar_api.models.auth import Application, ...
35.909747
79
0.602493
from __future__ import absolute_import import logging import itertools from operator import attrgetter from flask import request, abort, g from flask.views import MethodView from huskar_api.models.webhook import Webhook from huskar_api.models.audit import action_types from huskar_api.models.auth import Application, ...
true
true
1c342e2d9df2872b510289962bb26ccf755e777c
36,357
py
Python
ios/dateparser/lib/python2.7/site-packages/jdatetime/__init__.py
mpercich/Calendarize
d658962d5d205f878afd9876cb64b5381964f112
[ "MIT" ]
null
null
null
ios/dateparser/lib/python2.7/site-packages/jdatetime/__init__.py
mpercich/Calendarize
d658962d5d205f878afd9876cb64b5381964f112
[ "MIT" ]
null
null
null
ios/dateparser/lib/python2.7/site-packages/jdatetime/__init__.py
mpercich/Calendarize
d658962d5d205f878afd9876cb64b5381964f112
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # jdatetime is (c) 2010-2011 Milad Rastian <eslashmili at gmail.com>. # The jdatetime module was contributed to Python as of Python 2.7 and thus # was licensed under the Python license. Same license applies to all files in # the jdatetime package project. from __future__ import unicode_literals ...
32.724572
207
0.510191
from __future__ import unicode_literals import datetime as py_datetime import sys from jdatetime.jalali import \ GregorianToJalali, JalaliToGregorian, j_days_in_month import re as _re import locale as _locale __VERSION__ = "1.8.1" MINYEAR = 1 MAXYEAR = 9377 timedelta = py_datetime.timedelta tzinfo = py_dateti...
true
true
1c342e64716b7de1c47b236f6f33e3aabef1b660
5,148
py
Python
purity_fb/purity_fb_1dot10/models/smtp.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
5
2017-09-08T20:47:22.000Z
2021-06-29T02:11:05.000Z
purity_fb/purity_fb_1dot10/models/smtp.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
16
2017-11-27T20:57:48.000Z
2021-11-23T18:46:43.000Z
purity_fb/purity_fb_1dot10/models/smtp.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
22
2017-10-13T15:33:05.000Z
2021-11-08T19:56:21.000Z
# coding: utf-8 """ Pure Storage FlashBlade REST 1.10 Python SDK Pure Storage FlashBlade REST 1.10 Python SDK. Compatible with REST API versions 1.0 - 1.10. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/...
28.759777
251
0.578671
import pprint import re import six class Smtp(object): __test__ = False swagger_types = { 'name': 'str', 'relay_host': 'str', 'sender_domain': 'str' } attribute_map = { 'name': 'name', 'relay_host': 'relay_host', 'sender_domain': 'sender...
true
true
1c342f10cd788b23e6e565736edc76b12871c407
10,337
py
Python
app/api/services/game_services/service.py
Glyphack/tortuga
42444a850c7587a01b75a2b13fae4a37e38ab79b
[ "MIT" ]
5
2020-03-14T13:22:40.000Z
2021-07-12T11:55:18.000Z
app/api/services/game_services/service.py
Glyphack/tortuga
42444a850c7587a01b75a2b13fae4a37e38ab79b
[ "MIT" ]
10
2020-04-01T16:28:49.000Z
2021-02-27T09:06:07.000Z
app/api/services/game_services/service.py
Glyphack/tortuga
42444a850c7587a01b75a2b13fae4a37e38ab79b
[ "MIT" ]
null
null
null
import random from typing import List, Dict from app.api.services import lobby_service from app.models.event_cards import EventCardsManager from app.models.game import Game, Player, Chests from app.api.services.game_services.event_card_handlers import \ event_card_handlers from app.models import votes from app.mod...
36.017422
113
0.666054
import random from typing import List, Dict from app.api.services import lobby_service from app.models.event_cards import EventCardsManager from app.models.game import Game, Player, Chests from app.api.services.game_services.event_card_handlers import \ event_card_handlers from app.models import votes from app.mod...
true
true
1c342fdd5e86a0696cbbcecc591d7d4c967aef01
4,183
py
Python
SymPy Stuff That Didn't Make it in.py
asmeurer/Miscellaneous-Useful-Scripts
b3f902ce1088a88e916d8744887fe0d79df2f950
[ "MIT" ]
1
2016-07-25T17:22:03.000Z
2016-07-25T17:22:03.000Z
SymPy Stuff That Didn't Make it in.py
asmeurer/Miscellaneous-Useful-Scripts
b3f902ce1088a88e916d8744887fe0d79df2f950
[ "MIT" ]
null
null
null
SymPy Stuff That Didn't Make it in.py
asmeurer/Miscellaneous-Useful-Scripts
b3f902ce1088a88e916d8744887fe0d79df2f950
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # SymPy Stuff That Didn't Make it in.py """ This is a collection of stuff that I wrote that didn't make it into SymPy for whatever reason. I spent too much time on these things to just delete them entirely. Aaron Meurer """ # Bad algorithm (slow). Now done by expand(mul) def distribute(expr...
33.733871
100
0.58164
""" This is a collection of stuff that I wrote that didn't make it into SymPy for whatever reason. I spent too much time on these things to just delete them entirely. Aaron Meurer """ def distribute(expr): """ Recursively takes a Mul with Adds and turns it into just an Add of Muls This should probabl...
false
true
1c342ff6f76ccebd538d0b8709c2672cdf7a8d9d
3,145
py
Python
image2emoticon/prepare_data.py
Tobigs-team/EmoGET_tobigticon
4b13d6a780bbe269a9c285cc603b16b09d459edf
[ "Apache-2.0" ]
11
2021-01-21T12:53:30.000Z
2022-03-04T17:03:08.000Z
image2emoticon/prepare_data.py
Tobigs-team/EmoGET_tobigticon
4b13d6a780bbe269a9c285cc603b16b09d459edf
[ "Apache-2.0" ]
null
null
null
image2emoticon/prepare_data.py
Tobigs-team/EmoGET_tobigticon
4b13d6a780bbe269a9c285cc603b16b09d459edf
[ "Apache-2.0" ]
8
2021-01-25T07:30:41.000Z
2021-11-05T08:53:26.000Z
import argparse from io import BytesIO import multiprocessing from functools import partial from PIL import Image import lmdb from tqdm import tqdm from torchvision import datasets from torchvision.transforms import functional as trans_fn import numpy as np def resize_and_convert(img, size, resample, quality=100): ...
29.669811
95
0.644197
import argparse from io import BytesIO import multiprocessing from functools import partial from PIL import Image import lmdb from tqdm import tqdm from torchvision import datasets from torchvision.transforms import functional as trans_fn import numpy as np def resize_and_convert(img, size, resample, quality=100): ...
true
true
1c3431e073f430407c8ba92511837ef293c7f6b3
1,097
py
Python
utils/politeness.py
petarGitNik/reddit-image-downloader
e38ddaf225a47d85a0d91785eb22b80c42e886dc
[ "MIT" ]
3
2019-03-29T22:09:13.000Z
2019-05-24T07:58:52.000Z
utils/politeness.py
petarGitNik/reddit-image-downloader
e38ddaf225a47d85a0d91785eb22b80c42e886dc
[ "MIT" ]
null
null
null
utils/politeness.py
petarGitNik/reddit-image-downloader
e38ddaf225a47d85a0d91785eb22b80c42e886dc
[ "MIT" ]
1
2020-07-13T14:56:14.000Z
2020-07-13T14:56:14.000Z
#!/usr/bin/python3 from math import log from math import exp from domainparsers.common import Domains def get_politeness_factor(domain): """ Return politeness factor for reddit.com domain. Calculated according to instructions given here: https://stackoverflow.com/questions/8236046/typical-politenes...
31.342857
134
0.692799
from math import log from math import exp from domainparsers.common import Domains def get_politeness_factor(domain): if not domain or domain not in Domains.domains(): domain = 'other' DOMAIN_AUTHORITY = { Domains.REDDIT : 99, Domains.IMGUR : 93, Domains.GFYCAT : 70, ...
true
true
1c343246da538f3a1d8854fff17357ff6666fcc3
7,733
py
Python
tests/test_planner.py
tylernorth/public-transit
e2430078557adf9d2ad03d794ea551a7b06ce145
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_planner.py
tylernorth/public-transit
e2430078557adf9d2ad03d794ea551a7b06ce145
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_planner.py
tylernorth/public-transit
e2430078557adf9d2ad03d794ea551a7b06ce145
[ "BSD-2-Clause-FreeBSD" ]
3
2017-03-17T11:54:09.000Z
2022-01-21T05:07:16.000Z
from trip_planner.client import TripPlanner MOCK_BART_STATION_LIST = { 'stations': { 'station': [ { "name": "West Oakland", "abbr": "WOAK", "gtfs_latitude": "37.804872", "gtfs_longitude": "-122.295140", "address": "...
33.916667
116
0.428812
from trip_planner.client import TripPlanner MOCK_BART_STATION_LIST = { 'stations': { 'station': [ { "name": "West Oakland", "abbr": "WOAK", "gtfs_latitude": "37.804872", "gtfs_longitude": "-122.295140", "address": "...
true
true
1c34327b9840461dfff1bdc4c54eb17e155d6d86
3,618
py
Python
darrow/settings.py
grrdsoto/darrow
cdf818bbea9d2eb715f8834a93ca91c8dff72872
[ "MIT" ]
null
null
null
darrow/settings.py
grrdsoto/darrow
cdf818bbea9d2eb715f8834a93ca91c8dff72872
[ "MIT" ]
6
2020-06-05T19:57:14.000Z
2021-09-22T18:04:37.000Z
darrow/settings.py
grrdsoto/darrow
cdf818bbea9d2eb715f8834a93ca91c8dff72872
[ "MIT" ]
null
null
null
""" Django settings for darrow project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # ...
26.217391
91
0.691266
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ.get('SECRET_KEY') DEBUG = True ALLOWED_HOSTS = ['darrow-gstr410.herokuapp.com', '127.0.0.1', 'localhost'] # Application definition INSTALLED_APPS = [ 'chat', 'channels', 'django.contrib.adm...
true
true
1c34339b65ab717b297a70f6ed3dbebf86844de9
2,838
py
Python
setup.py
vsajip/sarge
6200d310b2a0173026554cd2a9a48fa9374985c5
[ "BSD-3-Clause" ]
35
2015-03-09T20:41:02.000Z
2022-03-12T10:29:06.000Z
setup.py
vsajip/sarge
6200d310b2a0173026554cd2a9a48fa9374985c5
[ "BSD-3-Clause" ]
7
2019-10-23T12:34:37.000Z
2022-01-14T18:52:36.000Z
setup.py
vsajip/sarge
6200d310b2a0173026554cd2a9a48fa9374985c5
[ "BSD-3-Clause" ]
5
2015-11-07T17:20:39.000Z
2021-10-03T19:31:16.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2021 Vinay M. Sajip. See LICENSE for licensing information. # # sarge: Subprocess Allegedly Rewards Good Encapsulation :-) # from distutils.core import setup, Command import os from os.path import join, dirname, abspath import re import sarge class TestCommand(Command):...
32.62069
80
0.617689
from distutils.core import setup, Command import os from os.path import join, dirname, abspath import re import sarge class TestCommand(Command): user_options = [] def run(self): import sys import unittest import test_sarge loader = unittest.TestLoader() runner...
true
true
1c3433b0433f82f09778b10d863693ac5a55692c
2,193
py
Python
filync/filync.py
xsyu94/fiLync
96c20624371cd04d3922eda6d14eedfca9a59ab1
[ "MIT" ]
null
null
null
filync/filync.py
xsyu94/fiLync
96c20624371cd04d3922eda6d14eedfca9a59ab1
[ "MIT" ]
null
null
null
filync/filync.py
xsyu94/fiLync
96c20624371cd04d3922eda6d14eedfca9a59ab1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' main class of the filync Author: Xiansheng Yu Data : 2021.05.18 ''' import os import shutil import filync.tools as tools class filync: def __init__(self, source_path='./', goal_path='./', ignores=['.git', '.vscode']) -> None: ...
31.328571
76
0.561332
import os import shutil import filync.tools as tools class filync: def __init__(self, source_path='./', goal_path='./', ignores=['.git', '.vscode']) -> None: self.source_path = source_path self.goal_path = goal_path if (self.source_path[-...
true
true
1c3434c8d5a9453f4f0be8b719dbb00378a8eb7b
16,392
py
Python
common/battor/battor/battor_wrapper.py
pavelfeldman/catapult
a62e07f8660650e000a8112c50bcb67258a201f2
[ "BSD-3-Clause" ]
1
2021-03-16T14:33:43.000Z
2021-03-16T14:33:43.000Z
common/battor/battor/battor_wrapper.py
hikecoder/catapult
a62e07f8660650e000a8112c50bcb67258a201f2
[ "BSD-3-Clause" ]
null
null
null
common/battor/battor/battor_wrapper.py
hikecoder/catapult
a62e07f8660650e000a8112c50bcb67258a201f2
[ "BSD-3-Clause" ]
1
2021-03-14T23:44:40.000Z
2021-03-14T23:44:40.000Z
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import atexit import datetime import os import logging import platform import random import subprocess import sys import tempfile import time from battor im...
38.032483
80
0.693204
import atexit import datetime import os import logging import platform import random import subprocess import sys import tempfile import time from battor import battor_error import py_utils from py_utils import cloud_storage import dependency_manager from devil.utils import battor_device_mapping from devil.utils i...
true
true
1c3435a6cc855240de2c2d26e2b0ce4f8df5479a
4,287
py
Python
tests/python/relay/test_name_transforms.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
4,640
2017-08-17T19:22:15.000Z
2019-11-04T15:29:46.000Z
tests/python/relay/test_name_transforms.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
3,022
2020-11-24T14:02:31.000Z
2022-03-31T23:55:31.000Z
tests/python/relay/test_name_transforms.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
1,352
2017-08-17T19:30:38.000Z
2019-11-04T16:09:29.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License" you may not use...
37.278261
99
0.70982
from tvm import TVMError from tvm.relay.backend.name_transforms import ( to_c_function_style, to_c_variable_style, to_c_constant_style, prefix_name, prefix_generated_name, sanitize_name, ) import pytest def test_to_c_function_style(): assert to_c_function_style("TVM_Woof")...
true
true
1c34364153b35a31a3417fb55f88b56115287023
1,111
py
Python
datalad/support/cache.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
null
null
null
datalad/support/cache.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
6
2015-11-20T21:41:13.000Z
2018-06-12T14:27:32.000Z
datalad/support/cache.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
1
2017-03-28T14:44:16.000Z
2017-03-28T14:44:16.000Z
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
34.71875
87
0.572457
true
true
1c3436a93e156c9b163508894959b51b9b7b4eb6
1,427
py
Python
pandashells/bin/p_linspace.py
timgates42/pandashells
4b565435a25ac713eeeacf28c3e5b52fe94530d8
[ "BSD-2-Clause-FreeBSD" ]
878
2015-08-02T02:07:20.000Z
2022-01-15T19:06:47.000Z
pandashells/bin/p_linspace.py
timgates42/pandashells
4b565435a25ac713eeeacf28c3e5b52fe94530d8
[ "BSD-2-Clause-FreeBSD" ]
44
2015-05-12T15:56:57.000Z
2021-01-13T20:58:29.000Z
pandashells/bin/p_linspace.py
timgates42/pandashells
4b565435a25ac713eeeacf28c3e5b52fe94530d8
[ "BSD-2-Clause-FreeBSD" ]
31
2015-08-02T22:48:36.000Z
2021-01-13T20:54:58.000Z
#! /usr/bin/env python # standard library imports import sys # NOQA import sys to allow for mocking sys.argv in tests import argparse import textwrap from pandashells.lib import module_checker_lib, arg_lib module_checker_lib.check_for_modules(['pandas']) from pandashells.lib import io_lib import numpy as np impor...
25.945455
79
0.597758
import sys import argparse import textwrap from pandashells.lib import module_checker_lib, arg_lib module_checker_lib.check_for_modules(['pandas']) from pandashells.lib import io_lib import numpy as np import pandas as pd def main(): msg = "Generate a linearly spaced set of data points." msg = textwr...
true
true
1c3437f965509e3d3a1310c6401184afde27ae83
4,582
py
Python
python/LinearRegression.py
Chirag2007/hacktoberfest2021-6
16331c71f8458528f745ff5b0b9c81aee6debfcb
[ "MIT" ]
11
2020-10-14T05:43:12.000Z
2021-10-02T02:29:52.000Z
python/LinearRegression.py
Chirag2007/hacktoberfest2021-6
16331c71f8458528f745ff5b0b9c81aee6debfcb
[ "MIT" ]
10
2020-10-14T15:15:41.000Z
2020-10-31T17:13:33.000Z
python/LinearRegression.py
Chirag2007/hacktoberfest2021-6
16331c71f8458528f745ff5b0b9c81aee6debfcb
[ "MIT" ]
91
2020-10-13T15:38:28.000Z
2021-10-02T02:29:55.000Z
from sklearn import datasets boston = datasets.load_boston(return_X_y=False) print(boston); print(boston['feature_names']) print(boston['target']) print(boston['data'].shape) from sklearn.model_selection import train_test_split import random # train(30%), validation (10%), and test(60%) X_train, X_test, y_train, y_...
35.796875
137
0.627892
from sklearn import datasets boston = datasets.load_boston(return_X_y=False) print(boston); print(boston['feature_names']) print(boston['target']) print(boston['data'].shape) from sklearn.model_selection import train_test_split import random X_train, X_test, y_train, y_test = train_test_split(boston['data'],boston...
false
true
1c3438005bf0a2213fed7f01d5fce16c91644252
8,117
py
Python
FlyTrackApp/flight_tracker_vis_class.py
jmmelis/FlyTrackApp
7c03eb0aeda7b0bd4e0c6181bc776c92e4fbc582
[ "MIT" ]
null
null
null
FlyTrackApp/flight_tracker_vis_class.py
jmmelis/FlyTrackApp
7c03eb0aeda7b0bd4e0c6181bc776c92e4fbc582
[ "MIT" ]
null
null
null
FlyTrackApp/flight_tracker_vis_class.py
jmmelis/FlyTrackApp
7c03eb0aeda7b0bd4e0c6181bc776c92e4fbc582
[ "MIT" ]
null
null
null
import vtk import sys import os import time import numpy as np # flight tracker visualization class class FlightTrackerVisualization: def __init__(self): # window parameters self.window_name = "Model" self.background = (0.1,0.2,0.4) self.window_sz = (600, 600) # stl model parameters self.model_name = ...
30.287313
90
0.724036
import vtk import sys import os import time import numpy as np class FlightTrackerVisualization: def __init__(self): self.window_name = "Model" self.background = (0.1,0.2,0.4) self.window_sz = (600, 600) self.model_name = "" self.stl_list = [] self.model_loc = "" self.stl_src = [] self.stl_...
true
true
1c3438bcf49ef281259083f830ab90e75458a3b3
470
py
Python
cirq-google/cirq_google/workflow/__init__.py
unaiic/Cirq
d137a7d69fb6e0f2afb676b179ffdf7a198363f5
[ "Apache-2.0" ]
null
null
null
cirq-google/cirq_google/workflow/__init__.py
unaiic/Cirq
d137a7d69fb6e0f2afb676b179ffdf7a198363f5
[ "Apache-2.0" ]
null
null
null
cirq-google/cirq_google/workflow/__init__.py
unaiic/Cirq
d137a7d69fb6e0f2afb676b179ffdf7a198363f5
[ "Apache-2.0" ]
2
2021-09-22T11:16:46.000Z
2021-09-23T12:55:22.000Z
# pylint: disable=wrong-or-nonexistent-copyright-notice from cirq_google.workflow.quantum_executable import ( ExecutableSpec, KeyValueExecutableSpec, QuantumExecutable, QuantumExecutableGroup, BitstringsMeasurement, ) from cirq_google.workflow.quantum_runtime import ( SharedRuntimeInfo, Run...
24.736842
55
0.785106
from cirq_google.workflow.quantum_executable import ( ExecutableSpec, KeyValueExecutableSpec, QuantumExecutable, QuantumExecutableGroup, BitstringsMeasurement, ) from cirq_google.workflow.quantum_runtime import ( SharedRuntimeInfo, RuntimeInfo, ExecutableResult, ExecutableGroupResu...
true
true
1c34390d2bcd7b5fa6794c8b84106f4ee13a2ac5
6,917
py
Python
autocomplete_light/tests/widgets.py
bburan/django-autocomplete-light
064676061b101d5d47655e8598b21cbaf7716ae8
[ "MIT" ]
1
2015-07-01T02:26:51.000Z
2015-07-01T02:26:51.000Z
autocomplete_light/tests/widgets.py
bburan/django-autocomplete-light
064676061b101d5d47655e8598b21cbaf7716ae8
[ "MIT" ]
null
null
null
autocomplete_light/tests/widgets.py
bburan/django-autocomplete-light
064676061b101d5d47655e8598b21cbaf7716ae8
[ "MIT" ]
null
null
null
from lxml.html import etree from lxml.cssselect import CSSSelector try: from unittest import mock except ImportError: # python2 import mock from django.test import TestCase import autocomplete_light from ..example_apps.basic.models import FkModel from ..example_apps.security_test.models import Item class...
35.111675
81
0.656354
from lxml.html import etree from lxml.cssselect import CSSSelector try: from unittest import mock except ImportError: import mock from django.test import TestCase import autocomplete_light from ..example_apps.basic.models import FkModel from ..example_apps.security_test.models import Item class LazyAuto...
true
true
1c34391518004496e38d5b8a753fef4334f1ebab
3,187
py
Python
plato/processors/registry.py
NingxinSu/plato
94c1c0d7d8b1a1b0ff7f6d9efcf1883f314d9668
[ "Apache-2.0" ]
null
null
null
plato/processors/registry.py
NingxinSu/plato
94c1c0d7d8b1a1b0ff7f6d9efcf1883f314d9668
[ "Apache-2.0" ]
null
null
null
plato/processors/registry.py
NingxinSu/plato
94c1c0d7d8b1a1b0ff7f6d9efcf1883f314d9668
[ "Apache-2.0" ]
null
null
null
""" This registry for Processors contains framework-specific implementations of Processors for data payloads. Having a registry of all available classes is convenient for retrieving an instance based on a configuration at run-time. """ import logging from collections import OrderedDict from typing import Tuple from p...
34.641304
83
0.688422
import logging from collections import OrderedDict from typing import Tuple from plato.config import Config from plato.processors import pipeline if not (hasattr(Config().trainer, 'use_tensorflow') or hasattr(Config().trainer, 'use_mindspore')): from plato.processors import ( base, feature...
true
true
1c343a093f31c7da82d6fd0ceba75ea7355d9cf5
1,082
py
Python
data/Translation testing 2022-3-16/c2p-pointer_modification/pointer_modification_result_ez++.py
LANCHERBA/CodeGen
fdb8717658945b81af148787c8303a97a00c615c
[ "MIT" ]
null
null
null
data/Translation testing 2022-3-16/c2p-pointer_modification/pointer_modification_result_ez++.py
LANCHERBA/CodeGen
fdb8717658945b81af148787c8303a97a00c615c
[ "MIT" ]
null
null
null
data/Translation testing 2022-3-16/c2p-pointer_modification/pointer_modification_result_ez++.py
LANCHERBA/CodeGen
fdb8717658945b81af148787c8303a97a00c615c
[ "MIT" ]
null
null
null
def #include<iostream> ##include<cstdlib2> from operator import add from itertools import chain import operator import sys import os import re import tempfile import struct import time import random import socket import sys import tempfile from os import path from random import random from time import time from socket...
22.081633
84
0.810536
def ort add from itertools import chain import operator import sys import os import re import tempfile import struct import time import random import socket import sys import tempfile from os import path from random import random from time import time from socket import AF_INET , AF_INET6 from .import socket from .im...
false
true
1c343b29fd70682caa31e6d22ef7e8dbd0c921c6
9,125
py
Python
mcse/crystals/packing_factor.py
manny405/mcse
419e4b8c144563ae0bf48982fc7ea26ce941a3eb
[ "Apache-2.0" ]
5
2021-07-22T17:24:58.000Z
2021-11-30T07:50:29.000Z
mcse/crystals/packing_factor.py
manny405/mcse
419e4b8c144563ae0bf48982fc7ea26ce941a3eb
[ "Apache-2.0" ]
null
null
null
mcse/crystals/packing_factor.py
manny405/mcse
419e4b8c144563ae0bf48982fc7ea26ce941a3eb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np from scipy.spatial.distance import cdist from scipy.spatial import cKDTree from ase.data import vdw_radii,atomic_numbers,covalent_radii from ase.data.vdw_alvarez import vdw_radii as vdw_radii_alvarez from mcse import Structure from mcse import BaseDriver_ from mcse.crystal...
36.067194
80
0.575342
import numpy as np from scipy.spatial.distance import cdist from scipy.spatial import cKDTree from ase.data import vdw_radii,atomic_numbers,covalent_radii from ase.data.vdw_alvarez import vdw_radii as vdw_radii_alvarez from mcse import Structure from mcse import BaseDriver_ from mcse.crystals.supercell import Supe...
true
true
1c343b4f04b36da4721ba9a17023c8fdf11baf55
306
py
Python
sndg/users/apps.py
ezequieljsosa/sndg-web
7763c8fbc83dc92abb9c53326e2fe227bcabf607
[ "MIT" ]
null
null
null
sndg/users/apps.py
ezequieljsosa/sndg-web
7763c8fbc83dc92abb9c53326e2fe227bcabf607
[ "MIT" ]
null
null
null
sndg/users/apps.py
ezequieljsosa/sndg-web
7763c8fbc83dc92abb9c53326e2fe227bcabf607
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class UsersConfig(AppConfig): name = "sndg.users" verbose_name = _("Users") def ready(self): try: import sndg.users.signals # noqa F401 except ImportError: pass
21.857143
54
0.647059
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class UsersConfig(AppConfig): name = "sndg.users" verbose_name = _("Users") def ready(self): try: import sndg.users.signals except ImportError: pass
true
true
1c343ba8a0535159ec3ae4576051ac4bf144647f
263
py
Python
geminidr/niri/recipes/ql/recipes_FLAT_IMAGE.py
DBerke/DRAGONS
cecf9a03970af95126bd17a227bd5214a5d6c64b
[ "BSD-3-Clause" ]
19
2017-10-23T14:52:51.000Z
2022-03-28T04:49:00.000Z
geminidr/niri/recipes/ql/recipes_FLAT_IMAGE.py
DBerke/DRAGONS
cecf9a03970af95126bd17a227bd5214a5d6c64b
[ "BSD-3-Clause" ]
194
2017-11-01T17:32:45.000Z
2022-03-31T21:32:59.000Z
geminidr/niri/recipes/ql/recipes_FLAT_IMAGE.py
DBerke/DRAGONS
cecf9a03970af95126bd17a227bd5214a5d6c64b
[ "BSD-3-Clause" ]
16
2017-11-01T05:18:04.000Z
2021-12-14T23:08:57.000Z
""" Recipes available to data with tags ['NIRI', 'CAL', 'IMAGE', 'FLAT']. Default is "makeProcessedFlat". """ recipe_tags = {'NIRI', 'CAL', 'IMAGE', 'FLAT'} from geminidr.niri.recipes.sq.recipes_FLAT_IMAGE import makeProcessedFlat _default = makeProcessedFlat
23.909091
73
0.722433
recipe_tags = {'NIRI', 'CAL', 'IMAGE', 'FLAT'} from geminidr.niri.recipes.sq.recipes_FLAT_IMAGE import makeProcessedFlat _default = makeProcessedFlat
true
true
1c343bc3d230830ecaf1ae3297bee7e19a1e30f8
3,258
py
Python
examples/demo3.py
Freakwill/skinner
bcb036fc753addcd09655b7a775dbcdb1f99f1f6
[ "MIT" ]
null
null
null
examples/demo3.py
Freakwill/skinner
bcb036fc753addcd09655b7a775dbcdb1f99f1f6
[ "MIT" ]
null
null
null
examples/demo3.py
Freakwill/skinner
bcb036fc753addcd09655b7a775dbcdb1f99f1f6
[ "MIT" ]
2
2020-09-28T06:09:45.000Z
2021-01-17T04:16:40.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import gym gym.register( id='GridWorld-v1', entry_point='simple_grid:MyGridWorld3', max_episode_steps=200, reward_threshold=1000 ) from objects import Robot, NeuralRobot class MyRobot(Robot): init_power = 25 @property def flag1(self):...
25.653543
103
0.503376
import gym gym.register( id='GridWorld-v1', entry_point='simple_grid:MyGridWorld3', max_episode_steps=200, reward_threshold=1000 ) from objects import Robot, NeuralRobot class MyRobot(Robot): init_power = 25 @property def flag1(self): return self.state[2] @property ...
true
true
1c343cb4a2aa73ac773b7d30298cff3da21bcd2e
1,392
py
Python
resources/errors.py
weis999/btfwest01
faba7c53c1ff6e0eb3ffd36f33df39ab490ec2f6
[ "MIT" ]
null
null
null
resources/errors.py
weis999/btfwest01
faba7c53c1ff6e0eb3ffd36f33df39ab490ec2f6
[ "MIT" ]
null
null
null
resources/errors.py
weis999/btfwest01
faba7c53c1ff6e0eb3ffd36f33df39ab490ec2f6
[ "MIT" ]
null
null
null
class InternalServerError(Exception): pass class SchemaValidationError(Exception): pass class FieldAlreadyExistsError(Exception): pass class UpdatingFieldError(Exception): pass class DeletingFieldError(Exception): pass class FieldNotExistsError(Exception): pass class EmailAlreadyExistsErro...
24
81
0.619253
class InternalServerError(Exception): pass class SchemaValidationError(Exception): pass class FieldAlreadyExistsError(Exception): pass class UpdatingFieldError(Exception): pass class DeletingFieldError(Exception): pass class FieldNotExistsError(Exception): pass class EmailAlreadyExistsErro...
true
true