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
f765b2f62d9657ba7fceb17a88e68f86f57926e6
15,976
py
Python
bruce_slam/src/bruce_slam/sonar.py
jake3991/sonar-SLAM
995bfa61e61d99667bec7a7f70bea4d6d486c312
[ "MIT" ]
null
null
null
bruce_slam/src/bruce_slam/sonar.py
jake3991/sonar-SLAM
995bfa61e61d99667bec7a7f70bea4d6d486c312
[ "MIT" ]
null
null
null
bruce_slam/src/bruce_slam/sonar.py
jake3991/sonar-SLAM
995bfa61e61d99667bec7a7f70bea4d6d486c312
[ "MIT" ]
null
null
null
import numpy as np from scipy.interpolate import interp1d import cv2 import rospy from .utils.topics import * from .utils.conversions import r2n class OculusFireMsg(object): """Oculus Fire Message uint8_t masterMode; // mode 0 is flexi mode, needs full fire message (not available for third party d...
45.645714
125
0.405108
import numpy as np from scipy.interpolate import interp1d import cv2 import rospy from .utils.topics import * from .utils.conversions import r2n class OculusFireMsg(object): def __init__(self): self.mode = None self.gamma = None self.flags = None self.range = None self.g...
true
true
f765b458802c7b028b01a6b9ad00bb260098323a
1,891
py
Python
gygax/gygax/bot/events.py
tmacro/hitman
525100ddb5939a3aa9b51df9d2e6449dc3035bbe
[ "BSD-3-Clause" ]
4
2017-07-21T01:39:17.000Z
2019-02-24T08:29:44.000Z
gygax/gygax/bot/events.py
tmacro/hitman-old
525100ddb5939a3aa9b51df9d2e6449dc3035bbe
[ "BSD-3-Clause" ]
null
null
null
gygax/gygax/bot/events.py
tmacro/hitman-old
525100ddb5939a3aa9b51df9d2e6449dc3035bbe
[ "BSD-3-Clause" ]
1
2017-06-23T21:01:51.000Z
2017-06-23T21:01:51.000Z
from .dispatch import Event from .const import EVENT_TYPES as ETYPES import re class MessageEvent(Event): type = ETYPES.MSG @property def text(self): return self._get('text') @property def user(self): return self._get('user') @property def channel(self): return self._get('channel') class CommandEvent(...
21.011111
79
0.662084
from .dispatch import Event from .const import EVENT_TYPES as ETYPES import re class MessageEvent(Event): type = ETYPES.MSG @property def text(self): return self._get('text') @property def user(self): return self._get('user') @property def channel(self): return self._get('channel') class CommandEvent(...
true
true
f765b4b5fabe897ffbf443ccab7cb4ffb3efcdbe
1,783
py
Python
pyedid/helpers/edid_helper.py
timotheuslin/pyedid
4fce77ffa0c70d0110f4fd9d84f5fc2d1d865895
[ "MIT" ]
1
2021-01-30T03:00:22.000Z
2021-01-30T03:00:22.000Z
pyedid/helpers/edid_helper.py
timotheuslin/pyedid
4fce77ffa0c70d0110f4fd9d84f5fc2d1d865895
[ "MIT" ]
null
null
null
pyedid/helpers/edid_helper.py
timotheuslin/pyedid
4fce77ffa0c70d0110f4fd9d84f5fc2d1d865895
[ "MIT" ]
null
null
null
""" EDID helper """ from subprocess import CalledProcessError, check_output from typing import ByteString, List __all__ = ["EdidHelper"] class EdidHelper: """Class for working with EDID data""" @staticmethod def hex2bytes(hex_data: str) -> ByteString: """Convert hex EDID string to bytes ...
28.301587
97
0.558609
from subprocess import CalledProcessError, check_output from typing import ByteString, List __all__ = ["EdidHelper"] class EdidHelper: @staticmethod def hex2bytes(hex_data: str) -> ByteString: if len(hex_data) > 256: hex_data = hex_data[:256] numbers = [] for i ...
true
true
f765b4d660b4e1b6411614aa0e7e4e7e529f0de9
7,447
py
Python
mltrace/db/models.py
ariG23498/mltrace
9fe53a6bf9e1d737f4367650aa8dd956e09f33d5
[ "Apache-2.0" ]
null
null
null
mltrace/db/models.py
ariG23498/mltrace
9fe53a6bf9e1d737f4367650aa8dd956e09f33d5
[ "Apache-2.0" ]
null
null
null
mltrace/db/models.py
ariG23498/mltrace
9fe53a6bf9e1d737f4367650aa8dd956e09f33d5
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from datetime import datetime from mltrace.db.base import Base from sqlalchemy import ( Column, String, LargeBinary, Integer, DateTime, Table, ForeignKey, Enum, ) from sqlalchemy.orm import relationship import enum import typing class PointerTypeEnum...
31.824786
91
0.64818
from __future__ import annotations from datetime import datetime from mltrace.db.base import Base from sqlalchemy import ( Column, String, LargeBinary, Integer, DateTime, Table, ForeignKey, Enum, ) from sqlalchemy.orm import relationship import enum import typing class PointerTypeEnum...
true
true
f765b5372bda12e2fc5c6210249b63263c7df4ef
44,663
py
Python
appserver/controllers/scoreboard_controller.py
j-stoner/SA-ctf_scoreboard
5968b647ecf664ca23ab7d1c70ca15b04a93b1c3
[ "CC0-1.0" ]
null
null
null
appserver/controllers/scoreboard_controller.py
j-stoner/SA-ctf_scoreboard
5968b647ecf664ca23ab7d1c70ca15b04a93b1c3
[ "CC0-1.0" ]
null
null
null
appserver/controllers/scoreboard_controller.py
j-stoner/SA-ctf_scoreboard
5968b647ecf664ca23ab7d1c70ca15b04a93b1c3
[ "CC0-1.0" ]
null
null
null
# -*- coding: UTF-8 -*- import logging import os import sys import json import shutil import csv import cherrypy import re import time import datetime import collections import time import ConfigParser import uuid import validatectf from splunk import AuthorizationFailed, ResourceNotFound import splunk.rest import spl...
47.212474
243
0.596668
import logging import os import sys import json import shutil import csv import cherrypy import re import time import datetime import collections import time import ConfigParser import uuid import validatectf from splunk import AuthorizationFailed, ResourceNotFound import splunk.rest import splunk.appserver.mrsparkle....
true
true
f765b59949efd9970f1a3efeb514b3b8b9ab3253
15,979
py
Python
python/cohorte/composer/node/composer.py
isandlaTech/cohorte-runtime
686556cdde20beba77ae202de9969be46feed5e2
[ "Apache-2.0" ]
6
2015-04-28T16:51:08.000Z
2017-07-12T11:29:00.000Z
python/cohorte/composer/node/composer.py
isandlaTech/cohorte-runtime
686556cdde20beba77ae202de9969be46feed5e2
[ "Apache-2.0" ]
29
2015-02-24T11:11:26.000Z
2017-08-25T08:30:18.000Z
qualifier/deploy/cohorte-home/repo/cohorte/composer/node/composer.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
1
2015-08-24T13:23:43.000Z
2015-08-24T13:23:43.000Z
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ The Node Composer :author: Thomas Calmant :license: Apache Software License 2.0 :version: 3.0.0 .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the ...
32.676892
80
0.601602
import logging import threading import time from pelix.ipopo.decorators import ComponentFactory, Requires, Provides, \ Instantiate, Property, Validate, Invalidate import pelix.remote import pelix.threadpool import cohorte import cohorte.composer import cohorte.composer.node.beans as beans import cohorte.forker ...
true
true
f765b59bd32447414eac21fafb6775408b2c0c8c
6,158
py
Python
iminuit/frontends/console.py
danielbrener/iminuit
e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1
[ "MIT" ]
1
2018-10-02T14:52:37.000Z
2018-10-02T14:52:37.000Z
iminuit/frontends/console.py
danielbrener/iminuit
e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1
[ "MIT" ]
null
null
null
iminuit/frontends/console.py
danielbrener/iminuit
e6d1cbc3d4d51e3556dbf95b569b62d6d9c38ad1
[ "MIT" ]
null
null
null
from __future__ import (absolute_import, division, print_function, unicode_literals) import sys from .frontend import Frontend from math import log10 __all__ = ['ConsoleFrontend'] class ConsoleFrontend(Frontend): """Console frontend for Minuit. This class prints stuff directly via pr...
35.802326
83
0.493992
from __future__ import (absolute_import, division, print_function, unicode_literals) import sys from .frontend import Frontend from math import log10 __all__ = ['ConsoleFrontend'] class ConsoleFrontend(Frontend): def display(self, *args): sys.stdout.write('\n'.join(args) + '\n') ...
true
true
f765b5ce5597d6a64a9f5d0b48c7e2348781c898
234
py
Python
sqlalchemy+sqlite_create db and tables/main.py
MADTeacher/MADPythonCourse
f3bd38dcd30dc220bd691d301b2845401cc70b2e
[ "MIT" ]
5
2021-05-11T14:27:11.000Z
2022-02-09T08:55:06.000Z
sqlalchemy+sqlite_create db and tables/main.py
MADTeacher/MADPythonCourse
f3bd38dcd30dc220bd691d301b2845401cc70b2e
[ "MIT" ]
null
null
null
sqlalchemy+sqlite_create db and tables/main.py
MADTeacher/MADPythonCourse
f3bd38dcd30dc220bd691d301b2845401cc70b2e
[ "MIT" ]
8
2020-09-21T21:52:30.000Z
2022-03-05T12:31:10.000Z
import os from models.database import DATABASE_NAME import create_database as db_creator if __name__ == '__main__': db_is_created = os.path.exists(DATABASE_NAME) if not db_is_created: db_creator.create_database()
18
49
0.75641
import os from models.database import DATABASE_NAME import create_database as db_creator if __name__ == '__main__': db_is_created = os.path.exists(DATABASE_NAME) if not db_is_created: db_creator.create_database()
true
true
f765b62588200a9640a47af438e8961b92741069
83,975
py
Python
src/olympia/addons/models.py
varundey/addons-server
bdc39c4f0510a5e1c8b4e3551f5f15fcd50f10e9
[ "BSD-3-Clause" ]
null
null
null
src/olympia/addons/models.py
varundey/addons-server
bdc39c4f0510a5e1c8b4e3551f5f15fcd50f10e9
[ "BSD-3-Clause" ]
null
null
null
src/olympia/addons/models.py
varundey/addons-server
bdc39c4f0510a5e1c8b4e3551f5f15fcd50f10e9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import collections import itertools import json import os import posixpath import re import time import uuid from datetime import datetime from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import IntegrityError, models, transaction from djang...
37.690754
79
0.630509
import collections import itertools import json import os import posixpath import re import time import uuid from datetime import datetime from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import IntegrityError, models, transaction from django.db.models import F, Ma...
true
true
f765b635f45285b81229f8b8a4aa20905e01b27c
2,368
py
Python
bin/kenshin-debug.py
PinkDiamond1/Kenshin
bb5dfa05f5d10b4bdd1e0403c9e7d3c7e4399fcb
[ "Apache-2.0" ]
219
2016-04-24T10:09:25.000Z
2022-02-02T22:12:17.000Z
bin/kenshin-debug.py
PinkDiamond1/Kenshin
bb5dfa05f5d10b4bdd1e0403c9e7d3c7e4399fcb
[ "Apache-2.0" ]
16
2016-04-22T07:45:26.000Z
2018-01-11T03:16:30.000Z
bin/kenshin-debug.py
PinkDiamond1/Kenshin
bb5dfa05f5d10b4bdd1e0403c9e7d3c7e4399fcb
[ "Apache-2.0" ]
29
2016-05-12T05:47:34.000Z
2021-11-05T19:19:12.000Z
#!/usr/bin/env python # coding: utf-8 import argparse import struct import kenshin from datetime import datetime from kenshin.utils import get_metric def timestamp_to_datestr(ts): try: d = datetime.fromtimestamp(ts) return d.strftime('%Y-%m-%d %H:%M:%S') except: return 'invalid timest...
31.157895
121
0.607264
import argparse import struct import kenshin from datetime import datetime from kenshin.utils import get_metric def timestamp_to_datestr(ts): try: d = datetime.fromtimestamp(ts) return d.strftime('%Y-%m-%d %H:%M:%S') except: return 'invalid timestamp' def get_point(fh, offset, size,...
false
true
f765b7051a37e03123d012dc32aabe3531d5030c
200,918
py
Python
src/config/schema-transformer/config_db.py
mpassalacqua/contrail-controller
5a2f494322a129096186d938a745b5d241dd332a
[ "Apache-2.0" ]
null
null
null
src/config/schema-transformer/config_db.py
mpassalacqua/contrail-controller
5a2f494322a129096186d938a745b5d241dd332a
[ "Apache-2.0" ]
null
null
null
src/config/schema-transformer/config_db.py
mpassalacqua/contrail-controller
5a2f494322a129096186d938a745b5d241dd332a
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # """ This file contains config data model for schema transformer """ import gevent.monkey gevent.monkey.patch_all() import sys reload(sys) sys.setdefaultencoding('UTF8') import copy import uuid import itertools import socket import cfgm_common as c...
41.020416
104
0.578485
import gevent.monkey gevent.monkey.patch_all() import sys reload(sys) sys.setdefaultencoding('UTF8') import copy import uuid import itertools import socket import cfgm_common as common from netaddr import IPNetwork, IPAddress from cfgm_common.exceptions import NoIdError, RefsExistError, BadRequest from cfgm_common....
true
true
f765b76d61ce509747277f972d7681b79290eb75
181
py
Python
virtual/bin/django-admin.py
jamesgathuru001/neighbourhood-watch
26aeb3c7a9f6396abd5ce8cd21e9899e825a4e9c
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
jamesgathuru001/neighbourhood-watch
26aeb3c7a9f6396abd5ce8cd21e9899e825a4e9c
[ "MIT" ]
7
2020-06-05T21:40:24.000Z
2022-03-11T23:52:31.000Z
virtual/bin/django-admin.py
jamesgathuru001/neighbourhood-watch
26aeb3c7a9f6396abd5ce8cd21e9899e825a4e9c
[ "MIT" ]
null
null
null
#!/home/james/PYTHON/django-module/neighbourhood-watch/virtual/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
30.166667
74
0.801105
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f765b8fc7b6dabf8267296abab8dd1be04c5b175
2,647
py
Python
incunafein/content/video/models.py
omni-digital/incuna-feincms
4475bdbbb1d6778165c4b0303a69c02bcdcdc421
[ "BSD-2-Clause" ]
null
null
null
incunafein/content/video/models.py
omni-digital/incuna-feincms
4475bdbbb1d6778165c4b0303a69c02bcdcdc421
[ "BSD-2-Clause" ]
null
null
null
incunafein/content/video/models.py
omni-digital/incuna-feincms
4475bdbbb1d6778165c4b0303a69c02bcdcdc421
[ "BSD-2-Clause" ]
null
null
null
from django import forms from django.conf import settings from django.contrib.admin.widgets import AdminRadioSelect from django.core.exceptions import ImproperlyConfigured from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from feincm...
36.260274
127
0.642236
from django import forms from django.conf import settings from django.contrib.admin.widgets import AdminRadioSelect from django.core.exceptions import ImproperlyConfigured from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from feincm...
true
true
f765ba8383cb23309bd013cef6c7dacdf058d899
3,284
py
Python
project/ecommerce_site/ecommerce_site/settings.py
imsks/Web-Dev-with-python-and-Django
dec87795d18c24a5492758202c29a463bbba105a
[ "MIT" ]
null
null
null
project/ecommerce_site/ecommerce_site/settings.py
imsks/Web-Dev-with-python-and-Django
dec87795d18c24a5492758202c29a463bbba105a
[ "MIT" ]
null
null
null
project/ecommerce_site/ecommerce_site/settings.py
imsks/Web-Dev-with-python-and-Django
dec87795d18c24a5492758202c29a463bbba105a
[ "MIT" ]
null
null
null
""" Django settings for ecommerce_site project. Generated by 'django-admin startproject' using Django 2.2.1. 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/ """ impor...
25.858268
91
0.69732
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '#bh)@c4p%&622nqc21y_-7y433znr_31=ticq5#v$$0u1m1@b(' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'shop.apps.ShopConfig', 'django.contrib.admin', 'django.contrib.auth', ...
true
true
f765ba9b5e80f86cc79123059ef4025976a843a5
4,430
py
Python
setup.py
xushenkun/imagededup
8f3b984a99bbf70b59896d94acaadb5d666427e1
[ "Apache-2.0" ]
null
null
null
setup.py
xushenkun/imagededup
8f3b984a99bbf70b59896d94acaadb5d666427e1
[ "Apache-2.0" ]
null
null
null
setup.py
xushenkun/imagededup
8f3b984a99bbf70b59896d94acaadb5d666427e1
[ "Apache-2.0" ]
null
null
null
import sys from setuptools import setup, find_packages, Extension long_description = ''' imagededup is a python package that provides functionality to find duplicates in a collection of images using a variety of algorithms. Additionally, an evaluation and experimentation framework, is also provided. Following details ...
34.076923
119
0.621445
import sys from setuptools import setup, find_packages, Extension long_description = ''' imagededup is a python package that provides functionality to find duplicates in a collection of images using a variety of algorithms. Additionally, an evaluation and experimentation framework, is also provided. Following details ...
true
true
f765bb01cc70efc05145e7ca6eaa426d3c5c57ec
2,471
py
Python
app.py
lxyoutlook/PCF_Redis_demo
1e1dabbb256f4649c778254d16f91368116322c5
[ "MIT" ]
null
null
null
app.py
lxyoutlook/PCF_Redis_demo
1e1dabbb256f4649c778254d16f91368116322c5
[ "MIT" ]
null
null
null
app.py
lxyoutlook/PCF_Redis_demo
1e1dabbb256f4649c778254d16f91368116322c5
[ "MIT" ]
null
null
null
import os import redis import json from flask import Flask, render_template, redirect, request, url_for, make_response if 'VCAP_SERVICES' in os.environ: VCAP_SERVICES = json.loads(os.environ['VCAP_SERVICES']) if VCAP_SERVICES: CREDENTIALS = VCAP_SERVICES["rediscloud"][0]["credentials"] r = red...
29.416667
113
0.620397
import os import redis import json from flask import Flask, render_template, redirect, request, url_for, make_response if 'VCAP_SERVICES' in os.environ: VCAP_SERVICES = json.loads(os.environ['VCAP_SERVICES']) if VCAP_SERVICES: CREDENTIALS = VCAP_SERVICES["rediscloud"][0]["credentials"] r = red...
true
true
f765bb47e6421967771f214d711779b23e642a45
3,829
py
Python
pxr/usd/plugin/usdAbc/testenv/testUsdAbcConversionSubdiv.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
88
2018-07-13T01:22:00.000Z
2022-01-16T22:15:27.000Z
pxr/usd/plugin/usdAbc/testenv/testUsdAbcConversionSubdiv.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
1
2020-07-07T22:39:42.000Z
2020-07-07T22:39:42.000Z
pxr/usd/plugin/usdAbc/testenv/testUsdAbcConversionSubdiv.py
YuqiaoZhang/USD
bf3a21e6e049486441440ebf8c0387db2538d096
[ "BSD-2-Clause" ]
26
2018-06-06T03:39:22.000Z
2021-08-28T23:02:42.000Z
#!/pxrpythonsubst # # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
44.011494
78
0.659702
from pxr import Usd, UsdAbc, UsdGeom, Gf import unittest class TestUsdAbcConversionSubdiv(unittest.TestCase): def test_RoundTrip(self): usdFile = 'original.usda' abcFile = 'converted.abc' time = Usd.TimeCode.EarliestTime() self.assertTrue(UsdAbc._WriteAlembic(usdFile, abc...
true
true
f765bc85f0aba00f6a6ef1c604e036786374ce71
28,240
py
Python
tgbot-project/main.py
tosekk/tgbot
1967961ada52ca353ad5fbef24e490b2b552ea6e
[ "MIT" ]
1
2022-03-23T08:31:39.000Z
2022-03-23T08:31:39.000Z
tgbot-project/main.py
tosekk/tgbot
1967961ada52ca353ad5fbef24e490b2b552ea6e
[ "MIT" ]
null
null
null
tgbot-project/main.py
tosekk/tgbot
1967961ada52ca353ad5fbef24e490b2b552ea6e
[ "MIT" ]
null
null
null
#Standard Modules from random import choice, randint from time import sleep #Third-party Modules from telebot import TeleBot from telebot.types import (CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton, Message) #Local Modules import bot_token from greeting_handler import Greetin...
31.766029
83
0.629001
from random import choice, randint from time import sleep from telebot import TeleBot from telebot.types import (CallbackQuery, InlineKeyboardMarkup, InlineKeyboardButton, Message) import bot_token from greeting_handler import GreetingsHandler from myanimelist import (MALRatings, MALSear...
true
true
f765bd2f2889ee37373dd749db10bf695e6b78c0
15,890
py
Python
madminer/ml/base.py
sbrass/madminer
df664344d1a43551ee9ecd91fe2dc0bccb4d529f
[ "MIT" ]
null
null
null
madminer/ml/base.py
sbrass/madminer
df664344d1a43551ee9ecd91fe2dc0bccb4d529f
[ "MIT" ]
null
null
null
madminer/ml/base.py
sbrass/madminer
df664344d1a43551ee9ecd91fe2dc0bccb4d529f
[ "MIT" ]
null
null
null
import json import logging import numpy as np import os import torch from ..utils.various import create_missing_folders, load_and_check logger = logging.getLogger(__name__) class Estimator: """ Abstract class for any ML estimator. Subclassed by ParameterizedRatioEstimator, DoubleParameterizedRatioEstimator...
38.381643
128
0.631844
import json import logging import numpy as np import os import torch from ..utils.various import create_missing_folders, load_and_check logger = logging.getLogger(__name__) class Estimator: def __init__(self, features=None, n_hidden=(100,), activation="tanh", dropout_prob=0.0): self.features = feature...
true
true
f765c03b0ff1c1fa4533691ec2cae8e88eb68341
19,133
py
Python
main_9010.py
ZongSingHuang/BPSOGWO-with-GA
4b6968d8946ea5b4456c0fdec1f0c4dd062e4436
[ "MIT" ]
4
2020-12-17T09:13:07.000Z
2021-05-31T19:19:27.000Z
main_9010.py
ZongSingHuang/BPSOGWO-with-GA
4b6968d8946ea5b4456c0fdec1f0c4dd062e4436
[ "MIT" ]
null
null
null
main_9010.py
ZongSingHuang/BPSOGWO-with-GA
4b6968d8946ea5b4456c0fdec1f0c4dd062e4436
[ "MIT" ]
2
2021-07-12T07:17:16.000Z
2021-09-23T01:05:02.000Z
# -*- coding: utf-8 -*- """ Created on Mon Nov 23 21:29:10 2020 @author: ZongSing_NB """ from BHPSOGWO import BHPSOGWO import numpy as np import pandas as pd from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import cross_val_score impor...
44.913146
132
0.575184
from BHPSOGWO import BHPSOGWO import numpy as np import pandas as pd from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import cross_val_score import functools import time import warnings warnings.filterwarnings("ignore") np.random.seed...
true
true
f765c0b1bc73c1284ea4438874c69a578cd755f7
325
py
Python
pkg/protocols/Channel.py
aivazis/qed
d8717ea807e956beb8b1c59e51c45c672bb7d05e
[ "BSD-2-Clause" ]
6
2022-03-07T17:47:28.000Z
2022-03-19T05:16:25.000Z
pkg/protocols/Channel.py
aivazis/qed
d8717ea807e956beb8b1c59e51c45c672bb7d05e
[ "BSD-2-Clause" ]
4
2022-03-17T01:54:42.000Z
2022-03-19T05:17:33.000Z
pkg/protocols/Channel.py
aivazis/qed
d8717ea807e956beb8b1c59e51c45c672bb7d05e
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2022 all rights reserved # support import qed # my superclass from .Producer import Producer # the workflow class Channel(Producer, family="qed.channels"): """ A channel is a visualization workflow """ # end of ...
15.47619
53
0.673846
import qed from .Producer import Producer class Channel(Producer, family="qed.channels"):
true
true
f765c199395ecbba23851e77594a37675c9fd6df
547
py
Python
apps/users/migrations/0005_auto_20180419_2011.py
uonele/bank
48620aa3bd564b63174c42be4a6009446b636b0c
[ "MIT" ]
null
null
null
apps/users/migrations/0005_auto_20180419_2011.py
uonele/bank
48620aa3bd564b63174c42be4a6009446b636b0c
[ "MIT" ]
null
null
null
apps/users/migrations/0005_auto_20180419_2011.py
uonele/bank
48620aa3bd564b63174c42be4a6009446b636b0c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2018-04-19 20:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20180418_1732'), ] operations = [ migrations.AlterField( ...
26.047619
144
0.645338
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20180418_1732'), ] operations = [ migrations.AlterField( model_name='tradeinfo', name='trade_id', ...
true
true
f765c3747c188fb3f9565143b9960125ffb57304
145,527
py
Python
Lib/test/test_logging.py
harveyqing/read_cPython_source
3ff91638c8c9df6e5ac8dd5235447b5571781535
[ "PSF-2.0" ]
36
2015-02-04T10:43:31.000Z
2022-03-30T13:01:12.000Z
Lib/test/test_logging.py
harveyqing/read_cPython_source
3ff91638c8c9df6e5ac8dd5235447b5571781535
[ "PSF-2.0" ]
9
2015-03-17T05:56:16.000Z
2021-11-17T09:31:50.000Z
src/test/python/cpython-3f944f44ee41/Lib/test/test_logging.py
bkiers/python3-parser
38496e94b3935e5abca6ab86fd98136c51f92fd7
[ "MIT" ]
22
2015-05-13T17:37:35.000Z
2022-01-25T06:24:42.000Z
# Copyright 2001-2014 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
34.881831
99
0.564356
import logging import logging.handlers import logging.config import codecs import configparser import datetime import pickle import io import gc import json import os import queue import random import re import socket import struct import sys import tempfile from test.script_helper import assert_python_ok from test ...
true
true
f765c38f00e9c131ff2e866ac38100275c74b06d
248
py
Python
__init__.py
fabianmoronzirfas/SublimeWritingTools
91ac7b9dff8cee19c226cd06898abac312a73bd3
[ "MIT" ]
1
2017-06-13T13:08:52.000Z
2017-06-13T13:08:52.000Z
__init__.py
fabianmoronzirfas/SublimeWritingTools
91ac7b9dff8cee19c226cd06898abac312a73bd3
[ "MIT" ]
null
null
null
__init__.py
fabianmoronzirfas/SublimeWritingTools
91ac7b9dff8cee19c226cd06898abac312a73bd3
[ "MIT" ]
null
null
null
import sys import os plugin = os.path.abspath(os.path.split(__file__)[0]) # libpath = os.path.join(plugin, 'lib') if not plugin in sys.path: sys.path.append(plugin) # if not libpath in sys.path: # sys.path.append(libpath) VERSION = '0.1.0'
17.714286
52
0.693548
import sys import os plugin = os.path.abspath(os.path.split(__file__)[0]) if not plugin in sys.path: sys.path.append(plugin) VERSION = '0.1.0'
true
true
f765c471dd4b488f986e976cf22fe9ed1d4c1929
2,352
py
Python
misc.py
narnars0/kakao-shopping
622dd3914eec1cdfca952358b3f2d4608d3ca874
[ "Apache-2.0" ]
null
null
null
misc.py
narnars0/kakao-shopping
622dd3914eec1cdfca952358b3f2d4608d3ca874
[ "Apache-2.0" ]
null
null
null
misc.py
narnars0/kakao-shopping
622dd3914eec1cdfca952358b3f2d4608d3ca874
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 Kakao, Recommendation Team # # 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 a...
33.126761
138
0.605442
def get_logger(name=__file__): import logging import logging.handlers logger = logging.getLogger(name) if logger.handlers: return logger logger.setLevel(logging.DEBUG) sh = logging.StreamHandler() sh.setLevel(logging.DEBUG) formatter = logging.Formatter('[%(levelname)-s] %(asc...
true
true
f765c4dc8083f35429773d28421cb4fbdebb4cdd
359
py
Python
src/foremast_ui/__main__.py
e4r7hbug/foremast_ui
ae9f864f90fbae2341a8c1e75e1e763e9b389b6b
[ "Apache-2.0" ]
1
2018-07-02T19:48:43.000Z
2018-07-02T19:48:43.000Z
src/foremast_ui/__main__.py
e4r7hbug/foremast_ui
ae9f864f90fbae2341a8c1e75e1e763e9b389b6b
[ "Apache-2.0" ]
null
null
null
src/foremast_ui/__main__.py
e4r7hbug/foremast_ui
ae9f864f90fbae2341a8c1e75e1e763e9b389b6b
[ "Apache-2.0" ]
null
null
null
"""Run Foremast web UI.""" import click from .routes import APP @click.command() @click.option('-d', '--debug', is_flag=True, help='Enable DEBUG mode') @click.option('-p', '--port', type=int, help='Port to run webserver') def main(debug, port): """Foremast UI entry point.""" APP.run(port=port, debug=debug) ...
21.117647
70
0.64624
import click from .routes import APP @click.command() @click.option('-d', '--debug', is_flag=True, help='Enable DEBUG mode') @click.option('-p', '--port', type=int, help='Port to run webserver') def main(debug, port): APP.run(port=port, debug=debug) if __name__ == '__main__': main()
true
true
f765c4e1f8594f165fe92520240d0e56a9c259e6
9,699
py
Python
doc/source/conf.py
ebezzam/cvxpy
38f76c938bf19eed7fb0a39e7fd2395c8fc42489
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
doc/source/conf.py
ebezzam/cvxpy
38f76c938bf19eed7fb0a39e7fd2395c8fc42489
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
doc/source/conf.py
ebezzam/cvxpy
38f76c938bf19eed7fb0a39e7fd2395c8fc42489
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # CVXPY documentation build configuration file, created by # sphinx-quickstart on Mon Jan 27 20:47:07 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
32.33
124
0.70832
import sys, os sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../sphinxext')) sys.path.append('/home/docs/checkouts/readthedocs.org/user_builds/cvxpy/checkouts/1.0/cvxpy') __version__ = "1.0.14" # -- General configuration ----------------------------------------------------- # If ...
true
true
f765c63aadb06cb33abbd4727121bfb2d0ca904a
1,612
py
Python
www/alembic/env.py
tompetersjr/photography
b1eca82c0b09308557f60152d0f07244e0bf6a78
[ "Apache-2.0" ]
2
2018-02-09T15:31:49.000Z
2018-04-05T00:07:54.000Z
www/alembic/env.py
tompetersjr/photography
b1eca82c0b09308557f60152d0f07244e0bf6a78
[ "Apache-2.0" ]
null
null
null
www/alembic/env.py
tompetersjr/photography
b1eca82c0b09308557f60152d0f07244e0bf6a78
[ "Apache-2.0" ]
null
null
null
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config from sqlalchemy.engine.base import Engine from pyramid.paster import get_appsettings, setup_logging from www.models.meta import Base config = context.config setup_logging(config.config_file_name) engine = en...
25.1875
74
0.69727
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config from sqlalchemy.engine.base import Engine from pyramid.paster import get_appsettings, setup_logging from www.models.meta import Base config = context.config setup_logging(config.config_file_name) engine = en...
true
true
f765c6a82071de4ef0c2bd470f85260c9057e264
4,507
py
Python
gslib/seek_ahead_thread.py
maxbube/gsutil
5939cdadbb1617191f6f66ad5635b16509ebb217
[ "Apache-2.0" ]
1
2021-09-01T04:06:56.000Z
2021-09-01T04:06:56.000Z
gslib/seek_ahead_thread.py
maxbube/gsutil
5939cdadbb1617191f6f66ad5635b16509ebb217
[ "Apache-2.0" ]
null
null
null
gslib/seek_ahead_thread.py
maxbube/gsutil
5939cdadbb1617191f6f66ad5635b16509ebb217
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
41.348624
80
0.740626
import threading from gslib.util import NUM_OBJECTS_PER_LIST_PAGE class SeekAheadResult(object): def __init__(self, est_num_ops=1, data_bytes=0): self.est_num_ops = est_num_ops self.data_bytes = data_bytes class SeekAheadThread(threading.Thread): def __init__(self, seek_ahead_iterator, cancel_event,...
true
true
f765c6afbd2e3250ecd49b40d65738930369b071
1,761
py
Python
pysmartnode/components/switches/gpio.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
pysmartnode/components/switches/gpio.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
pysmartnode/components/switches/gpio.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
# Author: Kevin Köck # Copyright Kevin Köck 2017-2019 Released under the MIT license # Created on 2017-10-30 """ example config: { package: .switches.gpio component: GPIO constructor_args: { pin: D5 active_high: true #optional, defaults to active high # mqtt_topic: sometop...
30.894737
125
0.670642
__updated__ = "2019-11-02" __version__ = "1.0" import gc import machine from pysmartnode.components.machine.pin import Pin from pysmartnode import config from pysmartnode.utils.component.switch import ComponentSwitch _mqtt = config.getMQTT() COMPONENT_NAME = "GPIO" _COMPONENT_TYPE = "switch" _unit_index = -1 gc.c...
true
true
f765c7385c89287dc47d22bffc7e8863d6b2d879
4,743
py
Python
fmcapi/api_objects/policy_services/inheritancesettings.py
aegiacometti/fmcapi
1cce480bed69ec199180f3fe3981570570fd107d
[ "BSD-3-Clause" ]
57
2017-06-13T17:06:20.000Z
2021-07-27T08:53:25.000Z
fmcapi/api_objects/policy_services/inheritancesettings.py
aegiacometti/fmcapi
1cce480bed69ec199180f3fe3981570570fd107d
[ "BSD-3-Clause" ]
66
2017-11-09T16:02:45.000Z
2021-08-04T20:52:41.000Z
fmcapi/api_objects/policy_services/inheritancesettings.py
aegiacometti/fmcapi
1cce480bed69ec199180f3fe3981570570fd107d
[ "BSD-3-Clause" ]
56
2017-06-08T07:53:12.000Z
2021-07-30T13:26:47.000Z
"""ACP Inheritance Settings Class""" from fmcapi.api_objects.apiclasstemplate import APIClassTemplate from .accesspolicies import AccessPolicies import logging class InheritanceSettings(APIClassTemplate): """The InheritanceSettings Object in the FMC.""" VALID_JSON_DATA = [] VALID_FOR_KWARGS = VALID_JSON_...
37.642857
115
0.618174
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate from .accesspolicies import AccessPolicies import logging class InheritanceSettings(APIClassTemplate): VALID_JSON_DATA = [] VALID_FOR_KWARGS = VALID_JSON_DATA + [ "id", "acp_id", "acp_name", "device_id", ...
true
true
f765c859873134c76e1e504ec1e4deee6501e51f
1,192
py
Python
tests/data/test_processing.py
quanhua92/maskrcnn-pytorch
d5dff68735ab175cba5604230141874aa6bd59b8
[ "MIT" ]
3
2018-12-29T12:57:48.000Z
2021-12-10T10:13:35.000Z
tests/data/test_processing.py
quanhua92/maskrcnn-pytorch
d5dff68735ab175cba5604230141874aa6bd59b8
[ "MIT" ]
null
null
null
tests/data/test_processing.py
quanhua92/maskrcnn-pytorch
d5dff68735ab175cba5604230141874aa6bd59b8
[ "MIT" ]
1
2019-01-07T23:04:24.000Z
2019-01-07T23:04:24.000Z
import os import numpy as np from maskrcnn.lib.data.preprocessing import mold_inputs from maskrcnn.lib.config import cfg from maskrcnn.lib.utils import io_utils def test_mold_inputs_ones(): image = np.ones((cfg.IMAGE.MAX_DIM, cfg.IMAGE.MAX_DIM, 3), dtype=np.uint8) * 255 molded_images, image_metas = mold...
30.564103
84
0.661913
import os import numpy as np from maskrcnn.lib.data.preprocessing import mold_inputs from maskrcnn.lib.config import cfg from maskrcnn.lib.utils import io_utils def test_mold_inputs_ones(): image = np.ones((cfg.IMAGE.MAX_DIM, cfg.IMAGE.MAX_DIM, 3), dtype=np.uint8) * 255 molded_images, image_metas = mold...
true
true
f765c85c93ed2d66078f9a7faa18f73e9636f5af
14,052
py
Python
concourse/pipelines/gen_pipeline.py
xiaoxiaoHe-E/gpdb
c33da37bcaf34908268df5f0071cc915d6c09155
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
concourse/pipelines/gen_pipeline.py
xiaoxiaoHe-E/gpdb
c33da37bcaf34908268df5f0071cc915d6c09155
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
concourse/pipelines/gen_pipeline.py
xiaoxiaoHe-E/gpdb
c33da37bcaf34908268df5f0071cc915d6c09155
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 lic...
33.141509
151
0.628665
from __future__ import print_function import argparse import datetime import os import re import subprocess import yaml from jinja2 import Environment, FileSystemLoader PIPELINES_DIR = os.path.dirname(os.path.abspath(__file__)) TEMPLATE_ENVIRONMENT = Environment( autoescape=False, loader=FileSystemLoader(...
true
true
f765c8ebef743f63a0417c6ac9b0926807268f09
5,671
py
Python
Tests/Methods/Slot/test_HoleM51_meth.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Tests/Methods/Slot/test_HoleM51_meth.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Tests/Methods/Slot/test_HoleM51_meth.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @date Created on Tue Feb 02 11:31:45 2016 @copyright (C) 2015-2016 EOMYS ENGINEERING. @author pierre_b """ from unittest import TestCase from ddt import ddt, data from pyleecan.Classes.Segment import Segment from pyleecan.Classes.SurfLine import SurfLine from pyleecan.Classes.LamHole impo...
31.505556
75
0.598131
from unittest import TestCase from ddt import ddt, data from pyleecan.Classes.Segment import Segment from pyleecan.Classes.SurfLine import SurfLine from pyleecan.Classes.LamHole import LamHole from pyleecan.Classes.HoleM51 import HoleM51 from numpy import exp, arcsin, ndarray, pi DELTA = 1e-4 HoleM51_test = list()...
true
true
f765c91a9549f5c6f95ef3e5c937500007dbbfd8
92
py
Python
src/whatdo.py
PatrickDaG/WhatDo
df66e0b8e9296392ae9753c973321f402d7ca26c
[ "MIT" ]
1
2021-12-29T23:34:29.000Z
2021-12-29T23:34:29.000Z
src/whatdo.py
PatrickDaG/WhatDo
df66e0b8e9296392ae9753c973321f402d7ca26c
[ "MIT" ]
null
null
null
src/whatdo.py
PatrickDaG/WhatDo
df66e0b8e9296392ae9753c973321f402d7ca26c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from whatdo.main import main if __name__ == "__main__": main()
13.142857
28
0.673913
from whatdo.main import main if __name__ == "__main__": main()
true
true
f765c954e7d1769655aca8935f6acc43f7cd15b6
4,133
py
Python
quicktracer/quicktracer_lib.py
chapuzzo/quicktracer
284d5b28c5f875dc041107ccf583dee50c8c78a8
[ "MIT" ]
3
2018-01-11T03:36:01.000Z
2019-09-29T14:15:58.000Z
quicktracer/quicktracer_lib.py
chapuzzo/quicktracer
284d5b28c5f875dc041107ccf583dee50c8c78a8
[ "MIT" ]
null
null
null
quicktracer/quicktracer_lib.py
chapuzzo/quicktracer
284d5b28c5f875dc041107ccf583dee50c8c78a8
[ "MIT" ]
3
2018-01-10T22:35:18.000Z
2021-04-14T17:33:51.000Z
import threading from subprocess import Popen, PIPE import math import time import os import sys import inspect import re import atexit import collections import json # Protocol constants KEY = 'k' VALUE = 'v' TIME = 't' CUSTOM_DISPLAY = 'custom_display' VIEW = 'view' VIEW_BOX = 'view_box' GUI_COMMAND = 'python gui_...
29.949275
96
0.646504
import threading from subprocess import Popen, PIPE import math import time import os import sys import inspect import re import atexit import collections import json KEY = 'k' VALUE = 'v' TIME = 't' CUSTOM_DISPLAY = 'custom_display' VIEW = 'view' VIEW_BOX = 'view_box' GUI_COMMAND = 'python gui_pyqtgraph.py' child_p...
true
true
f765c9cc296c5307892f62cb39e57aec21af72cc
423
py
Python
solutions/657_robot_return_to_origin.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
solutions/657_robot_return_to_origin.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
solutions/657_robot_return_to_origin.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
class Solution: def judgeCircle(self, moves: str) -> bool: """String. Running time: O(n) where n == len(moves). """ r, l, u, d = 0, 0, 0, 0 for m in moves: if m == 'U': u += 1 elif m == 'D': d += 1 elif m ==...
23.5
49
0.321513
class Solution: def judgeCircle(self, moves: str) -> bool: r, l, u, d = 0, 0, 0, 0 for m in moves: if m == 'U': u += 1 elif m == 'D': d += 1 elif m == 'R': r += 1 else: l += 1 retu...
true
true
f765ca0af0b24e66dc3b7d51b9bf97e71b2b67aa
3,778
py
Python
venv/lib/python3.6/site-packages/pytz/reference.py
xiegudong45/typeidea
db6504a232d120d6ffa185730bd35b9b9ecffa6c
[ "Apache-2.0" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
checkerista/.env/Lib/site-packages/pytz/reference.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
checkerista/.env/Lib/site-packages/pytz/reference.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
''' Reference tzinfo implementations from the Python docs. Used for testing against as they are only correct for the years 1987 to 2006. Do not use these for real code. ''' from datetime import tzinfo, timedelta, datetime from pytz import HOUR, ZERO, UTC __all__ = [ 'FixedOffset', 'LocalTimezone', 'USTime...
26.794326
76
0.630228
from datetime import tzinfo, timedelta, datetime from pytz import HOUR, ZERO, UTC __all__ = [ 'FixedOffset', 'LocalTimezone', 'USTimeZone', 'Eastern', 'Central', 'Mountain', 'Pacific', 'UTC' ] class FixedOffset(tzinfo): def __init__(self, offset, name): self.__offset = t...
true
true
f765cab51d97b8f56dd93c91f526b89cb224d171
1,205
py
Python
habitat-tracker.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
habitat-tracker.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
habitat-tracker.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
import requests from datetime import datetime USERNAME = "samitha" TOKEN = "" pixela_endpoint = "https://pixe.la/v1/users" user_params = { "token": TOKEN, "username": USERNAME, "agreeTermsOfService": "yes", "notMinor": "yes", } # response = requests.post(url=pixela_endpoint, json=user_p...
21.909091
83
0.645643
import requests from datetime import datetime USERNAME = "samitha" TOKEN = "" pixela_endpoint = "https://pixe.la/v1/users" user_params = { "token": TOKEN, "username": USERNAME, "agreeTermsOfService": "yes", "notMinor": "yes", } graph_endpoint = f"{pixela_endpoint}/{USERNAME}/graphs" ...
true
true
f765caf95255a2e3f9f9de2202f6efe225128519
944
py
Python
isi_sdk_8_2_0/test/test_reports_threats_report.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_0/test/test_reports_threats_report.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_0/test/test_reports_threats_report.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 7 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_2_0 from i...
23.02439
98
0.71822
from __future__ import absolute_import import unittest import isi_sdk_8_2_0 from isi_sdk_8_2_0.models.reports_threats_report import ReportsThreatsReport from isi_sdk_8_2_0.rest import ApiException class TestReportsThreatsReport(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f765cb2582b2b3cdee9ee2c1f4e944150a035732
7,684
py
Python
src/ggrc_basic_permissions/models.py
Killswitchz/ggrc-core
2460df94daf66727af248ad821462692917c97a9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc_basic_permissions/models.py
Killswitchz/ggrc-core
2460df94daf66727af248ad821462692917c97a9
[ "ECL-2.0", "Apache-2.0" ]
10
2018-07-06T00:04:23.000Z
2021-02-26T21:13:20.000Z
src/ggrc_basic_permissions/models.py
Killswitchz/ggrc-core
2460df94daf66727af248ad821462692917c97a9
[ "ECL-2.0", "Apache-2.0" ]
1
2017-11-11T22:16:56.000Z
2017-11-11T22:16:56.000Z
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import json from logging import getLogger from sqlalchemy.orm import backref from ggrc import db from ggrc.models import all_models from ggrc.builder import simple_property from ggrc.models.context import ...
31.109312
79
0.716944
import json from logging import getLogger from sqlalchemy.orm import backref from ggrc import db from ggrc.models import all_models from ggrc.builder import simple_property from ggrc.models.context import Context from ggrc.models.person import Person from ggrc.models.mixins import Base, Described from ggrc.models im...
true
true
f765cb95e1ff917023c66536fb2b4286fc571cc6
2,731
py
Python
homeassistant/components/switch/bbb_gpio.py
TastyPi/home-assistant
aa1e4c564cb8660bf6b7637bc25317ee58869214
[ "MIT" ]
null
null
null
homeassistant/components/switch/bbb_gpio.py
TastyPi/home-assistant
aa1e4c564cb8660bf6b7637bc25317ee58869214
[ "MIT" ]
null
null
null
homeassistant/components/switch/bbb_gpio.py
TastyPi/home-assistant
aa1e4c564cb8660bf6b7637bc25317ee58869214
[ "MIT" ]
null
null
null
""" Allows to configure a switch using BBB GPIO. Switch example for two GPIOs pins P9_12 and P9_42 Allowed GPIO pin name is GPIOxxx or Px_x switch: - platform: bbb_gpio pins: GPIO0_7: name: LED Red P9_12: name: LED Green initial: true invert_logic: true """ import log...
27.039604
76
0.679238
import logging import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA import homeassistant.components.bbb_gpio as bbb_gpio from homeassistant.const import (DEVICE_DEFAULT_NAME, CONF_NAME) from homeassistant.helpers.entity import ToggleEntity import homeassistant.helpers.config_validation...
true
true
f765cbe38c8ab8a7408187a79251900f66fe948b
21,867
py
Python
test/test_db_tools.py
jnguyen1192/SIA
17f411f580635f44a9105953b446bfe44fe4e756
[ "MIT" ]
null
null
null
test/test_db_tools.py
jnguyen1192/SIA
17f411f580635f44a9105953b446bfe44fe4e756
[ "MIT" ]
18
2019-08-10T17:26:18.000Z
2022-03-11T23:59:28.000Z
test/test_db_tools.py
jnguyen1192/SIA
17f411f580635f44a9105953b446bfe44fe4e756
[ "MIT" ]
null
null
null
import unittest import tools.db_tools as dbt import tools.sql_queries as sqt import tools.docker_tools as dtt class TestDb_tools(unittest.TestCase): # @source:http://stezz.blogspot.com/2011/04/calling-only-once-setup-in-unittest-in.html ClassIsSetup = False ClassIsTeardown = 1 # TODO automaticly coun...
42.792564
146
0.548726
import unittest import tools.db_tools as dbt import tools.sql_queries as sqt import tools.docker_tools as dtt class TestDb_tools(unittest.TestCase): ClassIsSetup = False ClassIsTeardown = 1 ClassIsTeardownTotal = 6 def setUp(self): if not self.ClassIsSetup: ...
true
true
f765cbe9e381794fd27c255726aed68354c0dac9
2,594
py
Python
phi/physics/field/angular_velocity.py
VemburajYadav/PhiFlow
842c113d1850569b97e30ab0632866bb5bc4b300
[ "MIT" ]
null
null
null
phi/physics/field/angular_velocity.py
VemburajYadav/PhiFlow
842c113d1850569b97e30ab0632866bb5bc4b300
[ "MIT" ]
null
null
null
phi/physics/field/angular_velocity.py
VemburajYadav/PhiFlow
842c113d1850569b97e30ab0632866bb5bc4b300
[ "MIT" ]
1
2021-05-04T16:31:41.000Z
2021-05-04T16:31:41.000Z
from phi import math, struct from phi.geom import GLOBAL_AXIS_ORDER from .analytic import AnalyticField @struct.definition() class AngularVelocity(AnalyticField): def __init__(self, location, strength=1.0, **kwargs): AnalyticField.__init__(self, rank=None, **struct.kwargs(locals())) def sample_at(s...
37.594203
93
0.628759
from phi import math, struct from phi.geom import GLOBAL_AXIS_ORDER from .analytic import AnalyticField @struct.definition() class AngularVelocity(AnalyticField): def __init__(self, location, strength=1.0, **kwargs): AnalyticField.__init__(self, rank=None, **struct.kwargs(locals())) def sample_at(s...
true
true
f765cc2da4d693a6622cd9a86dbb7bc32b90dbc4
1,008
py
Python
tools/change_fields.py
mtrampont/opentraveldata
94d10fc313f75058079d9a3e1a766c704fbe9488
[ "CC-BY-4.0" ]
208
2015-03-24T13:42:20.000Z
2022-01-16T23:48:02.000Z
tools/change_fields.py
mtrampont/opentraveldata
94d10fc313f75058079d9a3e1a766c704fbe9488
[ "CC-BY-4.0" ]
155
2015-02-11T13:53:43.000Z
2022-03-12T08:25:13.000Z
tools/change_fields.py
mtrampont/opentraveldata
94d10fc313f75058079d9a3e1a766c704fbe9488
[ "CC-BY-4.0" ]
99
2015-01-27T14:32:19.000Z
2022-02-05T15:13:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import with_statement import sys # Fields def main(source, target, sep, fields, old, new): with open(source) as s: with open(target, 'w') as t: for row in s: if not row or row.startswith('#'): ...
21.913043
100
0.493056
from __future__ import with_statement import sys def main(source, target, sep, fields, old, new): with open(source) as s: with open(target, 'w') as t: for row in s: if not row or row.startswith('#'): continue row = row.strip().split(se...
true
true
f765cc899bd9f4dbef2692cfac66530f1e4a0695
13,055
py
Python
scripts/MDCS_UC.py
gbrunner/mdcs-py
3b0da69327559e7b431c9f16a9560eb3e263916b
[ "Apache-2.0" ]
null
null
null
scripts/MDCS_UC.py
gbrunner/mdcs-py
3b0da69327559e7b431c9f16a9560eb3e263916b
[ "Apache-2.0" ]
null
null
null
scripts/MDCS_UC.py
gbrunner/mdcs-py
3b0da69327559e7b431c9f16a9560eb3e263916b
[ "Apache-2.0" ]
null
null
null
#------------------------------------------------------------------------------ # Copyright 2013 Esri # 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/LICENS...
51.196078
191
0.53535
import os import sys import arcpy import datetime class UserCode: def __init__(self): pass def sample00(self, data): base = data['base'] xmlDOM = data['mdcs'] command_used = base.getXMLNodeValue(xmlDOM, 'Command') workspace = data['workspace'] ...
true
true
f765ccf81a2291441248f278a2ae280f62e1c8b5
9,655
py
Python
algorithm/A_star/AnytimeDStar.py
G-H-Li/PathNavigation
1f79e4db93a33ff6d0df549f1d066eb69f922fcf
[ "MIT" ]
1
2022-03-22T09:45:57.000Z
2022-03-22T09:45:57.000Z
algorithm/A_star/AnytimeDStar.py
G-H-Li/PathNavigation
1f79e4db93a33ff6d0df549f1d066eb69f922fcf
[ "MIT" ]
1
2022-03-23T09:20:16.000Z
2022-03-23T09:20:16.000Z
algorithm/A_star/AnytimeDStar.py
G-H-Li/PathNavigation
1f79e4db93a33ff6d0df549f1d066eb69f922fcf
[ "MIT" ]
null
null
null
import math import time from data import obstacles from data.Map import Map from data.plotting import plot_set_title, plot_map, plot_visited, plot_path, plot_set_button_click_callback, \ plot_show, plot_clear, plot_after_compute class AnytimeDStar: def __init__(self, env, start, goal, eps, heuristic_type): ...
29.799383
117
0.492387
import math import time from data import obstacles from data.Map import Map from data.plotting import plot_set_title, plot_map, plot_visited, plot_path, plot_set_button_click_callback, \ plot_show, plot_clear, plot_after_compute class AnytimeDStar: def __init__(self, env, start, goal, eps, heuristic_type): ...
true
true
f765cd74edd8d266b072587d78100da4fecb1810
322
py
Python
dcard/dcard/api.py
UDICatNCHU/KCM-Data-Source-Extractor
f23d587538686f2dd722d3eb3a9a711823adfca0
[ "RSA-MD", "Linux-OpenIB" ]
null
null
null
dcard/dcard/api.py
UDICatNCHU/KCM-Data-Source-Extractor
f23d587538686f2dd722d3eb3a9a711823adfca0
[ "RSA-MD", "Linux-OpenIB" ]
null
null
null
dcard/dcard/api.py
UDICatNCHU/KCM-Data-Source-Extractor
f23d587538686f2dd722d3eb3a9a711823adfca0
[ "RSA-MD", "Linux-OpenIB" ]
null
null
null
DOMAIN = 'https://www.dcard.tw/' forums_url = DOMAIN + '_api/forums' post_url_pattern = DOMAIN + '_api/posts/{post_id}' posts_meta_url_pattern = DOMAIN + '_api/forums/{forum}/posts' post_links_url_pattern = DOMAIN + '_api/posts/{post_id}/links' post_comments_url_pattern = DOMAIN + '_api/posts/{post_id}/comments'...
40.25
69
0.736025
DOMAIN = 'https://www.dcard.tw/' forums_url = DOMAIN + '_api/forums' post_url_pattern = DOMAIN + '_api/posts/{post_id}' posts_meta_url_pattern = DOMAIN + '_api/forums/{forum}/posts' post_links_url_pattern = DOMAIN + '_api/posts/{post_id}/links' post_comments_url_pattern = DOMAIN + '_api/posts/{post_id}/comments'...
true
true
f765cdbd227216e7dd17abf9d23ba3bd33f18871
1,380
py
Python
数据结构/NowCode/A6_MergeSort.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
null
null
null
数据结构/NowCode/A6_MergeSort.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
3
2020-08-14T07:50:27.000Z
2020-08-14T08:51:06.000Z
数据结构/NowCode/A6_MergeSort.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
2
2021-03-14T05:58:45.000Z
2021-08-29T17:25:52.000Z
# 归并排序 class Solution: def MergeSort(self, arrayList): arrayLen = len(arrayList) # 判断输入参数的正确性 if arrayLen < 1: return [] # 归并的出口是当分解到长度为1的时候 if arrayLen == 1: return arrayList # 获取中间索引值 middleIndex = arrayLen >> 1 # 递归左边部分 ...
28.75
61
0.521739
class Solution: def MergeSort(self, arrayList): arrayLen = len(arrayList) if arrayLen < 1: return [] if arrayLen == 1: return arrayList middleIndex = arrayLen >> 1 sortedLeft = self.MergeSort(arrayList[:middleIndex]) ...
true
true
f765ce7d939adc403b1f836c69540bc5103cd0c9
3,425
py
Python
WIN_NetFirewallRule_Inbound/OS_gathering/files/extracting.py
exastro-playbook-collection/OS-Windows2019
79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf
[ "Apache-2.0" ]
null
null
null
WIN_NetFirewallRule_Inbound/OS_gathering/files/extracting.py
exastro-playbook-collection/OS-Windows2019
79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf
[ "Apache-2.0" ]
null
null
null
WIN_NetFirewallRule_Inbound/OS_gathering/files/extracting.py
exastro-playbook-collection/OS-Windows2019
79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf
[ "Apache-2.0" ]
1
2021-09-29T05:39:41.000Z
2021-09-29T05:39:41.000Z
import re import json import sys import os args = sys.argv if (len(args) < 2): sys.exit(1) path = args[1] if(path[-1:] == "/"): path = path[:-1] result_filedata_list = [] interface_info = {} target_filepath_list = [] target_filepath_list.append('/1/stdout.txt') target_filepath_list.append('/2/stdout.txt') ...
37.637363
78
0.551241
import re import json import sys import os args = sys.argv if (len(args) < 2): sys.exit(1) path = args[1] if(path[-1:] == "/"): path = path[:-1] result_filedata_list = [] interface_info = {} target_filepath_list = [] target_filepath_list.append('/1/stdout.txt') target_filepath_list.append('/2/stdout.txt') ...
true
true
f765d0ef04d1e111a71e032927818671e91a414b
218
py
Python
modules/custom_input.py
RiotMesh/ZTK-ExFilter
a9521ff007c7b534cbac11d8f8139bace3395ee4
[ "Apache-2.0" ]
null
null
null
modules/custom_input.py
RiotMesh/ZTK-ExFilter
a9521ff007c7b534cbac11d8f8139bace3395ee4
[ "Apache-2.0" ]
null
null
null
modules/custom_input.py
RiotMesh/ZTK-ExFilter
a9521ff007c7b534cbac11d8f8139bace3395ee4
[ "Apache-2.0" ]
null
null
null
from colorama import init as initColorama from colorama import Fore, Back, Style initColorama() inputPrefix = ">> " def input_(message): return input(Fore.LIGHTGREEN_EX + inputPrefix + Style.RESET_ALL + message)
24.222222
78
0.761468
from colorama import init as initColorama from colorama import Fore, Back, Style initColorama() inputPrefix = ">> " def input_(message): return input(Fore.LIGHTGREEN_EX + inputPrefix + Style.RESET_ALL + message)
true
true
f765d226658cae9a93fa54a59827ff4f0c359b37
11,891
py
Python
v1.2.py
cwpyzlos/cwpyzlos.github.io
05294803070ae626344075f568eba1c1b3c57c33
[ "Apache-2.0" ]
null
null
null
v1.2.py
cwpyzlos/cwpyzlos.github.io
05294803070ae626344075f568eba1c1b3c57c33
[ "Apache-2.0" ]
null
null
null
v1.2.py
cwpyzlos/cwpyzlos.github.io
05294803070ae626344075f568eba1c1b3c57c33
[ "Apache-2.0" ]
null
null
null
import math import tkinter import time import random import turtle import os ZLOS=input('请输入: 1.计算器 2.随机数生成器(原创) 3.猜随机数(原创) 4.时钟 5.exit') if ZLOS==str(1): root = tkinter.Tk() root.resizable(width=False, height=False) '''hypeparameter''' # 是否按下了运算符 IS_CALC = False # 存储数字 STORAGE...
42.166667
125
0.470103
import math import tkinter import time import random import turtle import os ZLOS=input('请输入: 1.计算器 2.随机数生成器(原创) 3.猜随机数(原创) 4.时钟 5.exit') if ZLOS==str(1): root = tkinter.Tk() root.resizable(width=False, height=False) IS_CALC = False STORAGE = [] MAXSHOWLEN = 18 Curre...
true
true
f765d3e25f4ba2746802f6d0edf59ef17bf85983
13,730
py
Python
bin/parseSAM.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
5
2017-09-18T18:21:26.000Z
2020-05-01T23:29:26.000Z
bin/parseSAM.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
3
2018-11-26T16:35:12.000Z
2021-11-22T07:16:51.000Z
bin/parseSAM.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
4
2018-01-02T13:06:39.000Z
2020-04-14T13:20:52.000Z
#!/usr/bin/python import sys import re from operator import itemgetter, attrgetter import bisect from datetime import * import traceback valid_cigar = set("0123456789MNID") read_len_margin = 0 ### Adds missing starting points when exon length is 1 ########## def update_missing_points(points_idx, points): poi...
34.847716
171
0.578296
import sys import re from operator import itemgetter, attrgetter import bisect from datetime import * import traceback valid_cigar = set("0123456789MNID") read_len_margin = 0 def update_missing_points(points_idx, points): points_temp = [] last_idx = int(points_idx[-1][1:]) idx = 0 i = 0 while...
false
true
f765d480c233cfc84857c2e2f3928c8daab084da
10,302
py
Python
txpipe/theory.py
Lhior/TXPipe
58fd7612326779d4c1b0e499157dddc9e3b524c0
[ "BSD-3-Clause" ]
9
2018-03-17T02:07:52.000Z
2022-02-23T20:25:48.000Z
txpipe/theory.py
Lhior/TXPipe
58fd7612326779d4c1b0e499157dddc9e3b524c0
[ "BSD-3-Clause" ]
162
2018-03-06T16:18:23.000Z
2022-03-21T18:11:37.000Z
txpipe/theory.py
Lhior/TXPipe
58fd7612326779d4c1b0e499157dddc9e3b524c0
[ "BSD-3-Clause" ]
7
2018-07-26T11:49:46.000Z
2022-02-23T22:14:48.000Z
from .base_stage import PipelineStage from .data_types import FiducialCosmology, SACCFile import numpy as np class TXTwoPointTheoryReal(PipelineStage): """ Compute theory in CCL in real space and save to a sacc file. """ name = "TXTwoPointTheoryReal" inputs = [ ("twopoint_data_real", SACC...
34.804054
93
0.553096
from .base_stage import PipelineStage from .data_types import FiducialCosmology, SACCFile import numpy as np class TXTwoPointTheoryReal(PipelineStage): name = "TXTwoPointTheoryReal" inputs = [ ("twopoint_data_real", SACCFile), ("fiducial_cosmology", FiducialCosmology), ] outputs = [ ...
true
true
f765d50be5b91b724d870cf0f5ed41706385e81c
1,451
py
Python
po_localization/tests/test_strings.py
movermeyer/po-localization
0e17052d955d9a7eb304465dad8b2566feaf019e
[ "MIT" ]
1
2019-11-10T19:34:27.000Z
2019-11-10T19:34:27.000Z
po_localization/tests/test_strings.py
movermeyer/po-localization
0e17052d955d9a7eb304465dad8b2566feaf019e
[ "MIT" ]
null
null
null
po_localization/tests/test_strings.py
movermeyer/po-localization
0e17052d955d9a7eb304465dad8b2566feaf019e
[ "MIT" ]
1
2018-03-05T01:08:54.000Z
2018-03-05T01:08:54.000Z
# coding=utf-8 from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from unittest import TestCase from po_localization.strings import escape, unescape, UnescapeError class EscapeTextCase(TestCase): def test_empty(self): self.assertEqual("",...
30.87234
95
0.645762
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from unittest import TestCase from po_localization.strings import escape, unescape, UnescapeError class EscapeTextCase(TestCase): def test_empty(self): self.assertEqual("", escape("")) ...
true
true
f765d575cc14258e7aab937ed297847caa920ebf
294
py
Python
output/models/nist_data/atomic/unsigned_int/schema_instance/nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/unsigned_int/schema_instance/nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/unsigned_int/schema_instance/nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.unsigned_int.schema_instance.nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4_xsd.nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4 import NistschemaSvIvAtomicUnsignedIntMaxInclusive4 __all__ = [ "NistschemaSvIvAtomicUnsignedIntMaxInclusive4", ]
49
226
0.908163
from output.models.nist_data.atomic.unsigned_int.schema_instance.nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4_xsd.nistschema_sv_iv_atomic_unsigned_int_max_inclusive_4 import NistschemaSvIvAtomicUnsignedIntMaxInclusive4 __all__ = [ "NistschemaSvIvAtomicUnsignedIntMaxInclusive4", ]
true
true
f765d5a4d415beb904472b648010fbfc016786dd
1,008
py
Python
pythontabcmd2/parsers/list_sites_parser.py
playkazoomedia/tabcmd2
a89db9be6047d95379a7c88264236e9cb3e78189
[ "MIT" ]
11
2020-09-02T03:41:01.000Z
2022-01-20T12:38:20.000Z
pythontabcmd2/parsers/list_sites_parser.py
playkazoomedia/tabcmd2
a89db9be6047d95379a7c88264236e9cb3e78189
[ "MIT" ]
19
2020-09-03T04:54:47.000Z
2022-01-31T17:41:19.000Z
pythontabcmd2/parsers/list_sites_parser.py
playkazoomedia/tabcmd2
a89db9be6047d95379a7c88264236e9cb3e78189
[ "MIT" ]
6
2020-11-21T15:45:51.000Z
2022-01-24T12:26:20.000Z
import sys from .parent_parser import ParentParser class ListSitesParser: """ Parser to list sites """ @staticmethod def list_site_parser(): """Method to parse list sites arguments passed by the user""" parent_parser = ParentParser() parser = parent_parser.parent_parser_wit...
38.769231
77
0.535714
import sys from .parent_parser import ParentParser class ListSitesParser: @staticmethod def list_site_parser(): parent_parser = ParentParser() parser = parent_parser.parent_parser_with_global_options() subparsers = parser.add_subparsers() edit_site_parser = subparsers.add_parse...
true
true
f765d5c5c50a4e367536fa355cbf387590c83f76
1,205
py
Python
utils/downloader.py
mutazag/ilab1
c37ae969d0fa13029ee08e7c0e102990e98e65b9
[ "MIT" ]
null
null
null
utils/downloader.py
mutazag/ilab1
c37ae969d0fa13029ee08e7c0e102990e98e65b9
[ "MIT" ]
32
2019-09-15T09:48:23.000Z
2019-10-28T05:08:17.000Z
utils/downloader.py
mutazag/ilab1
c37ae969d0fa13029ee08e7c0e102990e98e65b9
[ "MIT" ]
null
null
null
import requests import re from pathlib import Path import os def get_file_name_from_cd(cd): """ GET FILE NAME FORM CONTENT-DISPOSITION ATTRIBUTE OF RESPONSE HEADER Arguments: cd {string} -- content-disposition attribute of a response header, usually: r.headers.get('content-disposition') """ if...
26.195652
120
0.639834
import requests import re from pathlib import Path import os def get_file_name_from_cd(cd): if not cd: return None fname = re.findall('filename=(.+)', cd) if (fname) == 0: return None return fname[0] def get_file_name_from_resposne(r): if not r: return None return...
true
true
f765d66c7870c76263d294b157b004ff23b9ef37
805
py
Python
shop/serializers/defaults/order_item.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
2,160
2016-01-24T05:08:59.000Z
2022-03-31T12:15:30.000Z
shop/serializers/defaults/order_item.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
455
2016-01-29T22:41:33.000Z
2022-03-23T08:28:01.000Z
shop/serializers/defaults/order_item.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
818
2016-02-01T15:09:07.000Z
2022-03-28T19:52:26.000Z
from rest_framework import serializers from shop.conf import app_settings from shop.serializers.bases import BaseOrderItemSerializer class OrderItemSerializer(BaseOrderItemSerializer): summary = serializers.SerializerMethodField( help_text="Sub-serializer for fields to be shown in the product's summary.")...
42.368421
93
0.720497
from rest_framework import serializers from shop.conf import app_settings from shop.serializers.bases import BaseOrderItemSerializer class OrderItemSerializer(BaseOrderItemSerializer): summary = serializers.SerializerMethodField( help_text="Sub-serializer for fields to be shown in the product's summary.")...
true
true
f765d67c44cf534db9b28aecf97336b19d3eef6a
2,486
py
Python
thaniya_common/src/thaniya_common/cfg/CfgComponent_Defs.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
1
2021-01-20T18:27:22.000Z
2021-01-20T18:27:22.000Z
thaniya_common/src/thaniya_common/cfg/CfgComponent_Defs.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
null
null
null
thaniya_common/src/thaniya_common/cfg/CfgComponent_Defs.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
null
null
null
import typing import re import jk_prettyprintobj from .CfgKeyValueDefinition import CfgKeyValueDefinition class CfgComponent_Defs(jk_prettyprintobj.DumpMixin): ################################################################################################################################ ## Constructors ...
27.622222
129
0.399437
import typing import re import jk_prettyprintobj from .CfgKeyValueDefinition import CfgKeyValueDefinition class CfgComponent_Defs(jk_prettyprintobj.DumpMixin): def __init__(self): self.__definitions = {} self.__replacements = {} self.__replacementsReverse = {} def _dump(self, ctx:jk_p...
true
true
f765d6f1a6b20fb2b698884bdee2bd4e64468b58
4,590
py
Python
src/m3.py
liy14/05a-Debugging
ba1c68fb9f4c8616c713616c8740048ed084c66c
[ "MIT" ]
null
null
null
src/m3.py
liy14/05a-Debugging
ba1c68fb9f4c8616c713616c8740048ed084c66c
[ "MIT" ]
null
null
null
src/m3.py
liy14/05a-Debugging
ba1c68fb9f4c8616c713616c8740048ed084c66c
[ "MIT" ]
null
null
null
""" This module lets you practice DEBUGGING when LOGIC ERRORS occur. That is, no run-time exception occurs, but the function simply does not do the right thing. Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder, their colleagues and Yi Li. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE....
33.75
72
0.522222
def main(): run_test_broken_1() def is_prime(n): for k in range(2, (n // 2) + 1): if n % k == 0: return False return True def run_test_broken_1(): print() print('--------------------------------------------------') print('Testing the broken_1 function:') prin...
true
true
f765d6f754d556e1ebb08104a20039d5c2de4f7c
3,935
py
Python
test/functional/test_script_address2.py
cassio123456/bitcoinevelin
d80511c311dc54da3df88f6e655c32586f5b00d5
[ "MIT" ]
null
null
null
test/functional/test_script_address2.py
cassio123456/bitcoinevelin
d80511c311dc54da3df88f6e655c32586f5b00d5
[ "MIT" ]
null
null
null
test/functional/test_script_address2.py
cassio123456/bitcoinevelin
d80511c311dc54da3df88f6e655c32586f5b00d5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 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 new Bitcoinevelin multisig prefix functionality. # from test_framework.test_framework import Bi...
40.153061
93
0.652859
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import decimal class ScriptAddress2Test(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 3 self.setup_clean_chain = False def setup_network(self): se...
true
true
f765d7b51077a55fe17ec4ba99929d7f3adc3878
3,730
py
Python
src/MiG/settings.py
gchilczuk/MiGProject
593ffab61b8c780a53b1ec32c2659a6f18510c48
[ "MIT" ]
2
2017-05-19T12:41:44.000Z
2017-10-21T17:47:40.000Z
src/MiG/settings.py
gchilczuk/MiGProject
593ffab61b8c780a53b1ec32c2659a6f18510c48
[ "MIT" ]
null
null
null
src/MiG/settings.py
gchilczuk/MiGProject
593ffab61b8c780a53b1ec32c2659a6f18510c48
[ "MIT" ]
null
null
null
""" Django settings for MiG project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os imp...
26.453901
91
0.697051
import os import json from django.core.exceptions import ImproperlyConfigured BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) with open(os.path.join(BASE_DIR, 'secrets.json')) as secrets_file: secrets = json.load(secrets_file) def get_secret(setting, secrets=secrets): try: ret...
true
true
f765d82a88e8048db9a16b7624507ee60fbe5ddd
7,874
py
Python
airflow/contrib/hooks/sftp_hook.py
InigoSJ/airflow
8b97a387dc30d8c88390d500ec99333798c20f1c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2019-03-28T05:59:39.000Z
2019-10-03T22:05:25.000Z
airflow/contrib/hooks/sftp_hook.py
InigoSJ/airflow
8b97a387dc30d8c88390d500ec99333798c20f1c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
7
2019-03-27T07:58:14.000Z
2020-02-12T17:42:33.000Z
airflow/contrib/hooks/sftp_hook.py
upjohnc/airflow-upjohn-k8s
caadbc1618d73e054de99138b0892cea3a9327c4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
5
2017-06-19T19:55:47.000Z
2020-10-10T00:49:20.000Z
# -*- coding: utf-8 -*- # # 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 #...
36.623256
87
0.59398
import stat import pysftp import datetime from airflow.contrib.hooks.ssh_hook import SSHHook class SFTPHook(SSHHook): def __init__(self, ftp_conn_id='sftp_default', *args, **kwargs): kwargs['ssh_conn_id'] = ftp_conn_id super().__init__(*args, **kwargs) self.conn = None self.priv...
true
true
f765d91bcf1ddf82ab9621b9b394739de5dd46e0
8,664
py
Python
env/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
avdhari/enigma
b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c
[ "MIT" ]
32
2019-11-14T07:49:33.000Z
2022-02-16T00:49:22.000Z
env/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
avdhari/enigma
b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c
[ "MIT" ]
44
2020-07-21T10:40:23.000Z
2020-08-03T17:34:21.000Z
env/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
avdhari/enigma
b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c
[ "MIT" ]
16
2019-06-25T13:26:43.000Z
2022-03-07T07:29:12.000Z
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import, unicode_literals import json import logging from .. import errors from ..request_validator import RequestValidator from .base import GrantTypeBase log = logging.getLogger(_...
42.679803
112
0.619229
from __future__ import absolute_import, unicode_literals import json import logging from .. import errors from ..request_validator import RequestValidator from .base import GrantTypeBase log = logging.getLogger(__name__) class ResourceOwnerPasswordCredentialsGrant(GrantTypeBase): def create_token_response(se...
true
true
f765d9f2a013fb5d89af7fd900e045001926f8fe
527
py
Python
brain/tests/models/test_sqlobjects_Job.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
248
2015-01-08T09:36:44.000Z
2022-01-12T10:29:21.000Z
brain/tests/models/test_sqlobjects_Job.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
50
2015-01-09T08:31:57.000Z
2022-03-30T10:41:13.000Z
brain/tests/models/test_sqlobjects_Job.py
krisshol/bach-kmno
f40d85b3397bb340e26a671c54d4a753dbbb0d43
[ "Apache-2.0" ]
74
2015-01-05T09:11:21.000Z
2022-03-29T02:16:54.000Z
from unittest import TestCase from brain.models.sqlobjects import Job class TestModelsJob(TestCase): def setUp(self): self.scan_id = "scan_id" self.filename = "filename" self.probename = "probename" def test___init__(self): job = Job(self.scan_id, self.filename, self.probenam...
29.277778
62
0.688805
from unittest import TestCase from brain.models.sqlobjects import Job class TestModelsJob(TestCase): def setUp(self): self.scan_id = "scan_id" self.filename = "filename" self.probename = "probename" def test___init__(self): job = Job(self.scan_id, self.filename, self.probenam...
true
true
f765da84e59b131c6253a2ef63779d3d15259aef
2,699
py
Python
deep_utils/callbacks/torch/model_checkpoint.py
MenuaB/deep_utils
b1b936f4780ea7dc52224f53f5116288c5b0a804
[ "MIT" ]
2
2022-01-11T06:13:11.000Z
2022-01-25T11:49:38.000Z
deep_utils/callbacks/torch/model_checkpoint.py
MenuaB/deep_utils
b1b936f4780ea7dc52224f53f5116288c5b0a804
[ "MIT" ]
null
null
null
deep_utils/callbacks/torch/model_checkpoint.py
MenuaB/deep_utils
b1b936f4780ea7dc52224f53f5116288c5b0a804
[ "MIT" ]
null
null
null
import os from deep_utils.utils.os_utils.os_path import split_extension class ModelCheckPoint: def __init__(self, model_path, model, monitor='min', save_best_only=True, overwrite=True, verbose=True, ...
35.513158
90
0.577621
import os from deep_utils.utils.os_utils.os_path import split_extension class ModelCheckPoint: def __init__(self, model_path, model, monitor='min', save_best_only=True, overwrite=True, verbose=True, ...
true
true
f765dae2613025c9cd0b9b4ef4e6bd858d8f9a2f
3,749
py
Python
laia/utils/dortmund_image_to_tensor.py
basbeu/PyLaia
d14458484b56622204b1730a7d53220c5d0f1bc1
[ "MIT" ]
2
2020-09-10T13:31:17.000Z
2021-07-31T09:44:17.000Z
laia/utils/dortmund_image_to_tensor.py
basbeu/PyLaia
d14458484b56622204b1730a7d53220c5d0f1bc1
[ "MIT" ]
1
2020-12-06T18:11:52.000Z
2020-12-06T18:19:38.000Z
laia/utils/dortmund_image_to_tensor.py
basbeu/PyLaia
d14458484b56622204b1730a7d53220c5d0f1bc1
[ "MIT" ]
2
2020-04-20T13:40:56.000Z
2020-10-17T11:59:55.000Z
from __future__ import absolute_import from __future__ import division import cv2 import numpy as np import torch from PIL import Image, ImageOps def dortmund_distort(img, random_limits=(0.8, 1.1)): """ Creates an augmentation by computing a homography from three points in the image to three randomly gen...
36.754902
88
0.614564
from __future__ import absolute_import from __future__ import division import cv2 import numpy as np import torch from PIL import Image, ImageOps def dortmund_distort(img, random_limits=(0.8, 1.1)): y, x = img.shape[:2] src_point = np.float32([[x / 2, y / 3], [2 * x / 3, 2 * y / 3], [x / 3, 2 * y / 3]]) ...
true
true
f765db2e87c974da419969d6949e4fb35082029d
7,059
py
Python
examples/Common/Others/sdcard.py
myhumankit/ESP32_IDE_accessible
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
1
2020-07-27T19:32:56.000Z
2020-07-27T19:32:56.000Z
examples/Common/Others/sdcard.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
null
null
null
examples/Common/Others/sdcard.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
null
null
null
""" Micro Python driver for SD cards using SPI bus. Requires an SPI bus and a CS pin. Provides readblocks and writeblocks methods so the device can be mounted as a filesystem. Example usage on pyboard: import pyb, sdcard, os sd = sdcard.SDCard(pyb.SPI(1), pyb.Pin.board.X5) pyb.mount(sd, '/sd2') os.l...
25.857143
70
0.603202
from micropython import const import time _CMD_TIMEOUT = const(100) _R1_IDLE_STATE = const(1 << 0) _R1_ILLEGAL_COMMAND = const(1 << 2) _TOKEN_CMD25 = const(0xfc) _TOKEN_STOP_TRAN = const(0xfd) _TOKEN_DATA = const(0xfe) class SDCard: def __init__(self, spi, cs): self.spi = spi self.cs = cs self.cmdb...
true
true
f765db85bc41f486f8038cce955691eb3f4ff6b0
1,274
py
Python
rlberry/wrappers/gym_utils.py
antoine-moulin/rlberry
676af9d1bb9094a6790a9aa3ff7e67b13584a183
[ "MIT" ]
86
2020-11-20T21:02:27.000Z
2022-03-07T14:57:40.000Z
rlberry/wrappers/gym_utils.py
antoine-moulin/rlberry
676af9d1bb9094a6790a9aa3ff7e67b13584a183
[ "MIT" ]
103
2020-11-17T12:31:21.000Z
2022-03-28T13:46:16.000Z
rlberry/wrappers/gym_utils.py
antoine-moulin/rlberry
676af9d1bb9094a6790a9aa3ff7e67b13584a183
[ "MIT" ]
20
2020-11-23T01:47:50.000Z
2022-03-25T07:45:24.000Z
import gym from rlberry.spaces import Discrete from rlberry.spaces import Box from rlberry.spaces import Tuple from rlberry.spaces import MultiDiscrete from rlberry.spaces import MultiBinary from rlberry.spaces import Dict def convert_space_from_gym(gym_space): if isinstance(gym_space, gym.spaces.Discrete): ...
28.954545
75
0.649922
import gym from rlberry.spaces import Discrete from rlberry.spaces import Box from rlberry.spaces import Tuple from rlberry.spaces import MultiDiscrete from rlberry.spaces import MultiBinary from rlberry.spaces import Dict def convert_space_from_gym(gym_space): if isinstance(gym_space, gym.spaces.Discrete): ...
true
true
f765dbccbef4e083fe58929c1395dcf2ae49a2cb
531
py
Python
api/use_cases/encryption/makeEncryptString.py
potofpie/message-frame
6337ca1161464e733a99704a15a4b696cce756db
[ "MIT" ]
null
null
null
api/use_cases/encryption/makeEncryptString.py
potofpie/message-frame
6337ca1161464e733a99704a15a4b696cce756db
[ "MIT" ]
null
null
null
api/use_cases/encryption/makeEncryptString.py
potofpie/message-frame
6337ca1161464e733a99704a15a4b696cce756db
[ "MIT" ]
null
null
null
import base64 def makeEncryptString(Crypto, createLogger): def encryptString(publicKey, string): logger = createLogger(__name__) pubKey = Crypto.PublicKey.RSA.importKey(str.encode(publicKey)) encryptedString = pubKey.encrypt(string.encode('utf-8'),5000) base64StringEncrypted = ...
48.272727
97
0.721281
import base64 def makeEncryptString(Crypto, createLogger): def encryptString(publicKey, string): logger = createLogger(__name__) pubKey = Crypto.PublicKey.RSA.importKey(str.encode(publicKey)) encryptedString = pubKey.encrypt(string.encode('utf-8'),5000) base64StringEncrypted = ...
true
true
f765dbe11e6d1ae9e6f85ac78dcedd1c1d39f5ff
2,577
py
Python
tap/problemal/solucion.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
tap/problemal/solucion.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
tap/problemal/solucion.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import collections Nodo = collections.namedtuple('Nodo', 'diametro nodo_izq nodo_der') def puede_colocar_tira(info_tiras): diametro_mayor, _ = info_tiras[0] arbol_pelotitas = crear_arbol_pelotas(diametro_mayor) arbol_luces = crear_arbol_luces(info_tiras[1]) puede_colocar = co...
28.01087
70
0.669771
import collections Nodo = collections.namedtuple('Nodo', 'diametro nodo_izq nodo_der') def puede_colocar_tira(info_tiras): diametro_mayor, _ = info_tiras[0] arbol_pelotitas = crear_arbol_pelotas(diametro_mayor) arbol_luces = crear_arbol_luces(info_tiras[1]) puede_colocar = contiene_arbol(arbol_pelot...
true
true
f765dbe67b8f17d4538b9e3e0da826703ef254d2
250
py
Python
custom_components/midea_ac_lan/const.py
georgezhao2010/midea_ac_lan
bc855db6254d6f668a14a53c0efe65685d6efdd5
[ "MIT" ]
2
2021-08-29T00:54:42.000Z
2022-03-08T15:17:12.000Z
custom_components/midea_ac_lan/const.py
georgezhao2010/midea_ac_lan
bc855db6254d6f668a14a53c0efe65685d6efdd5
[ "MIT" ]
1
2021-08-29T02:58:41.000Z
2021-08-31T07:33:05.000Z
custom_components/midea_ac_lan/const.py
georgezhao2010/midea_ac_lan
bc855db6254d6f668a14a53c0efe65685d6efdd5
[ "MIT" ]
1
2021-09-08T09:11:31.000Z
2021-09-08T09:11:31.000Z
DOMAIN = "midea_ac_lan" DEVICES = "devices" MANAGERS = "managers" CONF_K1 = "k1" CONF_MAKE_SWITCH = "make_switch" FAN_VERY_LOW = "very low" FAN_VERY_HIGH = "very high" FAN_FULL_SPEED = "full speed" TEMPERATURE_MAX = 30 TEMPERATURE_MIN = 17
22.727273
33
0.724
DOMAIN = "midea_ac_lan" DEVICES = "devices" MANAGERS = "managers" CONF_K1 = "k1" CONF_MAKE_SWITCH = "make_switch" FAN_VERY_LOW = "very low" FAN_VERY_HIGH = "very high" FAN_FULL_SPEED = "full speed" TEMPERATURE_MAX = 30 TEMPERATURE_MIN = 17
true
true
f765dbe6b69ebeea0d432dacbb3a08f8dd57b375
1,065
py
Python
libra/cli/color.py
MaslDi/libra-client
0983adfcb6787f7a16de4bf364cdf5596c183d88
[ "MIT" ]
1
2021-01-21T02:48:26.000Z
2021-01-21T02:48:26.000Z
libra/cli/color.py
MaslDi/libra-client
0983adfcb6787f7a16de4bf364cdf5596c183d88
[ "MIT" ]
null
null
null
libra/cli/color.py
MaslDi/libra-client
0983adfcb6787f7a16de4bf364cdf5596c183d88
[ "MIT" ]
null
null
null
import sys import os _force_color = None def set_force_color(force_color): global _force_color _force_color = force_color def support_color(): if _force_color is not None: return _force_color if not sys.stdout.isatty(): return False if os.name == 'posix': re...
24.204545
82
0.566197
import sys import os _force_color = None def set_force_color(force_color): global _force_color _force_color = force_color def support_color(): if _force_color is not None: return _force_color if not sys.stdout.isatty(): return False if os.name == 'posix': re...
true
true
f765dd8890d0c585666f7edaa9f65cc0cd8b75b6
2,381
py
Python
tools/accuracy_checker/accuracy_checker/representation/pose_estimation_representation.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
1
2021-02-20T21:48:36.000Z
2021-02-20T21:48:36.000Z
tools/accuracy_checker/accuracy_checker/representation/pose_estimation_representation.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
null
null
null
tools/accuracy_checker/accuracy_checker/representation/pose_estimation_representation.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
1
2018-12-14T07:52:51.000Z
2018-12-14T07:52:51.000Z
""" Copyright (c) 2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
37.203125
115
0.687946
import numpy as np from .base_representation import BaseRepresentation class PoseEstimationRepresentation(BaseRepresentation): def __init__(self, identifier='', x_values=None, y_values=None, visibility=None, labels=None): super().__init__(identifier) self.x_values = x_values if np.size(x_values) ...
true
true
f765dda3f5d06c2c0aef82e27f60f1daa9875f53
1,800
py
Python
h2o-py/tests/testdir_munging/binop/pyunit_binop2_lte.py
PawarPawan/h2o-v3
cf569a538c9e2ec16ba9fc1a75d14beda8f40c18
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_munging/binop/pyunit_binop2_lte.py
PawarPawan/h2o-v3
cf569a538c9e2ec16ba9fc1a75d14beda8f40c18
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_munging/binop/pyunit_binop2_lte.py
PawarPawan/h2o-v3
cf569a538c9e2ec16ba9fc1a75d14beda8f40c18
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(1, "../../../") import h2o def binop_lte(ip,port): iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris_wheader.csv")) rows, cols = iris.dim iris.show() #frame/scaler res = iris <= 5 res_rows, res_cols = res.dim assert res_rows == rows and res_c...
27.272727
87
0.615556
import sys sys.path.insert(1, "../../../") import h2o def binop_lte(ip,port): iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris_wheader.csv")) rows, cols = iris.dim iris.show() res = iris <= 5 res_rows, res_cols = res.dim assert res_rows == rows and res_cols == cols, "...
true
true
f765ddc2d4cfe9e9b1f74a6e6bf416094cc1528c
178
py
Python
dartcms/apps/ads/apps.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
26
2015-01-12T09:47:32.000Z
2021-04-15T14:09:49.000Z
dartcms/apps/ads/apps.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
41
2016-07-04T06:55:31.000Z
2019-07-31T14:11:53.000Z
dartcms/apps/ads/apps.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
12
2015-01-20T09:51:53.000Z
2021-01-26T16:51:47.000Z
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class AdsConfig(AppConfig): name = 'dartcms.apps.ads' verbose_name = _('Ads')
22.25
55
0.752809
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class AdsConfig(AppConfig): name = 'dartcms.apps.ads' verbose_name = _('Ads')
true
true
f765df9f1f4d9147f66ae4415004867adda376c6
1,870
py
Python
examples/basics/scene/surface_plot.py
hmaarrfk/vispy
7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2
[ "BSD-3-Clause" ]
3
2019-02-28T16:05:33.000Z
2020-05-03T21:29:03.000Z
examples/basics/scene/surface_plot.py
hmaarrfk/vispy
7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2
[ "BSD-3-Clause" ]
1
2021-06-04T13:48:46.000Z
2021-06-05T10:57:33.000Z
examples/basics/scene/surface_plot.py
hmaarrfk/vispy
7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2
[ "BSD-3-Clause" ]
1
2018-09-17T07:00:38.000Z
2018-09-17T07:00:38.000Z
# -*- coding: utf-8 -*- # vispy: gallery 30 # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -----------------------------------------------------------...
33.392857
79
0.602674
import sys import numpy as np from vispy import app, scene from vispy.util.filter import gaussian_filter canvas = scene.SceneCanvas(keys='interactive', bgcolor='w') view = canvas.central_widget.add_view() view.camera = scene.TurntableCamera(up='z', fov=60) z = np.random.normal(size=(250, 250), scale=200) z[100, 10...
true
true
f765dfedaf5021691c52deee07658cc85fbe37c4
875
py
Python
docker/test/integration/minifi/core/SyslogUdpClientContainer.py
nandorsoma/nifi-minifi-cpp
182e5b98a390d6073c43ffc88ecf7511ad0d3ff5
[ "Apache-2.0" ]
null
null
null
docker/test/integration/minifi/core/SyslogUdpClientContainer.py
nandorsoma/nifi-minifi-cpp
182e5b98a390d6073c43ffc88ecf7511ad0d3ff5
[ "Apache-2.0" ]
null
null
null
docker/test/integration/minifi/core/SyslogUdpClientContainer.py
nandorsoma/nifi-minifi-cpp
182e5b98a390d6073c43ffc88ecf7511ad0d3ff5
[ "Apache-2.0" ]
null
null
null
import logging from .Container import Container class SyslogUdpClientContainer(Container): def __init__(self, name, vols, network, image_store, command=None): super().__init__(name, 'syslog-udp-client', vols, network, image_store, command) def get_startup_finished_log_entry(self): return "Sys...
36.458333
152
0.651429
import logging from .Container import Container class SyslogUdpClientContainer(Container): def __init__(self, name, vols, network, image_store, command=None): super().__init__(name, 'syslog-udp-client', vols, network, image_store, command) def get_startup_finished_log_entry(self): return "Sys...
true
true
f765e06bd8ebe154f1ea05450f7b558edc4add9c
2,720
py
Python
jobSub/settings.py
myyyy/weizuoye
381babb99463dc819e51be3add5a57d17400ff26
[ "BSD-3-Clause" ]
1
2015-11-25T02:17:06.000Z
2015-11-25T02:17:06.000Z
jobSub/settings.py
myyyy/jobSub
381babb99463dc819e51be3add5a57d17400ff26
[ "BSD-3-Clause" ]
null
null
null
jobSub/settings.py
myyyy/jobSub
381babb99463dc819e51be3add5a57d17400ff26
[ "BSD-3-Clause" ]
null
null
null
#coding=utf-8 """ Django settings for workPush project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """...
25.420561
71
0.702941
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'd4@up+5nvv0k$#9dt49ay$ymk+54h6o1(cjqpha6&0bo=l@=rw' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django_admin_bootstrapped', 'django.contrib.admin', 'django.contrib.auth',...
true
true
f765e06d18724299a39b146feb46d34b9d0e0d84
12,662
py
Python
platformio/telemetry.py
StefanBruens/platformio-core
4f1ccfe58ff5719cb72c213093a173023b960782
[ "Apache-2.0" ]
1
2020-04-20T04:29:58.000Z
2020-04-20T04:29:58.000Z
platformio/telemetry.py
StefanBruens/platformio-core
4f1ccfe58ff5719cb72c213093a173023b960782
[ "Apache-2.0" ]
null
null
null
platformio/telemetry.py
StefanBruens/platformio-core
4f1ccfe58ff5719cb72c213093a173023b960782
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
28.777273
87
0.554415
import atexit import os import platform import re import sys import threading from collections import deque from time import sleep, time from traceback import format_exc import click import requests from platformio import __version__, app, exception, util from platformio.commands import PlatformioCLI from platformio...
true
true
f765e1a367646e3729d4d5fb439076d87c6bc1df
1,713
py
Python
Q06__/98_Partition_to_K_Equal_Sum_Subsets/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q06__/98_Partition_to_K_Equal_Sum_Subsets/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q06__/98_Partition_to_K_Equal_Sum_Subsets/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
from typing import List from functools import lru_cache class Solution: def canPartitionKSubsets(self, nums: List[int], k: int) -> bool: numsSum = sum(nums) if numsSum % k != 0: return False else: subSum = int(numsSum / k) cntSum = 0 midNums =...
35.6875
121
0.476941
from typing import List from functools import lru_cache class Solution: def canPartitionKSubsets(self, nums: List[int], k: int) -> bool: numsSum = sum(nums) if numsSum % k != 0: return False else: subSum = int(numsSum / k) cntSum = 0 midNums =...
true
true
f765e2526d9d1d451e0ec160acf581b0428a8113
267
py
Python
tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_0/ar_12/test_artificial_32_Anscombe_ConstantTrend_0_12_20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_0/ar_12/test_artificial_32_Anscombe_ConstantTrend_0_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_0/ar_12/test_artificial_32_Anscombe_ConstantTrend_0_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 0, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 12);
38.142857
167
0.734082
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 0, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 12);
true
true
f765e28d24b7383897d7e10359645c83eca3a1af
12,441
py
Python
gui/qt/transaction_dialog.py
futuro-coin/electrum-futuro
04910904a6d4d330f202daf0c1975b8296ad8e5d
[ "MIT" ]
4
2019-01-16T14:30:39.000Z
2021-10-21T04:21:45.000Z
gui/qt/transaction_dialog.py
futuro-coin/electrum-futuro
04910904a6d4d330f202daf0c1975b8296ad8e5d
[ "MIT" ]
1
2021-11-15T17:47:31.000Z
2021-11-15T17:47:31.000Z
gui/qt/transaction_dialog.py
futuro-coin/electrum-futuro
04910904a6d4d330f202daf0c1975b8296ad8e5d
[ "MIT" ]
2
2018-12-18T17:32:46.000Z
2019-01-16T14:30:42.000Z
#!/usr/bin/env python # # Electrum - lightweight Futurocoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including wi...
39.246057
134
0.624066
import copy import datetime import json import traceback from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from electrum.bitcoin import base_encode from electrum.i18n import _ from electrum.plugins import run_hook from electrum import simple_config from electrum.util import bfh from ...
true
true
f765e2c977100c4a430591cc9d825373abdc9656
3,516
py
Python
test/example_envs/generated_agents_parallel_v0.py
cclauss/PettingZoo
4051996567fdec24f63203dc4445cc79405c01db
[ "Apache-2.0" ]
1
2021-09-26T06:44:53.000Z
2021-09-26T06:44:53.000Z
test/example_envs/generated_agents_parallel_v0.py
cclauss/PettingZoo
4051996567fdec24f63203dc4445cc79405c01db
[ "Apache-2.0" ]
null
null
null
test/example_envs/generated_agents_parallel_v0.py
cclauss/PettingZoo
4051996567fdec24f63203dc4445cc79405c01db
[ "Apache-2.0" ]
null
null
null
import itertools import copy import numpy as np import warnings from pettingzoo import AECEnv, ParallelEnv import gym from pettingzoo.utils.agent_selector import agent_selector from pettingzoo.utils import wrappers, conversions def env(**kwargs): env = raw_env(**kwargs) env = wrappers.AssertOutOfBoundsWrappe...
31.392857
82
0.618316
import itertools import copy import numpy as np import warnings from pettingzoo import AECEnv, ParallelEnv import gym from pettingzoo.utils.agent_selector import agent_selector from pettingzoo.utils import wrappers, conversions def env(**kwargs): env = raw_env(**kwargs) env = wrappers.AssertOutOfBoundsWrappe...
true
true
f765e3c63605542530a731fa413430ffd7695c78
2,994
py
Python
pokemongo_bot/step_walker.py
BreezeLo/PokemonGo-Bot
86fc77478dfe85ee3609169040be825d4fa3512e
[ "MIT" ]
2
2018-11-27T06:02:24.000Z
2019-12-31T19:10:32.000Z
pokemongo_bot/step_walker.py
BreezeLo/PokemonGo-Bot
86fc77478dfe85ee3609169040be825d4fa3512e
[ "MIT" ]
1
2018-10-28T04:50:46.000Z
2018-10-28T04:50:46.000Z
pokemongo_bot/step_walker.py
BreezeLo/PokemonGo-Bot
86fc77478dfe85ee3609169040be825d4fa3512e
[ "MIT" ]
null
null
null
from math import sqrt from random import random from cell_workers.utils import distance from human_behaviour import random_lat_long_delta, sleep class StepWalker(object): def __init__(self, bot, dest_lat, dest_lng): self.bot = bot self.api = bot.api self.initLat, self.initLng = self.bot...
32.193548
116
0.544756
from math import sqrt from random import random from cell_workers.utils import distance from human_behaviour import random_lat_long_delta, sleep class StepWalker(object): def __init__(self, bot, dest_lat, dest_lng): self.bot = bot self.api = bot.api self.initLat, self.initLng = self.bot...
true
true
f765e64544e264cbfcba181ea16aad0e2a2c5db5
1,159
py
Python
GT-ECONOMY-BOT/economy/shop.py
iFanID/e.Koenomi-DBot
a017acaae810d402a4d76668daf83a0dd69ad9d7
[ "Info-ZIP" ]
1
2021-11-13T06:19:26.000Z
2021-11-13T06:19:26.000Z
GT-ECONOMY-BOT/economy/shop.py
iFanID/e.Koenomi-DBot
a017acaae810d402a4d76668daf83a0dd69ad9d7
[ "Info-ZIP" ]
null
null
null
GT-ECONOMY-BOT/economy/shop.py
iFanID/e.Koenomi-DBot
a017acaae810d402a4d76668daf83a0dd69ad9d7
[ "Info-ZIP" ]
null
null
null
import discord import subprocess import os, random, re, requests, json import asyncio from datetime import datetime from discord.ext import commands class Economy(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print('[+] Shop Code ACTIVE!'...
30.5
57
0.559103
import discord import subprocess import os, random, re, requests, json import asyncio from datetime import datetime from discord.ext import commands class Economy(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print('[+] Shop Code ACTIVE!'...
true
true
f765e78723a27bedd710aa89c32c70b221acb007
1,033
py
Python
date_the_image.py
Iori546/iori
954a53fb3f708289f1c206a30b5ca71ffe9fdf6d
[ "Unlicense" ]
null
null
null
date_the_image.py
Iori546/iori
954a53fb3f708289f1c206a30b5ca71ffe9fdf6d
[ "Unlicense" ]
null
null
null
date_the_image.py
Iori546/iori
954a53fb3f708289f1c206a30b5ca71ffe9fdf6d
[ "Unlicense" ]
null
null
null
from datetime import datetime from PIL import Image, ImageDraw, ImageFont def date_the_image(src: str, desc: str, size=800) -> None: """日付を付けて、保存する :params src: 読み込む画像のパス :params desc: 保存先のパス :params size: 変換後の画像のサイズ """ # 開く im = Image.open(src) ...
24.023256
88
0.564376
from datetime import datetime from PIL import Image, ImageDraw, ImageFont def date_the_image(src: str, desc: str, size=800) -> None: im = Image.open(src) if im.width > size: proportion = size / im.width im = im.resize((int(im.width * proportion), int(im.height * proportion)...
true
true
f765e8e69eebc9f17bf282b16a37d698bc015e61
1,258
py
Python
QCompute/QProtobuf/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
52
2020-09-14T02:25:25.000Z
2022-02-17T07:43:01.000Z
QCompute/QProtobuf/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
null
null
null
QCompute/QProtobuf/__init__.py
baidu/QCompute
04e9fd62e10b1e8bb2be4ec6cff4ea4f3a7d4025
[ "Apache-2.0" ]
10
2020-09-15T06:10:24.000Z
2021-09-15T07:26:27.000Z
#!/usr/bin/python3CircuitLine # -*- coding: utf8 -*- # Copyright (c) 2020 Baidu, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
43.37931
113
0.786963
from QCompute.QProtobuf.Library.PlatformStruct_pb2 import Program as PBProgram, CircuitLine as PBCircuitLine, \ Procedure as PBProcedure from QCompute.QProtobuf.Library.QOperation_pb2 import FixedGate as PBFixedGate, RotationGate as PBRotationGate, \ CustomizedGate as PBCustomizedGate, CompositeGate as PBCom...
true
true
f765ea6a0dc1648bcb979b4f0f7f580a056df3ab
47
py
Python
stain/__init__.py
erinish/stain
3623572c8ad22ee7003cd95dfec94f67a41bace2
[ "MIT" ]
null
null
null
stain/__init__.py
erinish/stain
3623572c8ad22ee7003cd95dfec94f67a41bace2
[ "MIT" ]
null
null
null
stain/__init__.py
erinish/stain
3623572c8ad22ee7003cd95dfec94f67a41bace2
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from .api import Stain
11.75
22
0.595745
from .api import Stain
true
true
f765ea7069e7056c5f55a4bc8d69a92cde648633
796
py
Python
nopol/edge.py
daphtdazz/nopol
1017776acd9da696c0925f4ae3bcbb9bdad990ee
[ "Apache-2.0" ]
null
null
null
nopol/edge.py
daphtdazz/nopol
1017776acd9da696c0925f4ae3bcbb9bdad990ee
[ "Apache-2.0" ]
null
null
null
nopol/edge.py
daphtdazz/nopol
1017776acd9da696c0925f4ae3bcbb9bdad990ee
[ "Apache-2.0" ]
null
null
null
from enum import Enum from .utils import ParamReprMixin class Edge(ParamReprMixin): DIRECTIONS = Enum('DIRECTIONS', ('forward', 'backward')) def __init__(self, backward_node, forward_node, direction=None): self.backward_node = backward_node self.forward_node = forward_node self.direc...
24.121212
69
0.603015
from enum import Enum from .utils import ParamReprMixin class Edge(ParamReprMixin): DIRECTIONS = Enum('DIRECTIONS', ('forward', 'backward')) def __init__(self, backward_node, forward_node, direction=None): self.backward_node = backward_node self.forward_node = forward_node self.direc...
true
true
f765ea76c4a69edf65f41493982fddbd20caa91f
678
py
Python
developers-sdk-py/tests/test_signature_generator.py
lyingdragon/developers-sdk
1bb48ce9e2c4b9e8cd50ddc0c6434ed35bb8dafd
[ "MIT" ]
null
null
null
developers-sdk-py/tests/test_signature_generator.py
lyingdragon/developers-sdk
1bb48ce9e2c4b9e8cd50ddc0c6434ed35bb8dafd
[ "MIT" ]
null
null
null
developers-sdk-py/tests/test_signature_generator.py
lyingdragon/developers-sdk
1bb48ce9e2c4b9e8cd50ddc0c6434ed35bb8dafd
[ "MIT" ]
null
null
null
import unittest from sdk.signature_generator import SignatureGenerator class TestSignatureGenerator(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_with_empty_body(self): method = "GET" path = "/v1/wallets" timestamp = 1581850266351 ...
32.285714
118
0.710914
import unittest from sdk.signature_generator import SignatureGenerator class TestSignatureGenerator(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_with_empty_body(self): method = "GET" path = "/v1/wallets" timestamp = 1581850266351 ...
true
true
f765eaf44e2003e627019955dcde509d26b580b4
1,524
py
Python
src/prepare_data.py
vikramnayyar/Churn-Prediction-of-Telecom-Customers
f21fa0f317136b64ef55e3684f4c412b248f6db4
[ "Apache-2.0" ]
null
null
null
src/prepare_data.py
vikramnayyar/Churn-Prediction-of-Telecom-Customers
f21fa0f317136b64ef55e3684f4c412b248f6db4
[ "Apache-2.0" ]
null
null
null
src/prepare_data.py
vikramnayyar/Churn-Prediction-of-Telecom-Customers
f21fa0f317136b64ef55e3684f4c412b248f6db4
[ "Apache-2.0" ]
null
null
null
""" The script converts the columns to categorical features & removes the outliers """ from utility import create_log, parse_config, read_data from prepare_data_util import balance_the_dataset, convert_cat, cols_with_ouliers create_log("prepare_data.log") # Creating log file #####################################...
34.636364
143
0.548556
from utility import create_log, parse_config, read_data from prepare_data_util import balance_the_dataset, convert_cat, cols_with_ouliers create_log("prepare_data.log") config_path = "config/config.yaml" config = parse_config(config_path) data_path = config["prepare_data"]["data"] df = read_data(data_path) ...
true
true
f765ec5bd9cded8350f50cde7b5e34e408fcce34
326
py
Python
3. Longest Substring Without Repeating Characters.py
RayHHe/LeetCode
f1f522954f129d1fccb86a41c08ec387c4aaa2c9
[ "MIT" ]
null
null
null
3. Longest Substring Without Repeating Characters.py
RayHHe/LeetCode
f1f522954f129d1fccb86a41c08ec387c4aaa2c9
[ "MIT" ]
null
null
null
3. Longest Substring Without Repeating Characters.py
RayHHe/LeetCode
f1f522954f129d1fccb86a41c08ec387c4aaa2c9
[ "MIT" ]
null
null
null
# No.1/2019-06-03/80 ms/13.3 MB class Solution: def lengthOfLongestSubstring(self, s): l=[] length=0 for letter in s: if letter in l: l=l[l.index(letter)+1:] l.append(letter) if len(l)>length: length=len(l) return l...
23.285714
42
0.484663
class Solution: def lengthOfLongestSubstring(self, s): l=[] length=0 for letter in s: if letter in l: l=l[l.index(letter)+1:] l.append(letter) if len(l)>length: length=len(l) return length
true
true
f765ec791a14f0c0e39bc328c2d50c18e2ddc9ba
1,119
py
Python
allauth/socialaccount/providers/discord/views.py
mina-gaid/scp
38e1cd303d4728a987df117f666ce194e241ed1a
[ "MIT" ]
1
2018-04-06T21:36:59.000Z
2018-04-06T21:36:59.000Z
allauth/socialaccount/providers/discord/views.py
mina-gaid/scp
38e1cd303d4728a987df117f666ce194e241ed1a
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/discord/views.py
mina-gaid/scp
38e1cd303d4728a987df117f666ce194e241ed1a
[ "MIT" ]
null
null
null
import requests from allauth.socialaccount.providers.discord.provider import DiscordProvider from allauth.socialaccount.providers.oauth2.views import OAuth2Adapter from allauth.socialaccount.providers.oauth2.views import OAuth2CallbackView from allauth.socialaccount.providers.oauth2.views import OAuth2LoginView class...
38.586207
76
0.745308
import requests from allauth.socialaccount.providers.discord.provider import DiscordProvider from allauth.socialaccount.providers.oauth2.views import OAuth2Adapter from allauth.socialaccount.providers.oauth2.views import OAuth2CallbackView from allauth.socialaccount.providers.oauth2.views import OAuth2LoginView class...
true
true
f765ecac8f8587ef4958e18e7ec33922b48be848
10,424
py
Python
api.py
Atihinen/ObjectToMap
915e2adb58245dedc231df4c48d4676913ff007f
[ "MIT" ]
null
null
null
api.py
Atihinen/ObjectToMap
915e2adb58245dedc231df4c48d4676913ff007f
[ "MIT" ]
null
null
null
api.py
Atihinen/ObjectToMap
915e2adb58245dedc231df4c48d4676913ff007f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from bottle import Bottle, response, request, run, route, HTTPResponse, hook, static_file import json import traceback from lib.db import engine, plugin, sqlalchemy, db from models import Category, FireHydrant from utils.formatter import convert_to_integer from utils.validator import ErrorMessag...
31.209581
103
0.627878
from bottle import Bottle, response, request, run, route, HTTPResponse, hook, static_file import json import traceback from lib.db import engine, plugin, sqlalchemy, db from models import Category, FireHydrant from utils.formatter import convert_to_integer from utils.validator import ErrorMessages from utils.writer imp...
false
true
f765ed4e7f361653df8bf9da310d79a30bb907e8
827
py
Python
scripts/create_collectible.py
Klingefjord/Ukrainft
3ca637c09b300fad3a0a577093041c4466bc2ce0
[ "MIT" ]
null
null
null
scripts/create_collectible.py
Klingefjord/Ukrainft
3ca637c09b300fad3a0a577093041c4466bc2ce0
[ "MIT" ]
null
null
null
scripts/create_collectible.py
Klingefjord/Ukrainft
3ca637c09b300fad3a0a577093041c4466bc2ce0
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from brownie import SimpleCollectible, accounts, network, config token_uri = "ipfs://QmberWNJ1Y169SKx2NPkM6Pk7hffUEXDFyGe9Zq789zYrV/" def main(): dev = accounts.add(config["wallets"]["from_key"]) print(network.show_active()) # Get the token ID. simple_collectible = SimpleCollectib...
33.08
115
0.698912
from brownie import SimpleCollectible, accounts, network, config token_uri = "ipfs://QmberWNJ1Y169SKx2NPkM6Pk7hffUEXDFyGe9Zq789zYrV/" def main(): dev = accounts.add(config["wallets"]["from_key"]) print(network.show_active()) simple_collectible = SimpleCollectible[len(SimpleCollectible) - 1] toke...
true
true
f765ed5aeb09e4ec6516ea58e2a7e58d05f29a25
1,043
py
Python
manage.py
data-leon/django-allauth-google-demo
e41de0128217d06853082bbccc23a46529bc4824
[ "MIT" ]
1
2021-11-18T18:43:05.000Z
2021-11-18T18:43:05.000Z
manage.py
data-leon/django-allauth-google-demo
e41de0128217d06853082bbccc23a46529bc4824
[ "MIT" ]
null
null
null
manage.py
data-leon/django-allauth-google-demo
e41de0128217d06853082bbccc23a46529bc4824
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some...
32.59375
77
0.659636
import os import sys from pathlib import Path if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: try: import django ...
true
true
f765edb7beaf593f40399d80eecff97aa3adaf7f
6,635
py
Python
chia/daemon/client.py
LKY-LKY/chia-blockchain
745ad49f7d3881e1e8673decc51f6aa5b505f0ca
[ "Apache-2.0" ]
1
2021-09-01T16:09:00.000Z
2021-09-01T16:09:00.000Z
chia/daemon/client.py
Phanh234/chia-blockchain
745ad49f7d3881e1e8673decc51f6aa5b505f0ca
[ "Apache-2.0" ]
null
null
null
chia/daemon/client.py
Phanh234/chia-blockchain
745ad49f7d3881e1e8673decc51f6aa5b505f0ca
[ "Apache-2.0" ]
null
null
null
import asyncio import json import ssl from contextlib import asynccontextmanager from pathlib import Path from typing import Any, Dict, Optional import websockets from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.config import load_config from chia.util.json_util import dict_to_json_str from...
37.275281
120
0.658628
import asyncio import json import ssl from contextlib import asynccontextmanager from pathlib import Path from typing import Any, Dict, Optional import websockets from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.config import load_config from chia.util.json_util import dict_to_json_str from...
true
true
f765edf32f3af65bd03ea30a2095f3d10eaa13d6
24,199
py
Python
fuel_plugin_builder/tests/test_validator_v3.py
naumvd95/plugin-stub-fuel
348a20fd2df5959e1dc8f156447d1c8e8059be39
[ "Apache-2.0" ]
null
null
null
fuel_plugin_builder/tests/test_validator_v3.py
naumvd95/plugin-stub-fuel
348a20fd2df5959e1dc8f156447d1c8e8059be39
[ "Apache-2.0" ]
null
null
null
fuel_plugin_builder/tests/test_validator_v3.py
naumvd95/plugin-stub-fuel
348a20fd2df5959e1dc8f156447d1c8e8059be39
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
37.929467
79
0.493739
import mock from fuel_plugin_builder import errors from fuel_plugin_builder.tests.base import LegacyBaseValidatorTestCase from fuel_plugin_builder.validators.schemas import SchemaV3 from fuel_plugin_builder.validators.validator_v3 import ValidatorV3 class TestValidatorV3(LegacyBaseValidatorTestCase): __test__...
true
true