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
f73c7c83759f8b64a6ceeb1b97ca71e844c84163
11,414
py
Python
esphome/components/time/__init__.py
psbaltar/esphome
a8d87a1fee5d9ec7bea81cd6e65d8ec7babfbde4
[ "MIT" ]
2
2020-05-11T09:26:16.000Z
2021-07-20T03:06:37.000Z
esphome/components/time/__init__.py
frenck/esphome
92f8b043ce940fd565b3d79562ba415de60f5e34
[ "MIT" ]
null
null
null
esphome/components/time/__init__.py
frenck/esphome
92f8b043ce940fd565b3d79562ba415de60f5e34
[ "MIT" ]
null
null
null
import datetime import logging import math import voluptuous as vol from esphome import automation import esphome.config_validation as cv from esphome.const import CONF_CRON, CONF_DAYS_OF_MONTH, CONF_DAYS_OF_WEEK, CONF_HOURS, \ CONF_MINUTES, CONF_MONTHS, CONF_ON_TIME, CONF_SECONDS, CONF_TIMEZONE, CONF_TRIGGER_ID ...
37.300654
100
0.623708
import datetime import logging import math import voluptuous as vol from esphome import automation import esphome.config_validation as cv from esphome.const import CONF_CRON, CONF_DAYS_OF_MONTH, CONF_DAYS_OF_WEEK, CONF_HOURS, \ CONF_MINUTES, CONF_MONTHS, CONF_ON_TIME, CONF_SECONDS, CONF_TIMEZONE, CONF_TRIGGER_ID ...
true
true
f73c7c9dfabc60a11ceb79855e4d40e631bdb3b1
26,859
py
Python
api_core/google/api_core/bidi.py
beittatt/cloud-python
cdb4cc4f3c568ff32acf35c34910d23f2d3800a0
[ "Apache-2.0" ]
2
2021-11-26T07:08:43.000Z
2022-03-07T20:20:04.000Z
api_core/google/api_core/bidi.py
beittatt/cloud-python
cdb4cc4f3c568ff32acf35c34910d23f2d3800a0
[ "Apache-2.0" ]
null
null
null
api_core/google/api_core/bidi.py
beittatt/cloud-python
cdb4cc4f3c568ff32acf35c34910d23f2d3800a0
[ "Apache-2.0" ]
null
null
null
# Copyright 2017, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
36.894231
89
0.615176
import collections import datetime import logging import threading import time from six.moves import queue from google.api_core import exceptions _LOGGER = logging.getLogger(__name__) _BIDIRECTIONAL_CONSUMER_NAME = "Thread-ConsumeBidirectionalStream" class _RequestQueueGenerator(object): def __...
true
true
f73c7dc638bbab307915231dccfffeb890f86c05
637
py
Python
users/models.py
mohilkhare1708/descriptiveAnswerChecker
839404e807f884afd8b59e6f2eebfbc8b1189e83
[ "MIT" ]
2
2021-02-15T20:50:47.000Z
2022-02-14T18:31:30.000Z
users/models.py
mohilkhare1708/descriptiveAnswerChecker
839404e807f884afd8b59e6f2eebfbc8b1189e83
[ "MIT" ]
null
null
null
users/models.py
mohilkhare1708/descriptiveAnswerChecker
839404e807f884afd8b59e6f2eebfbc8b1189e83
[ "MIT" ]
1
2022-01-11T15:10:50.000Z
2022-01-11T15:10:50.000Z
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) full_name = models.CharField(max_length=100) email = models.E...
31.85
63
0.756672
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) full_name = models.CharField(max_length=100) email = models.E...
true
true
f73c7e0c7624f7ad271c26fe3c8dd34a3ac22240
263
py
Python
StreamClient.py
tdz-ia/NVSS
741b8884df0ab9862cb98e45d60470d34f8a8e4a
[ "BSD-3-Clause" ]
2
2020-09-03T06:47:44.000Z
2022-02-26T09:42:53.000Z
StreamClient.py
tdz-ia/NVSS
741b8884df0ab9862cb98e45d60470d34f8a8e4a
[ "BSD-3-Clause" ]
null
null
null
StreamClient.py
tdz-ia/NVSS
741b8884df0ab9862cb98e45d60470d34f8a8e4a
[ "BSD-3-Clause" ]
null
null
null
# ! /usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under NVIDIA Simple Streamer License from StreamingTools import StreamClient if __name__ == "__main__": client = StreamClient()
21.916667
62
0.692015
from StreamingTools import StreamClient if __name__ == "__main__": client = StreamClient()
true
true
f73c7e9707c8389ee8ccde591fa64b8a9c64780b
666
py
Python
LEETCODE/leetcode-javascript-master/215 Kth Largest Element in an Array.py
bgoonz/DS-n-Algos-Mega-Archive
54f41b5a73d67a35bddb911736f0f88c49b7b895
[ "MIT", "Unlicense" ]
null
null
null
LEETCODE/leetcode-javascript-master/215 Kth Largest Element in an Array.py
bgoonz/DS-n-Algos-Mega-Archive
54f41b5a73d67a35bddb911736f0f88c49b7b895
[ "MIT", "Unlicense" ]
25
2021-05-02T10:59:18.000Z
2021-05-14T10:02:22.000Z
LEETCODE/leetcode-javascript-master/215 Kth Largest Element in an Array.py
bgoonz/DS-n-Algos-Mega-Archive
54f41b5a73d67a35bddb911736f0f88c49b7b895
[ "MIT", "Unlicense" ]
1
2021-11-26T20:43:19.000Z
2021-11-26T20:43:19.000Z
class Solution(object): def findKthLargest(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ pivot = random.choice(nums); nums1, nums2 = [], [] for num in nums: if num > pivot: nums1.append(num) eli...
30.272727
129
0.528529
class Solution(object): def findKthLargest(self, nums, k): pivot = random.choice(nums); nums1, nums2 = [], [] for num in nums: if num > pivot: nums1.append(num) elif num < pivot: nums2.append(num) if k <= len(nums1): return self...
true
true
f73c7edd2f0f3e957b3ed2c0f44f75ecaf5855d7
115
py
Python
src/__init__.py
SLD3V/MASK
8d288d8f703969b4fe22a8ddb56db3734d4d1386
[ "BSD-2-Clause" ]
null
null
null
src/__init__.py
SLD3V/MASK
8d288d8f703969b4fe22a8ddb56db3734d4d1386
[ "BSD-2-Clause" ]
null
null
null
src/__init__.py
SLD3V/MASK
8d288d8f703969b4fe22a8ddb56db3734d4d1386
[ "BSD-2-Clause" ]
null
null
null
# importing module constants from . from . import constants # importing module helper from . from . import helper
19.166667
35
0.765217
from . import constants from . import helper
true
true
f73c80498d3c644e050d185faec90ed7788a85ea
33,840
py
Python
migratecomware.py
zabrewer/automation-scripts
cd9f4ab8227333412baeba659d5a9fea4343e78f
[ "MIT" ]
1
2021-03-15T16:49:05.000Z
2021-03-15T16:49:05.000Z
migratecomware.py
zabrewer/automation-scripts
cd9f4ab8227333412baeba659d5a9fea4343e78f
[ "MIT" ]
null
null
null
migratecomware.py
zabrewer/automation-scripts
cd9f4ab8227333412baeba659d5a9fea4343e78f
[ "MIT" ]
null
null
null
# This is a script to migrate infrastructure from Comware-based switches, such as the # HPE A-series, to Meraki MS switches. The script reads an input file which defines which # Comware switch will be migrated to which MS. Configuration is read from Comware through SSH, # converted to Meraki form and uploaded to ...
46.675862
479
0.56052
json, paramiko, re class c_portconfig: def __init__(self): self.name = '' self.type = 'null' self.number = '0' self.mode = 'access' self.vlan = '1' self.allowedvlans = '' ...
true
true
f73c80973a7d2cfbcb7f86532731fb3427a0ed23
146,585
py
Python
ion/services/sa/observatory/observatory_management_service.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
3
2016-09-20T09:50:06.000Z
2018-08-10T01:41:38.000Z
ion/services/sa/observatory/observatory_management_service.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
null
null
null
ion/services/sa/observatory/observatory_management_service.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
2
2016-03-16T22:25:49.000Z
2016-11-26T14:54:21.000Z
#!/usr/bin/env python """Service managing marine facility sites and deployments""" import string import time import logging from collections import defaultdict from pyon.core.governance import ORG_MANAGER_ROLE, DATA_OPERATOR, OBSERVATORY_OPERATOR, INSTRUMENT_OPERATOR, GovernanceHeaderValues, has_org_role from ooi....
50.097403
194
0.666514
"""Service managing marine facility sites and deployments""" import string import time import logging from collections import defaultdict from pyon.core.governance import ORG_MANAGER_ROLE, DATA_OPERATOR, OBSERVATORY_OPERATOR, INSTRUMENT_OPERATOR, GovernanceHeaderValues, has_org_role from ooi.logging import log fr...
false
true
f73c8194e9946de53aa2ccb8d9a7e88d45fcca13
20,392
py
Python
api/app/users/tests.py
Jean-Lytehouse/Lytehouse-Autocam
74df801a652325be86e52e337c0f9471694da02a
[ "Apache-2.0" ]
null
null
null
api/app/users/tests.py
Jean-Lytehouse/Lytehouse-Autocam
74df801a652325be86e52e337c0f9471694da02a
[ "Apache-2.0" ]
null
null
null
api/app/users/tests.py
Jean-Lytehouse/Lytehouse-Autocam
74df801a652325be86e52e337c0f9471694da02a
[ "Apache-2.0" ]
null
null
null
import json from datetime import datetime, timedelta from app import app, db from app.utils.testing import ApiTestCase from app.users.models import AppUser, PasswordReset, UserCategory, Country, UserComment from app.events.models import Event, EventRole from app.applicationModel.models import ApplicationForm from app...
39.44294
166
0.603276
import json from datetime import datetime, timedelta from app import app, db from app.utils.testing import ApiTestCase from app.users.models import AppUser, PasswordReset, UserCategory, Country, UserComment from app.events.models import Event, EventRole from app.applicationModel.models import ApplicationForm from app...
true
true
f73c82bcfe1c5e712c8a6dbacc303ed7e178a73a
7,998
py
Python
wpforce.py
royrogers/WPForce
2929229e527efc00307f932f7f1c3c55048adf79
[ "BSD-2-Clause" ]
1
2017-12-10T09:44:15.000Z
2017-12-10T09:44:15.000Z
wpforce.py
royrogers/WPForce
2929229e527efc00307f932f7f1c3c55048adf79
[ "BSD-2-Clause" ]
null
null
null
wpforce.py
royrogers/WPForce
2929229e527efc00307f932f7f1c3c55048adf79
[ "BSD-2-Clause" ]
1
2019-12-03T13:44:36.000Z
2019-12-03T13:44:36.000Z
import sys import time import socket import urllib2 import argparse import threading __author__ = 'n00py' # These variables must be shared by all threads dynamically correct_pairs = {} total = 0 def has_colours(stream): if not hasattr(stream, "isatty"): return False if not stream.isatty(): retu...
37.373832
218
0.56089
import sys import time import socket import urllib2 import argparse import threading __author__ = 'n00py' correct_pairs = {} total = 0 def has_colours(stream): if not hasattr(stream, "isatty"): return False if not stream.isatty(): return False try: import curses curses.set...
false
true
f73c82e8143ed57e0f378ea42933a36fbdfc4f0c
8,287
py
Python
TUI/TCC/SlewWdg/RotWdg.py
StarkillerX42/stui
668628cf7539e7d2be12846033141e4eb8616fe1
[ "BSD-3-Clause" ]
null
null
null
TUI/TCC/SlewWdg/RotWdg.py
StarkillerX42/stui
668628cf7539e7d2be12846033141e4eb8616fe1
[ "BSD-3-Clause" ]
null
null
null
TUI/TCC/SlewWdg/RotWdg.py
StarkillerX42/stui
668628cf7539e7d2be12846033141e4eb8616fe1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """Allows the user to specify rotation type and rotation angle. History: 2001-11-05 ROwen First version with history. 2002-06-11 ROwen Disables invalid rot types based on coordSysvar. 2002-06-25 ROwen Removed an unneeded keyword from inputCont. 2002-07-31 ROwen Modified to use the RO....
36.831111
82
0.624231
import Tkinter import RO.CoordSys import RO.InputCont import RO.Wdg import RO.StringUtil import TUI.Models import TUI.TCC.UserModel _rt_Object = "Object" _rt_Horizon = "Horizon" _rt_Mount = "Mount" _rt_None = "None" _RotTypeMenuItems = ( _rt_Object, _rt_Horizon, None, _rt_Mount, _rt_None, ) _Rot...
true
true
f73c838c2e157244c00a4183cdec57cebf041865
8,726
py
Python
py2.7/multiprocess/heap.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
356
2015-06-21T21:05:10.000Z
2022-03-30T11:57:08.000Z
py2.7/multiprocess/heap.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
103
2015-06-22T01:44:14.000Z
2022-03-01T03:44:25.000Z
py2.7/multiprocess/heap.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
72
2015-09-02T14:10:24.000Z
2022-03-25T06:49:43.000Z
# # Module which supports allocation of memory from an mmap # # multiprocessing/heap.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributi...
33.43295
80
0.625029
import bisect import mmap import tempfile import os import sys import threading import itertools try: import _multiprocess as _multiprocessing except ImportError: import _multiprocessing from multiprocess.util import Finalize, info from multiprocess.forking import assert_spawn...
true
true
f73c8453c8ba25eef4d2b8e80cb0ad1c989d10d0
1,844
py
Python
jdhapi/migrations/0007_article_issue.py
C2DH/jdhbackend
37efb0c5a6e1ea2acf8aca477d052a4e33f9bf40
[ "MIT" ]
null
null
null
jdhapi/migrations/0007_article_issue.py
C2DH/jdhbackend
37efb0c5a6e1ea2acf8aca477d052a4e33f9bf40
[ "MIT" ]
59
2020-11-27T08:58:35.000Z
2022-03-30T15:54:01.000Z
jdhapi/migrations/0007_article_issue.py
C2DH/jdhbackend
37efb0c5a6e1ea2acf8aca477d052a4e33f9bf40
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2021-05-12 18:49 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('jdhapi', '0006_auto_20201127_1355'), ] operations = [ migrations.CreateModel( ...
48.526316
215
0.614967
from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('jdhapi', '0006_auto_20201127_1355'), ] operations = [ migrations.CreateModel( name='Issue', fields=[ ...
true
true
f73c849cc55ec1c9e0540d071ed3ed2e7e255620
1,444
py
Python
led-command-centre.py
kazma89/Taller_RPi
c54002746b8ab4c9eb86c4ee70efb5be712968c2
[ "MIT" ]
null
null
null
led-command-centre.py
kazma89/Taller_RPi
c54002746b8ab4c9eb86c4ee70efb5be712968c2
[ "MIT" ]
null
null
null
led-command-centre.py
kazma89/Taller_RPi
c54002746b8ab4c9eb86c4ee70efb5be712968c2
[ "MIT" ]
null
null
null
from tkinter import * import tkinter.font from gpiozero import LED import RPi.GPIO RPi.GPIO.setmode(RPi.GPIO.BCM) ### HARDWARE DEFINITIONS ### # LED pin definitions led0 = LED(7) led1 = LED(8) led2 = LED(25) led3 = LED(23) led4 = LED(24) led5 = LED(18) led6 = LED(15) led7 = LED(14) # Arrange LEDs into a list leds = [l...
24.066667
99
0.659972
from tkinter import * import tkinter.font from gpiozero import LED import RPi.GPIO RPi.GPIO.setmode(RPi.GPIO.BCM) led4 = LED(24) led5 = LED(18) led6 = LED(15) led7 = LED(14) leds = [led7,led6,led5,led4,led3,led2,led1,led0] ter.font.Font(family = 'Helvetica', size = 12, weight = "bold") ledCode = StringVar() t("LE...
true
true
f73c84db13b89da5deea2f1aa8c5b93dd83ea3c9
3,487
py
Python
Uwallet/tests/_test_target.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
28
2018-04-27T08:02:18.000Z
2020-01-14T05:08:34.000Z
Uwallet/tests/_test_target.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
2
2018-05-16T08:29:20.000Z
2018-06-17T04:51:08.000Z
Uwallet/tests/_test_target.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
4
2018-05-14T11:43:31.000Z
2018-09-29T09:58:58.000Z
from uwallet.blockchain import unet from uwallet.blockchain import ArithUint256 GENESIS_BITS = 0x1f07ffff MAX_TARGET = 0x0007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF N_TARGET_TIMESPAN = 150 def check_bits(bits): bitsN = (bits >> 24) & 0xff assert 0x03 <= bitsN <= 0x1f, \ ...
31.7
96
0.675652
from uwallet.blockchain import unet from uwallet.blockchain import ArithUint256 GENESIS_BITS = 0x1f07ffff MAX_TARGET = 0x0007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF N_TARGET_TIMESPAN = 150 def check_bits(bits): bitsN = (bits >> 24) & 0xff assert 0x03 <= bitsN <= 0x1f, \ ...
true
true
f73c8530463a2ab9b827d38102b11b7895d02106
4,187
py
Python
mrbaviirc/nestini.py
brianvanderburg2/mrbaviirc
6aeee9b229d3f62aace98a51d9014781bbe6cb52
[ "Apache-2.0" ]
null
null
null
mrbaviirc/nestini.py
brianvanderburg2/mrbaviirc
6aeee9b229d3f62aace98a51d9014781bbe6cb52
[ "Apache-2.0" ]
null
null
null
mrbaviirc/nestini.py
brianvanderburg2/mrbaviirc
6aeee9b229d3f62aace98a51d9014781bbe6cb52
[ "Apache-2.0" ]
null
null
null
""" This code parses INI files in a nested manor. """ __author__ = "Brian Allen Vanderburg II" __copyright__ = "Copyright 2016" __license__ = "Apache License 2.0" try: from collections import OrderedDict as dict except ImportError: pass class NestedIniParser(object): def __init__(self, p...
32.457364
77
0.455219
__author__ = "Brian Allen Vanderburg II" __copyright__ = "Copyright 2016" __license__ = "Apache License 2.0" try: from collections import OrderedDict as dict except ImportError: pass class NestedIniParser(object): def __init__(self, parser): self.parser = parser def parse(se...
true
true
f73c85b00f072057f7bc0c5325184487d744b60d
939
py
Python
tests/test_assume_role_executor_factory.py
zulhilmizainuddin/aws-assumerole
2aff3af378f4b81d38f89fccbf6cd0f0f3c2e181
[ "MIT" ]
null
null
null
tests/test_assume_role_executor_factory.py
zulhilmizainuddin/aws-assumerole
2aff3af378f4b81d38f89fccbf6cd0f0f3c2e181
[ "MIT" ]
1
2019-12-28T09:24:10.000Z
2019-12-28T09:26:47.000Z
tests/test_assume_role_executor_factory.py
zulhilmizainuddin/aws-assumerole
2aff3af378f4b81d38f89fccbf6cd0f0f3c2e181
[ "MIT" ]
null
null
null
import pytest from awsassume.assume_role_cache_executor import AssumeRoleCacheExecutor from awsassume.assume_role_executor_factory import AssumeRoleExecutorFactory from awsassume.assume_role_no_cache_executor import AssumeRoleNoCacheExecutor from awsassume.data_models import CliArgs @pytest.fixture(scope='module', p...
37.56
82
0.757188
import pytest from awsassume.assume_role_cache_executor import AssumeRoleCacheExecutor from awsassume.assume_role_executor_factory import AssumeRoleExecutorFactory from awsassume.assume_role_no_cache_executor import AssumeRoleNoCacheExecutor from awsassume.data_models import CliArgs @pytest.fixture(scope='module', p...
true
true
f73c85e55e98e970079f707dd2ff12f7bd56b852
3,299
py
Python
tests/cupy_tests/cuda_tests/test_stream.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
1
2020-12-19T23:34:41.000Z
2020-12-19T23:34:41.000Z
tests/cupy_tests/cuda_tests/test_stream.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
null
null
null
tests/cupy_tests/cuda_tests/test_stream.py
mrkwjc/cupy
ae9705dcc8b59ed05a6c91fdfb401b71f7c2b224
[ "MIT" ]
null
null
null
import unittest from cupy._creation import from_data from cupy import cuda from cupy import testing from cupy.testing import attr class TestStream(unittest.TestCase): @attr.gpu def test_eq(self): null0 = cuda.Stream.null null1 = cuda.Stream(True) null2 = cuda.Stream(True) nul...
29.720721
74
0.608366
import unittest from cupy._creation import from_data from cupy import cuda from cupy import testing from cupy.testing import attr class TestStream(unittest.TestCase): @attr.gpu def test_eq(self): null0 = cuda.Stream.null null1 = cuda.Stream(True) null2 = cuda.Stream(True) nul...
true
true
f73c864b7b40a247028a17474ecec1f2a772aefc
3,540
py
Python
Lib/turtledemo/penrose.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
1,872
2015-01-02T18:56:47.000Z
2022-03-31T07:34:39.000Z
Lib/turtledemo/penrose.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
675
2015-02-27T09:01:01.000Z
2022-03-31T14:03:25.000Z
Lib/turtledemo/penrose.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
278
2015-01-02T03:48:20.000Z
2022-03-29T20:40:44.000Z
#!/usr/bin/env python3 """ xturtle-example-suite: xtx_kites_and_darts.py Constructs two aperiodic penrose-tilings, consisting of kites and darts, by the method of inflation in six steps. Starting points are the patterns "sun" consisting of five kites and "star" consisting of five darts. For more inf...
19.450549
65
0.504802
from turtle import * from math import cos, pi from time import clock, sleep f = (5**0.5-1)/2.0 d = 2 * cos(3*pi/10) def kite(l): fl = f * l lt(36) fd(l) rt(108) fd(fl) rt(36) fd(fl) rt(108) fd(l) rt(144) def dart(l): fl = f * l lt(36) fd(l) rt(144) fd(f...
true
true
f73c872994b227cfbf44164f73160c58f1598ca9
1,897
py
Python
mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/test_mongodb_kube_client.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/test_mongodb_kube_client.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2020-06-15T03:41:03.000Z
2020-06-15T03:41:04.000Z
mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/test_mongodb_kube_client.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
#!/usr/bin/env python from __future__ import print_function import yaml from mongodb_kube_client import MongoDBEnterpriseKubeClient def parse_config_file(path): ''' Parses the config file in the given path ''' with open(path, 'r') as parameters: try: return yaml.load(parameters) ...
32.706897
106
0.702688
from __future__ import print_function import yaml from mongodb_kube_client import MongoDBEnterpriseKubeClient def parse_config_file(path): with open(path, 'r') as parameters: try: return yaml.load(parameters) except yaml.YAMLError as exc: print("Error when loading enviro...
true
true
f73c8789f46756698a5563a290a28cd0a4e1b770
7,911
py
Python
python_code/vnev/Lib/site-packages/wsproto/events.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
3
2020-03-31T10:36:31.000Z
2020-04-23T12:01:10.000Z
python_code/vnev/Lib/site-packages/wsproto/events.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
6
2020-09-05T01:40:23.000Z
2022-03-12T00:40:58.000Z
python_code/vnev/Lib/site-packages/wsproto/events.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
1
2020-07-09T23:13:13.000Z
2020-07-09T23:13:13.000Z
# -*- coding: utf-8 -*- """ wsproto/events ~~~~~~~~~~~~~~ Events that result from processing data on a WebSocket connection. """ from abc import ABC from dataclasses import dataclass, field from typing import Generic, List, Optional, Sequence, TypeVar, Union from .extensions import Extension from .typing import Heade...
26.636364
82
0.680571
from abc import ABC from dataclasses import dataclass, field from typing import Generic, List, Optional, Sequence, TypeVar, Union from .extensions import Extension from .typing import Headers class Event(ABC): pass @dataclass(frozen=True) class Request(Event): host: str target: str extensions:...
true
true
f73c87f94ecae75b4b0455ff5a7938003fa96dba
2,167
py
Python
homeassistant/components/metoffice/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
5
2018-10-23T14:15:05.000Z
2021-11-26T06:38:44.000Z
homeassistant/components/metoffice/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
homeassistant/components/metoffice/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
2
2019-06-11T12:13:14.000Z
2020-12-24T23:17:53.000Z
"""The Met Office integration.""" import logging from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers....
30.521127
86
0.741578
import logging from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.update_coordinator import DataUpda...
true
true
f73c8971202e7bf69a71d87fa015a6e1846fd431
3,202
py
Python
docs/source/conf.py
stetsonrowles/QSDsan
a74949fcf9e6ff91e9160a75bedaf6fab2191efb
[ "NCSA", "CNRI-Python", "FTL" ]
null
null
null
docs/source/conf.py
stetsonrowles/QSDsan
a74949fcf9e6ff91e9160a75bedaf6fab2191efb
[ "NCSA", "CNRI-Python", "FTL" ]
null
null
null
docs/source/conf.py
stetsonrowles/QSDsan
a74949fcf9e6ff91e9160a75bedaf6fab2191efb
[ "NCSA", "CNRI-Python", "FTL" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
37.670588
82
0.661462
import os, sys sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../../../tmo')) sys.path.insert(0, os.path.abspath('../../../bst')) del os, sys import time, qsdsan project = 'QSDsan' author = 'Quantitative Sustainable Design Group...
true
true
f73c8a03b2f773254414f603801062cfd6e06cc4
180
py
Python
ai_starter/webapp.py
karthikreddykuna/DXC_AISTARTER_LOWCODE_NOCODE
998564caf5b858bf5b4fd29af7e129a14ec9c61c
[ "Apache-2.0" ]
null
null
null
ai_starter/webapp.py
karthikreddykuna/DXC_AISTARTER_LOWCODE_NOCODE
998564caf5b858bf5b4fd29af7e129a14ec9c61c
[ "Apache-2.0" ]
null
null
null
ai_starter/webapp.py
karthikreddykuna/DXC_AISTARTER_LOWCODE_NOCODE
998564caf5b858bf5b4fd29af7e129a14ec9c61c
[ "Apache-2.0" ]
null
null
null
# Entry point for the application. from . import app # For application discovery by the 'flask' command. from . import dxc_app # For import side-effects of setting up routes.
60
73
0.744444
from . import app from . import dxc_app
true
true
f73c8a06c353081ad545142699bf109c21051d5f
88,263
py
Python
test/functional/feature_taproot.py
widecoin-project/widecoin
143b190a61f95a4b7d40c5da484cdde8f0c5ac3f
[ "MIT" ]
8
2021-04-17T16:11:50.000Z
2021-06-23T05:30:39.000Z
test/functional/feature_taproot.py
widecoin-project/widecoin
143b190a61f95a4b7d40c5da484cdde8f0c5ac3f
[ "MIT" ]
1
2021-04-18T11:57:59.000Z
2021-04-18T11:57:59.000Z
test/functional/feature_taproot.py
widecoin-project/widecoin
143b190a61f95a4b7d40c5da484cdde8f0c5ac3f
[ "MIT" ]
7
2021-04-17T16:04:12.000Z
2021-06-10T00:54:53.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Widecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( COINBASE_MATURITY, ...
58.60757
363
0.670587
from test_framework.blocktools import ( COINBASE_MATURITY, create_coinbase, create_block, add_witness_commitment, MAX_BLOCK_SIGOPS_WEIGHT, NORMAL_GBT_REQUEST_PARAMS, WITNESS_SCALE_FACTOR, ) from test_framework.messages import ( COutPoint, CTransaction, CTxIn, CTxInWitne...
true
true
f73c8ad4f6373cfbe5fad4e70b20d0bb9d5eed2c
897
py
Python
fastapi-api/src/tests/test_taxon.py
dataforgoodfr/batch8_ceebios
4b2b2920c2f852e3424e05a53ef242c0f5b1f708
[ "MIT" ]
1
2021-02-25T09:44:46.000Z
2021-02-25T09:44:46.000Z
fastapi-api/src/tests/test_taxon.py
dataforgoodfr/batch8_ceebios
4b2b2920c2f852e3424e05a53ef242c0f5b1f708
[ "MIT" ]
null
null
null
fastapi-api/src/tests/test_taxon.py
dataforgoodfr/batch8_ceebios
4b2b2920c2f852e3424e05a53ef242c0f5b1f708
[ "MIT" ]
3
2020-09-30T17:58:27.000Z
2020-12-09T16:59:44.000Z
import pytest from app.routers import taxons from fastapi.testclient import TestClient TEST_JSON = {"gbif_id": 15, "canonical_name": "test", "rank": "class"} TEST_JSON_0 = { "gbif_id": 0, "canonical_name": "Canis Lupus Familiaris", "rank": "subspecies", } client = TestClient(taxons.router) ...
25.628571
71
0.647715
import pytest from app.routers import taxons from fastapi.testclient import TestClient TEST_JSON = {"gbif_id": 15, "canonical_name": "test", "rank": "class"} TEST_JSON_0 = { "gbif_id": 0, "canonical_name": "Canis Lupus Familiaris", "rank": "subspecies", } client = TestClient(taxons.router) ...
true
true
f73c8bb84783e010fba58c16673e44bb4d95fadd
10,126
py
Python
voxseg/run_cnnlstm.py
NickWilkinson37/voxseg
6402a67c0b4ee68115070b6aa870199d1f43c5a2
[ "MIT" ]
31
2021-03-11T11:32:36.000Z
2022-03-22T11:54:35.000Z
voxseg/run_cnnlstm.py
parkitny/voxseg
6402a67c0b4ee68115070b6aa870199d1f43c5a2
[ "MIT" ]
6
2021-05-21T08:42:36.000Z
2021-11-19T11:36:43.000Z
voxseg/run_cnnlstm.py
parkitny/voxseg
6402a67c0b4ee68115070b6aa870199d1f43c5a2
[ "MIT" ]
2
2021-06-10T05:55:12.000Z
2021-12-08T11:19:44.000Z
# Module for running CNN-BiLSTM vad model, # may also be run directly as a script # Author: Nick Wilkinson 2021 import argparse import os import numpy as np import pandas as pd import tensorflow as tf from typing import Tuple from tensorflow.keras import models from voxseg import utils from scipy.signal import medfilt ...
42.191667
140
0.640529
import argparse import os import numpy as np import pandas as pd import tensorflow as tf from typing import Tuple from tensorflow.keras import models from voxseg import utils from scipy.signal import medfilt gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: tf.config.experime...
true
true
f73c8c208a7bba2c7b9281e9efe17e5ea934f641
4,427
py
Python
lib/tinycss/tests/test_page3.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
null
null
null
lib/tinycss/tests/test_page3.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
9
2020-02-11T23:31:54.000Z
2022-03-11T23:15:44.000Z
lib/tinycss/tests/test_page3.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
null
null
null
# coding: utf8 """ Tests for the Paged Media 3 parser ---------------------------------- :copyright: (c) 2012 by Simon Sapin. :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals import pytest from tinycss.css21 import CSS21Parser from tinycss.page3 import CSSPag...
36.586777
78
0.563587
from __future__ import unicode_literals import pytest from tinycss.css21 import CSS21Parser from tinycss.page3 import CSSPage3Parser from .test_tokenizer import jsonify from . import assert_errors @pytest.mark.parametrize(('css', 'expected_selector', 'expected_specificity', 'expected_er...
true
true
f73c8edfb84fb6d2c35538e7c59e8a0be53982d8
492
py
Python
yas3/aws.py
DavidMChan/yas3
eafccc47147a3ca03c36dee4e6b40775cb17a8b0
[ "Apache-2.0" ]
1
2020-11-03T18:50:30.000Z
2020-11-03T18:50:30.000Z
yas3/aws.py
DavidMChan/yas3
eafccc47147a3ca03c36dee4e6b40775cb17a8b0
[ "Apache-2.0" ]
null
null
null
yas3/aws.py
DavidMChan/yas3
eafccc47147a3ca03c36dee4e6b40775cb17a8b0
[ "Apache-2.0" ]
null
null
null
def test_aws_acl(acl_string): if acl_string not in ('private', 'public-read', 'public-read-write', 'authenticated-read', 'aws-exec-read', 'bucket-owner-read', 'bucket-owner-full-control'): raise ValueError('ACL string must be one of: ', ('private'...
49.2
114
0.571138
def test_aws_acl(acl_string): if acl_string not in ('private', 'public-read', 'public-read-write', 'authenticated-read', 'aws-exec-read', 'bucket-owner-read', 'bucket-owner-full-control'): raise ValueError('ACL string must be one of: ', ('private'...
true
true
f73c8f05cbcedd56236c6d96bdd45ddf527b7643
203
py
Python
host/serializers.py
FGAUnB-REQ-GM/2021.2-PousadaAnimal
b7371aebccad0da23073de0db642a6ce824f919e
[ "MIT" ]
null
null
null
host/serializers.py
FGAUnB-REQ-GM/2021.2-PousadaAnimal
b7371aebccad0da23073de0db642a6ce824f919e
[ "MIT" ]
95
2022-02-04T19:40:09.000Z
2022-03-31T20:24:11.000Z
host/serializers.py
FGAUnB-REQ-GM/2021.2-PousadaAnimal
b7371aebccad0da23073de0db642a6ce824f919e
[ "MIT" ]
4
2022-01-26T23:51:48.000Z
2022-01-27T18:28:16.000Z
from rest_framework import serializers from .models import Host class HostSerializer(serializers.ModelSerializer): class Meta: model = Host fields = ['id','species', 'size', 'cost']
25.375
50
0.694581
from rest_framework import serializers from .models import Host class HostSerializer(serializers.ModelSerializer): class Meta: model = Host fields = ['id','species', 'size', 'cost']
true
true
f73c8f1b878026de4fc960180245cc9940c99ebe
1,554
py
Python
nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py
lifefeel/NeMo
85b7d3f0288d42c234e70546179974b6f4d13536
[ "Apache-2.0" ]
null
null
null
nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py
lifefeel/NeMo
85b7d3f0288d42c234e70546179974b6f4d13536
[ "Apache-2.0" ]
1
2022-03-06T14:09:02.000Z
2022-03-06T14:09:02.000Z
nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py
admariner/NeMo
e542d7f9063a40afa4119a3b94de4c2c636a37bb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
39.846154
94
0.718147
from nemo_text_processing.text_normalization.en.graph_utils import GraphFst from pynini.lib import pynutil class ElectronicFst(GraphFst): def __init__(self, tn_electronic, deterministic: bool = True): super().__init__(name="electronic", kind="classify", deterministic=deterministic) ...
true
true
f73c90cb1bc3b129ccc520e873087e69e1f796d6
1,160
py
Python
src/api/util/RDP.py
hostbaby/RedisLive
a1b655483c08c80ca1aa91eed87e434d458bcfb7
[ "MIT" ]
1,523
2015-01-02T07:07:24.000Z
2022-03-09T09:11:50.000Z
src/api/util/RDP.py
hostbaby/RedisLive
a1b655483c08c80ca1aa91eed87e434d458bcfb7
[ "MIT" ]
41
2015-01-05T15:43:48.000Z
2022-02-05T02:17:28.000Z
src/api/util/RDP.py
hostbaby/RedisLive
a1b655483c08c80ca1aa91eed87e434d458bcfb7
[ "MIT" ]
348
2015-01-05T03:28:10.000Z
2022-03-09T02:33:56.000Z
""" The Ramer-Douglas-Peucker algorithm roughly ported from the pseudo-code provided by http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm """ from math import sqrt def distance(a, b): return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) def point_line_distance(point, start, end): if (start == en...
29.74359
101
0.55
from math import sqrt def distance(a, b): return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) def point_line_distance(point, start, end): if (start == end): return distance(point, start) else: n = abs( (end[0] - start[0]) * (start[1] - point[1]) - (start[0] - point[0]) * (e...
true
true
f73c915c4e464074da4d7508c7c611be4d49dd01
16,011
py
Python
gnomad/variant_qc/evaluation.py
broadinstitute/gnomad_hail
382fc2c7976d58cc8983cc4c9f0df5d8d5f9fae3
[ "MIT" ]
20
2017-10-17T00:33:20.000Z
2020-02-21T20:07:10.000Z
gnomad/variant_qc/evaluation.py
broadinstitute/gnomad_hail
382fc2c7976d58cc8983cc4c9f0df5d8d5f9fae3
[ "MIT" ]
49
2017-10-04T04:04:31.000Z
2020-03-03T16:04:34.000Z
gnomad/variant_qc/evaluation.py
broadinstitute/gnomad_hail
382fc2c7976d58cc8983cc4c9f0df5d8d5f9fae3
[ "MIT" ]
9
2017-10-04T13:47:27.000Z
2019-11-23T02:29:55.000Z
# noqa: D100 import logging from typing import Dict, Optional import hail as hl logging.basicConfig( format="%(asctime)s (%(name)s %(lineno)s): %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p", ) logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def compute_ranked_bin( ht: hl.Table, sc...
37.496487
164
0.598838
import logging from typing import Dict, Optional import hail as hl logging.basicConfig( format="%(asctime)s (%(name)s %(lineno)s): %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p", ) logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def compute_ranked_bin( ht: hl.Table, score_expr: hl...
true
true
f73c9285438f8311e12c44865f0ccb3430d58571
3,011
py
Python
AdventOfCode2021/Day18/Day18.py
MattTitmas/AdventOfCode
36be4f6bf973f77ff93b08dc69c977bb11951f27
[ "MIT" ]
null
null
null
AdventOfCode2021/Day18/Day18.py
MattTitmas/AdventOfCode
36be4f6bf973f77ff93b08dc69c977bb11951f27
[ "MIT" ]
null
null
null
AdventOfCode2021/Day18/Day18.py
MattTitmas/AdventOfCode
36be4f6bf973f77ff93b08dc69c977bb11951f27
[ "MIT" ]
null
null
null
from itertools import permutations def snailfishAdd(num1: list, num2: list) -> list: result = ["["] + num1 + num2 + ["]"] changeMade = True while changeMade: changeAlreadyMade = False nestedLevel = 0 for i in range(len(result)): char = result[i] if char == "[...
33.831461
74
0.471272
from itertools import permutations def snailfishAdd(num1: list, num2: list) -> list: result = ["["] + num1 + num2 + ["]"] changeMade = True while changeMade: changeAlreadyMade = False nestedLevel = 0 for i in range(len(result)): char = result[i] if char == "[...
true
true
f73c92ffba2f59921cdc57284eac4259a30396c2
627
py
Python
tests/irr/test_irt.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
36
2021-04-28T03:22:03.000Z
2022-03-30T16:54:44.000Z
tests/irr/test_irt.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
21
2021-03-18T14:10:11.000Z
2022-01-29T14:12:45.000Z
tests/irr/test_irt.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
36
2021-03-17T14:43:18.000Z
2022-03-29T07:52:26.000Z
# coding: utf-8 # 2021/6/19 @ tongshiwei from EduCDM.IRR import IRT def test_irr_irt(train_data, test_data, params, tmp_path): cdm = IRT(params.user_num, params.item_num, params.knowledge_num) cdm.train(train_data, test_data=test_data, epoch=2) filepath = tmp_path / "irr.params" cdm.save(filepath) ...
29.857143
77
0.727273
from EduCDM.IRR import IRT def test_irr_irt(train_data, test_data, params, tmp_path): cdm = IRT(params.user_num, params.item_num, params.knowledge_num) cdm.train(train_data, test_data=test_data, epoch=2) filepath = tmp_path / "irr.params" cdm.save(filepath) cdm.load(filepath) def test_irt(zer...
true
true
f73c93e11217afcecc5242ec7518a375c2b41f86
5,499
py
Python
train.py
EverLookNeverSee/BTS_DP_MRI
c4e36c766c3ccf2ddea7c935f81df79ed8b72247
[ "MIT" ]
5
2021-12-13T19:06:06.000Z
2022-03-06T08:41:50.000Z
train.py
EverLookNeverSee/BTS_DP_MRI
c4e36c766c3ccf2ddea7c935f81df79ed8b72247
[ "MIT" ]
null
null
null
train.py
EverLookNeverSee/BTS_DP_MRI
c4e36c766c3ccf2ddea7c935f81df79ed8b72247
[ "MIT" ]
null
null
null
""" Training 3D U-Net Model @author: Milad Sadeghi DM - EverLookNeverSee@GitHub """ import os import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt from model import build_unet_model from sklearn.model_selection import KFold from tensorflow.keras.optimizers import Adam from im...
39.278571
101
0.678487
import os import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt from model import build_unet_model from sklearn.model_selection import KFold from tensorflow.keras.optimizers import Adam from image_data_generator import image_generator from tensorflow.keras.callbacks import TensorBoard...
true
true
f73c9477e195c147e756da1e3cb4c32040e8235d
4,152
py
Python
benchmark/startQiskit_noisy2320.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2320.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2320.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=37 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
34.6
140
0.654383
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 im...
true
true
f73c953f2b3ab1aaff4b5fc5d04de7ab15f1fcac
527
py
Python
user/migrations/0004_specialization_department.py
namantam1/or-module
d2437b3f0067588975ec9460d881a8885b363383
[ "MIT" ]
1
2021-09-25T08:20:52.000Z
2021-09-25T08:20:52.000Z
user/migrations/0004_specialization_department.py
namantam1/or-module
d2437b3f0067588975ec9460d881a8885b363383
[ "MIT" ]
null
null
null
user/migrations/0004_specialization_department.py
namantam1/or-module
d2437b3f0067588975ec9460d881a8885b363383
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-18 16:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20210918_2131'), ] operations = [ migrations.AddField( model_name='specializa...
25.095238
115
0.639469
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20210918_2131'), ] operations = [ migrations.AddField( model_name='specialization', name='department', ...
true
true
f73c98e14dea4ec7d86b3628ab17dd13ac58cd61
9,267
py
Python
animations/utils/gradient.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
9
2018-02-19T14:17:12.000Z
2021-03-27T14:46:28.000Z
animations/utils/gradient.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
null
null
null
animations/utils/gradient.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
35.779923
95
0.524981
import colorsys import io import math class Gradient: multi_gradients = False def to_array(self, length): colors_array = [] for idx in range(length): colors_array.append(str(self.color(idx / length))) return ",".join(colors_array) class GimpGradient(Gradient)...
true
true
f73c99410d86debcfd12b93a95424dc4d122894a
15,643
py
Python
sdk/python/pulumi_alicloud/ram/outputs.py
pulumi/pulumi-alicloud
9c34d84b4588a7c885c6bec1f03b5016e5a41683
[ "ECL-2.0", "Apache-2.0" ]
42
2019-03-18T06:34:37.000Z
2022-03-24T07:08:57.000Z
sdk/python/pulumi_alicloud/ram/outputs.py
pulumi/pulumi-alicloud
9c34d84b4588a7c885c6bec1f03b5016e5a41683
[ "ECL-2.0", "Apache-2.0" ]
152
2019-04-15T21:03:44.000Z
2022-03-29T18:00:57.000Z
sdk/python/pulumi_alicloud/ram/outputs.py
pulumi/pulumi-alicloud
9c34d84b4588a7c885c6bec1f03b5016e5a41683
[ "ECL-2.0", "Apache-2.0" ]
3
2020-08-26T17:30:07.000Z
2021-07-05T01:37:45.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
34.455947
674
0.601803
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ 'PolicyStatement', 'GetGroupsGroupResult', 'GetPoliciesPolicyResult', 'GetRolesRoleResult', 'GetSamlProvidersProviderResult', 'GetUs...
true
true
f73c9c126705b5ee90f5d84cab58abc47b59ca61
485
py
Python
src/main/python/combiner.py
boom-roasted/ImageWAO
944505dab1a7c97b8eae2bf9fb30006d0f471f89
[ "MIT" ]
1
2020-03-22T01:52:52.000Z
2020-03-22T01:52:52.000Z
src/main/python/combiner.py
leftaltkey/ImageWAO
944505dab1a7c97b8eae2bf9fb30006d0f471f89
[ "MIT" ]
2
2021-06-08T21:12:47.000Z
2021-06-08T21:30:32.000Z
src/main/python/combiner.py
leftaltkey/ImageWAO
944505dab1a7c97b8eae2bf9fb30006d0f471f89
[ "MIT" ]
null
null
null
from fbs_runtime.application_context import cached_property from imagewao import QImageWAO class Combiner: def __init__(self, ctx): self.ctx = ctx @cached_property def window(self): return QImageWAO() def run(self): with open(self.ctx.get_resource("style.qss")) as f: ...
23.095238
59
0.639175
from fbs_runtime.application_context import cached_property from imagewao import QImageWAO class Combiner: def __init__(self, ctx): self.ctx = ctx @cached_property def window(self): return QImageWAO() def run(self): with open(self.ctx.get_resource("style.qss")) as f: ...
true
true
f73c9c1f18b63e8453b93ea1488004fa78cc13f1
19,780
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/web_infrastructure/deploy_helper.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
22
2021-07-16T08:11:22.000Z
2022-03-31T07:15:34.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/web_infrastructure/deploy_helper.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/web_infrastructure/deploy_helper.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
39
2021-07-05T02:31:42.000Z
2022-03-31T02:46:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclas...
37.533207
120
0.673357
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: deploy_helper author: "Ramon de la Fuente (@ramondelafuente)" short_description: Manages some of the steps common in deploying projects. description: - The Deploy Helper manages some of the ...
true
true
f73c9c82133d87ced8836742df68c56eec27f350
4,853
py
Python
gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-thomas-rob
d80caea3f5655bd1be2b0114eb7be2cb4a4c5a53
[ "Apache-2.0" ]
null
null
null
gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-thomas-rob
d80caea3f5655bd1be2b0114eb7be2cb4a4c5a53
[ "Apache-2.0" ]
null
null
null
gameApp/views.py
cs-fullstack-2019-spring/django-mini-project4-thomas-rob
d80caea3f5655bd1be2b0114eb7be2cb4a4c5a53
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.decorators import \ login_required # unused for now but for making sure the person on the page is logged in from django.shortcuts import render, redirect, get_object_or_404 # pulling redirect from django.http import HttpResponse # used for testing purposes # Create your views here. from ...
55.781609
141
0.696064
from django.contrib.auth.decorators import \ login_required from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse from .forms import GameModel, GameCollectorModel, GameForm, \ GameCollectorForm from django.contrib.auth.models import User def index(req...
true
true
f73c9ccedcf7eefff848fca13db014327c33c491
4,935
py
Python
azext_iot/tests/test_iot_utility_unit.py
digimaun/azure-iot-cli-extension
3970b0441c770ccf206f7c8e4494a30992361a9f
[ "MIT" ]
null
null
null
azext_iot/tests/test_iot_utility_unit.py
digimaun/azure-iot-cli-extension
3970b0441c770ccf206f7c8e4494a30992361a9f
[ "MIT" ]
1
2020-07-13T19:57:48.000Z
2020-07-13T19:57:48.000Z
azext_iot/tests/test_iot_utility_unit.py
digimaun/azure-iot-cli-extension
3970b0441c770ccf206f7c8e4494a30992361a9f
[ "MIT" ]
null
null
null
import pytest from knack.util import CLIError from azext_iot.common.utility import validate_min_python_version from azext_iot.common.deps import ensure_uamqp from azext_iot._validators import mode2_iot_login_handler from azext_iot.constants import EVENT_LIB class TestMinPython(): @pytest.mark.parametrize("pymajor...
36.828358
101
0.599189
import pytest from knack.util import CLIError from azext_iot.common.utility import validate_min_python_version from azext_iot.common.deps import ensure_uamqp from azext_iot._validators import mode2_iot_login_handler from azext_iot.constants import EVENT_LIB class TestMinPython(): @pytest.mark.parametrize("pymajor...
true
true
f73c9cd2d12bbf09d2a5a7e3374e24a023d4e895
295
py
Python
ML/Data_Aug.py
PrathmeshBele/Autumn-of-Automation
c33a3725826807f3f9c9427a73922379b07f58b9
[ "MIT" ]
null
null
null
ML/Data_Aug.py
PrathmeshBele/Autumn-of-Automation
c33a3725826807f3f9c9427a73922379b07f58b9
[ "MIT" ]
null
null
null
ML/Data_Aug.py
PrathmeshBele/Autumn-of-Automation
c33a3725826807f3f9c9427a73922379b07f58b9
[ "MIT" ]
null
null
null
import cv2 as cv import numpy as np import os import cv2 pth = '/home/prathmesh/Desktop/UMIC/Autumn-of-Automation/ML/UMIC/Yes' obj = os.listdir(pth) for j in obj: img = cv2.imread(pth + '/' + j) img_flip_lr = cv2.flip(img, 1) cv2.imwrite('A{}.jpg'.format(j.replace('.jpg','')), img_flip_lr)
26.818182
69
0.688136
import cv2 as cv import numpy as np import os import cv2 pth = '/home/prathmesh/Desktop/UMIC/Autumn-of-Automation/ML/UMIC/Yes' obj = os.listdir(pth) for j in obj: img = cv2.imread(pth + '/' + j) img_flip_lr = cv2.flip(img, 1) cv2.imwrite('A{}.jpg'.format(j.replace('.jpg','')), img_flip_lr)
true
true
f73c9e65fda97de61814f393f9ef74fd59c57a16
5,621
py
Python
CalibMuon/DTCalibration/python/dtT0WireCalibration_cfg.py
samarendran23/cmssw
849dd9897db9b894ca83e1b630a3c1eecafd6097
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
CalibMuon/DTCalibration/python/dtT0WireCalibration_cfg.py
samarendran23/cmssw
849dd9897db9b894ca83e1b630a3c1eecafd6097
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
CalibMuon/DTCalibration/python/dtT0WireCalibration_cfg.py
p2l1pfp/cmssw
9bda22bf33ecf18dd19a3af2b3a8cbdb1de556a9
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("PROD") process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.debugModules = cms.untracked.vstring('*') process.MessageLogger.destinations = cms.untracked.vstring('cerr') process.MessageLogger.categories.append('resolution') proces...
43.238462
114
0.72923
import FWCore.ParameterSet.Config as cms process = cms.Process("PROD") process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.debugModules = cms.untracked.vstring('*') process.MessageLogger.destinations = cms.untracked.vstring('cerr') process.MessageLogger.categories.append('resolution') proces...
true
true
f73c9e8b4cd746bac87d04c011dcab2a7ab2fad1
808
py
Python
sutler/installers/node.py
joeladam518/sutler
c306568bd2520c49a2bdae238281074b915ba0cc
[ "0BSD" ]
null
null
null
sutler/installers/node.py
joeladam518/sutler
c306568bd2520c49a2bdae238281074b915ba0cc
[ "0BSD" ]
null
null
null
sutler/installers/node.py
joeladam518/sutler
c306568bd2520c49a2bdae238281074b915ba0cc
[ "0BSD" ]
null
null
null
import os from .installer import Installer class NodeInstaller(Installer): versions = ('14', '15', '16', '17') __source_file_path = '/etc/apt/sources.list.d/nodesource.list' def install(self, version: str) -> None: if version not in self.versions: self.ctx.fail('Invalid node version')...
35.130435
103
0.62995
import os from .installer import Installer class NodeInstaller(Installer): versions = ('14', '15', '16', '17') __source_file_path = '/etc/apt/sources.list.d/nodesource.list' def install(self, version: str) -> None: if version not in self.versions: self.ctx.fail('Invalid node version')...
true
true
f73ca0f7853c8ff85f4b9e63d83ce7463ecdd88f
2,515
py
Python
vocab_program/helpers.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
1
2017-10-04T17:55:02.000Z
2017-10-04T17:55:02.000Z
vocab_program/helpers.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
null
null
null
vocab_program/helpers.py
datwheat/hsCode
880425c86f043c72ee3eb5bd4d8ca715f61b773d
[ "MIT" ]
null
null
null
import os import json import sys import random import time filename = "db.json" def init(): """Initialize Database""" if os.path.isfile(filename) != True: db = open(filename, 'w').close() else: db = open(filename, 'r') try: content = json.load(db) except ValueError: content = [] return content de...
18.093525
107
0.619085
import os import json import sys import random import time filename = "db.json" def init(): if os.path.isfile(filename) != True: db = open(filename, 'w').close() else: db = open(filename, 'r') try: content = json.load(db) except ValueError: content = [] return content def callback(func): time.sle...
true
true
f73ca226ad51dec7ce013725765072d606f59e6c
295
py
Python
server/domain/auth/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
server/domain/auth/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
14
2022-01-25T17:56:52.000Z
2022-01-28T17:47:59.000Z
server/domain/auth/exceptions.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
from ..common.exceptions import DoesNotExist class UserDoesNotExist(DoesNotExist): entity_name = "User" class EmailAlreadyExists(Exception): def __init__(self, email: str) -> None: super().__init__(f"Email already exists: {email!r}") class LoginFailed(Exception): pass
19.666667
60
0.718644
from ..common.exceptions import DoesNotExist class UserDoesNotExist(DoesNotExist): entity_name = "User" class EmailAlreadyExists(Exception): def __init__(self, email: str) -> None: super().__init__(f"Email already exists: {email!r}") class LoginFailed(Exception): pass
true
true
f73ca32e4ae0c0f2000b94378926e073c76dc89a
5,028
py
Python
lexicon/providers/digitalocean.py
felixonmars/lexicon
1ea6d5bc6cdfbb6a2299411dbfa7d2c3830344c3
[ "MIT" ]
1
2018-07-24T01:19:19.000Z
2018-07-24T01:19:19.000Z
lexicon/providers/digitalocean.py
felixonmars/lexicon
1ea6d5bc6cdfbb6a2299411dbfa7d2c3830344c3
[ "MIT" ]
1
2018-07-26T15:19:39.000Z
2018-07-26T15:19:39.000Z
lexicon/providers/digitalocean.py
gbdlin/lexicon
3e43404d35c9eb104966972e59937cf88797bc4c
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify token used authenticate to...
35.659574
116
0.575179
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify token used authenticate to...
true
true
f73ca4d27cea6b93175f0c45c03f59df6011ba6f
534
py
Python
backend/sql.py
digitaltembo/stylobate
c22dbbb671612b2c95f84b7ee95dcb40f1fb6baa
[ "MIT" ]
4
2020-07-29T02:01:41.000Z
2022-02-19T13:11:30.000Z
backend/sql.py
digitaltembo/stylobate
c22dbbb671612b2c95f84b7ee95dcb40f1fb6baa
[ "MIT" ]
4
2021-03-11T02:00:08.000Z
2022-02-19T05:07:33.000Z
backend/sql.py
digitaltembo/stylobate
c22dbbb671612b2c95f84b7ee95dcb40f1fb6baa
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from utils.config import DB_URL # SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" engine = create_engine( DB_URL, connect_args={"check_same_thread": False} ...
25.428571
75
0.758427
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from utils.config import DB_URL engine = create_engine( DB_URL, connect_args={"check_same_thread": False} ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engi...
true
true
f73ca519ae721a4299f7081ea11fc969ddeb393b
1,337
py
Python
app/core/tests/test_admin.py
danoscarmike/recipe-app-api
530461aa48a94b7b189721de03b3f5f18aef09fe
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
danoscarmike/recipe-app-api
530461aa48a94b7b189721de03b3f5f18aef09fe
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
danoscarmike/recipe-app-api
530461aa48a94b7b189721de03b3f5f18aef09fe
[ "MIT" ]
null
null
null
from django.test import Client, TestCase from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@danoscarmike.com', ...
32.609756
68
0.646971
from django.test import Client, TestCase from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@danoscarmike.com', ...
true
true
f73caa96f70355b346f59787c08625aa604d2c31
9,857
py
Python
obztak/seeing.py
kadrlica/obztak
d24a8fe0659f2602f5d87cdfd99ebcf5224e418c
[ "MIT" ]
4
2019-01-18T20:34:29.000Z
2022-01-26T14:35:31.000Z
obztak/seeing.py
kadrlica/obztak
d24a8fe0659f2602f5d87cdfd99ebcf5224e418c
[ "MIT" ]
8
2017-06-22T19:12:31.000Z
2020-01-27T03:52:59.000Z
obztak/seeing.py
kadrlica/obztak
d24a8fe0659f2602f5d87cdfd99ebcf5224e418c
[ "MIT" ]
3
2017-12-15T21:51:23.000Z
2019-08-10T05:07:53.000Z
#!/usr/bin/env python """ Generic python script. """ __author__ = "Alex Drlica-Wagner" from collections import OrderedDict as odict import logging import copy import numpy as np import pandas as pd import dateutil.parser import ephem from obztak.utils import fileio from obztak.utils.date import datestring from obztak...
36.106227
98
0.567718
__author__ = "Alex Drlica-Wagner" from collections import OrderedDict as odict import logging import copy import numpy as np import pandas as pd import dateutil.parser import ephem from obztak.utils import fileio from obztak.utils.date import datestring from obztak.utils.database import Database WAVE = odict([ ...
true
true
f73caa9a9825042422a26fca312f9f5231731f8a
3,489
py
Python
fixture/orm.py
anastas11a/python_training
1daceddb193d92542f7f7313026a7e67af4d89bb
[ "Apache-2.0" ]
null
null
null
fixture/orm.py
anastas11a/python_training
1daceddb193d92542f7f7313026a7e67af4d89bb
[ "Apache-2.0" ]
null
null
null
fixture/orm.py
anastas11a/python_training
1daceddb193d92542f7f7313026a7e67af4d89bb
[ "Apache-2.0" ]
null
null
null
from pony.orm import * from model.group import Group from model.contact import Contact class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='group_id') name = Optional(str, column='group_name') header = Optional(str, ...
44.730769
133
0.662654
from pony.orm import * from model.group import Group from model.contact import Contact class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='group_id') name = Optional(str, column='group_name') header = Optional(str, ...
true
true
f73caad320ebd11ff60af29d1a8efec454ebb12e
194
py
Python
task_5.py
user275301/ProjectEuler_tasks
e5507975b089cd901bba5c539d2a4f3306ddab02
[ "MIT" ]
null
null
null
task_5.py
user275301/ProjectEuler_tasks
e5507975b089cd901bba5c539d2a4f3306ddab02
[ "MIT" ]
null
null
null
task_5.py
user275301/ProjectEuler_tasks
e5507975b089cd901bba5c539d2a4f3306ddab02
[ "MIT" ]
null
null
null
maxdivider = 20 def task5(maxdivider): num = 11 test = 1 while test != 0: test = 0 for div in range(1,maxdivider): test += num%div num += 1 return num - 1 print(task5(maxdivider))
14.923077
33
0.634021
maxdivider = 20 def task5(maxdivider): num = 11 test = 1 while test != 0: test = 0 for div in range(1,maxdivider): test += num%div num += 1 return num - 1 print(task5(maxdivider))
true
true
f73caaed0848c16bacf6f77fdc692296c0be1e57
827
py
Python
nesara/urls.py
Annonymus-Coder/Tours-And-Travels-project
81fce5c24599895b6526eeb28bd4582b5d55948b
[ "MIT" ]
null
null
null
nesara/urls.py
Annonymus-Coder/Tours-And-Travels-project
81fce5c24599895b6526eeb28bd4582b5d55948b
[ "MIT" ]
null
null
null
nesara/urls.py
Annonymus-Coder/Tours-And-Travels-project
81fce5c24599895b6526eeb28bd4582b5d55948b
[ "MIT" ]
null
null
null
"""nesara URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
34.458333
78
0.680774
from django.contrib import admin from django.urls import path,include urlpatterns = [ path('admin/', admin.site.urls), path('', include('NesaraTours.urls')), ]
true
true
f73caaed636a339de3fe0a88cd8760c19f1791c9
7,801
py
Python
src/config/bot_config.py
nostalgebraist/nostalgebraist-autoresponder
622349c4cad2a7aec1017837416c58a678151aae
[ "MIT" ]
39
2020-06-19T05:38:11.000Z
2022-03-28T04:35:31.000Z
src/config/bot_config.py
nostalgebraist/nostalgebraist-autoresponder
622349c4cad2a7aec1017837416c58a678151aae
[ "MIT" ]
null
null
null
src/config/bot_config.py
nostalgebraist/nostalgebraist-autoresponder
622349c4cad2a7aec1017837416c58a678151aae
[ "MIT" ]
2
2021-04-13T18:12:03.000Z
2021-12-16T23:20:12.000Z
from typing import List, Set, Dict import json import pytumblr from api_tumblr.pytumblr_wrapper import RateLimitClient API_KEYS_TYPE = List[str] class BotSpecificConstants: """Values specific to my development environment and/or the social context of my bot, e.g. specific posts IDs where I need apply some overr...
40.630208
199
0.672991
from typing import List, Set, Dict import json import pytumblr from api_tumblr.pytumblr_wrapper import RateLimitClient API_KEYS_TYPE = List[str] class BotSpecificConstants: def __init__( self, blogName: str, dash_blogName: str, REBLOG_START_TS: int, DASH_START_TS: int, ...
true
true
f73cabbee568613375f471d809d94db0936580d5
3,015
py
Python
app/kivymd/backgroundcolorbehavior.py
blurmcclure18/ExpenseTracker
b4c65095298fbb551fc3fc7ecffd5d5029401e87
[ "MIT" ]
16
2019-10-19T11:34:35.000Z
2021-12-16T07:10:25.000Z
app/kivymd/backgroundcolorbehavior.py
blurmcclure18/ExpenseTracker
b4c65095298fbb551fc3fc7ecffd5d5029401e87
[ "MIT" ]
1
2021-09-27T04:37:28.000Z
2021-09-27T04:37:28.000Z
app/kivymd/backgroundcolorbehavior.py
blurmcclure18/ExpenseTracker
b4c65095298fbb551fc3fc7ecffd5d5029401e87
[ "MIT" ]
11
2019-10-21T00:01:55.000Z
2022-01-17T06:02:23.000Z
""" Background Color Behavior ========================= Copyright (c) 2015 Andrés Rodríguez and KivyMD contributors - KivyMD library up to version 0.1.2 Copyright (c) 2019 Ivanov Yuri and KivyMD contributors - KivyMD library version 0.1.3 and higher For suggestions and questions: <kivydevelopment@gmail.com> ...
35.470588
81
0.678607
from kivy.lang import Builder from kivy.properties import BoundedNumericProperty, ReferenceListProperty from kivy.properties import OptionProperty, ListProperty from kivy.uix.widget import Widget from kivy.utils import get_color_from_hex from kivymd.color_definitions import palette, hue, text_colors Builder.load_stri...
true
true
f73cace2d882d031da2e578e09924d6544493556
6,764
py
Python
src/tests.py
ThomasRanvier/map_maker
e36ddcc7d5959957d83fae778d8ef715c79712e7
[ "MIT" ]
null
null
null
src/tests.py
ThomasRanvier/map_maker
e36ddcc7d5959957d83fae778d8ef715c79712e7
[ "MIT" ]
null
null
null
src/tests.py
ThomasRanvier/map_maker
e36ddcc7d5959957d83fae778d8ef715c79712e7
[ "MIT" ]
null
null
null
from mapping.map import Map from utils.position import Position from utils.utils import bresenham_line, filled_midpoint_circle import matplotlib.pyplot as plt def map_to_grid_pos(): print('Test: map_to_grid_pos') lower_left_pos = Position(-5.0, -5.0) upper_right_pos = Position(5.0, 5.0) test_map = Map(...
33.651741
62
0.409077
from mapping.map import Map from utils.position import Position from utils.utils import bresenham_line, filled_midpoint_circle import matplotlib.pyplot as plt def map_to_grid_pos(): print('Test: map_to_grid_pos') lower_left_pos = Position(-5.0, -5.0) upper_right_pos = Position(5.0, 5.0) test_map = Map(...
true
true
f73cad27089a75a5f21bee4d25a349744852b8dc
442
py
Python
dbcm2/_nbdev.py
barrypj/dbcm2
637921187d4359e77177aee657bcefc862d42925
[ "Apache-2.0" ]
null
null
null
dbcm2/_nbdev.py
barrypj/dbcm2
637921187d4359e77177aee657bcefc862d42925
[ "Apache-2.0" ]
null
null
null
dbcm2/_nbdev.py
barrypj/dbcm2
637921187d4359e77177aee657bcefc862d42925
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"ConnectionError": "00_DBcm.ipynb", "CredentialsError": "00_DBcm.ipynb", "SQLError": "00_DBcm.ipynb", "UseDatabase": "00_DBcm.ipynb"} modules = ["DBcm.py"] doc_url = "https://barr...
26
61
0.667421
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"ConnectionError": "00_DBcm.ipynb", "CredentialsError": "00_DBcm.ipynb", "SQLError": "00_DBcm.ipynb", "UseDatabase": "00_DBcm.ipynb"} modules = ["DBcm.py"] doc_url = "https://barrypj.github.io/dbcm2/" git_url = "http...
true
true
f73cad93c0f5712bda49b85741dff479e6491c32
2,870
py
Python
shadowlands/sl_contract/__init__.py
kayagoban/shadowlands
bf10f9d17788bcc49a8f515b3f5049c63227b670
[ "MIT" ]
140
2018-10-10T18:52:47.000Z
2022-02-14T11:31:52.000Z
shadowlands/sl_contract/__init__.py
kayagoban/shadowlands
bf10f9d17788bcc49a8f515b3f5049c63227b670
[ "MIT" ]
12
2018-10-10T22:07:58.000Z
2020-05-12T10:56:29.000Z
shadowlands/sl_contract/__init__.py
kayagoban/shadowlands
bf10f9d17788bcc49a8f515b3f5049c63227b670
[ "MIT" ]
9
2018-10-10T20:17:55.000Z
2021-12-16T09:10:19.000Z
from eth_utils import decode_hex class ContractConfigError(Exception): pass class InvalidW3Error(Exception): pass class SLContract(): def __init__(self, node, address=None, provided_abi=None): self._contract = None self._node = node if not self._node.w3.isConnected(): ...
32.613636
117
0.618467
from eth_utils import decode_hex class ContractConfigError(Exception): pass class InvalidW3Error(Exception): pass class SLContract(): def __init__(self, node, address=None, provided_abi=None): self._contract = None self._node = node if not self._node.w3.isConnected(): ...
true
true
f73cae2fdf5cd48c33c248edc42c16dd21785fbf
589
py
Python
dynabuffers-python/tests/usecase/Schema07Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
2
2019-10-28T12:28:01.000Z
2020-07-07T12:25:40.000Z
dynabuffers-python/tests/usecase/Schema07Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2021-12-21T07:35:22.000Z
2021-12-21T07:35:22.000Z
dynabuffers-python/tests/usecase/Schema07Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2020-03-19T09:19:43.000Z
2020-03-19T09:19:43.000Z
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema05Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): with open(self.root_dir + "/1.jpg", 'rb') as f: data = b"".join(f.r...
25.608696
83
0.658744
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema05Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): with open(self.root_dir + "/1.jpg", 'rb') as f: data = b"".join(f.r...
true
true
f73cae82e0878e186c75679681f3254c01370313
18
py
Python
encoders/__init__.py
alexbires/webshellmanagement
ad12f5e8889c5e03bab7efadc5c3d65f7155290c
[ "MIT" ]
1
2015-02-08T03:23:17.000Z
2015-02-08T03:23:17.000Z
encoders/__init__.py
alexbires/webshellmanagement
ad12f5e8889c5e03bab7efadc5c3d65f7155290c
[ "MIT" ]
null
null
null
encoders/__init__.py
alexbires/webshellmanagement
ad12f5e8889c5e03bab7efadc5c3d65f7155290c
[ "MIT" ]
2
2020-01-17T09:39:25.000Z
2020-01-17T09:39:33.000Z
__all__ = ['php']
9
17
0.555556
__all__ = ['php']
true
true
f73caf5ede9d719f5f69b4c939a834518f625245
554
py
Python
meiduo_mall/meiduo_mall/apps/addresses/urls.py
lhz0707/meiduo
5ba6bbb82a28f5c93e7c8d40cdab7ee41b6593d0
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/addresses/urls.py
lhz0707/meiduo
5ba6bbb82a28f5c93e7c8d40cdab7ee41b6593d0
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/addresses/urls.py
lhz0707/meiduo
5ba6bbb82a28f5c93e7c8d40cdab7ee41b6593d0
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib import admin from . import views urlpatterns = [ url(r'^addresses',views.AddressView.as_view()), # 获取省信息 url(r'^areas/$', views.AreasView.as_view()), # 保存收貨地址 url(r'addresses/create/$',views.AddressCreateView.as_view()), # 修改收貨地址 # url(r'addresse...
32.588235
82
0.666065
from django.conf.urls import url from django.contrib import admin from . import views urlpatterns = [ url(r'^addresses',views.AddressView.as_view()), url(r'^areas/$', views.AreasView.as_view()), url(r'addresses/create/$',views.AddressCreateView.as_view()),
true
true
f73caf7955658402212e4b9c371c86bb9aac86e7
6,642
py
Python
cocomo.py
SaulNunez/Estimacion-COCOMO
58f504f5f096914a02961d360ab7537cc4ce2cde
[ "MIT" ]
null
null
null
cocomo.py
SaulNunez/Estimacion-COCOMO
58f504f5f096914a02961d360ab7537cc4ce2cde
[ "MIT" ]
null
null
null
cocomo.py
SaulNunez/Estimacion-COCOMO
58f504f5f096914a02961d360ab7537cc4ce2cde
[ "MIT" ]
null
null
null
from enum import Enum #Constantes del método Cocomo class Cocomo(): class Tipo(Enum): ORGANICO = 1 SEMI_ACOPLADO = 2 EMPOTRADO = 3 class Modelo(Enum): BASICO = 1 INTERMEDIO = 2 AVANZADO = 3 constantes = { Modelo.BASICO : { ...
29.651786
146
0.4053
from enum import Enum class Cocomo(): class Tipo(Enum): ORGANICO = 1 SEMI_ACOPLADO = 2 EMPOTRADO = 3 class Modelo(Enum): BASICO = 1 INTERMEDIO = 2 AVANZADO = 3 constantes = { Modelo.BASICO : { Tipo.ORGANICO : { ...
true
true
f73cb02d4b475c260a2a8c60e3aa0cd43f876edb
7,952
py
Python
maskrcnn_benchmark/structures/segmentation_mask.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
41
2020-07-22T03:55:08.000Z
2022-02-27T12:04:41.000Z
maskrcnn_benchmark/structures/segmentation_mask.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
5
2020-11-08T08:47:34.000Z
2021-07-09T03:53:42.000Z
maskrcnn_benchmark/structures/segmentation_mask.py
SIAAAAAA/MMT-PSM
0835c01c5010d3337778f452e9d96416e0f8a11a
[ "MIT" ]
5
2020-10-13T11:09:53.000Z
2021-07-28T12:41:53.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch import pycocotools.mask as mask_utils from pycocotools import mask as maskUtils import numpy as np # from maskrcnn_benchmark.utils.miscellaneous # transpose FLIP_LEFT_RIGHT = 0 FLIP_TOP_BOTTOM = 1 class Mask(object): """ Thi...
32.064516
86
0.564512
import torch import pycocotools.mask as mask_utils from pycocotools import mask as maskUtils import numpy as np FLIP_LEFT_RIGHT = 0 FLIP_TOP_BOTTOM = 1 class Mask(object): def __init__(self, masks, size, mode): self.masks = masks self.size = size self.mode = mode def transpose(se...
true
true
f73cb2e177bce9a439ac8896c2d161e139655acb
5,860
py
Python
apps/recipes/models.py
DKudrik/foodgram-project-react
1a754a98add627baaadc6ca7905a7abb4f33468e
[ "MIT" ]
null
null
null
apps/recipes/models.py
DKudrik/foodgram-project-react
1a754a98add627baaadc6ca7905a7abb4f33468e
[ "MIT" ]
null
null
null
apps/recipes/models.py
DKudrik/foodgram-project-react
1a754a98add627baaadc6ca7905a7abb4f33468e
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.core.validators import MinValueValidator from django.db import models User = get_user_model() class Tag(models.Model): """Describes a tag object.""" name = models.CharField(max_length=255, verbose_name='Имя') color = models.CharField(max_length=1...
26.880734
79
0.57901
from django.contrib.auth import get_user_model from django.core.validators import MinValueValidator from django.db import models User = get_user_model() class Tag(models.Model): name = models.CharField(max_length=255, verbose_name='Имя') color = models.CharField(max_length=100, blank=True, ...
true
true
f73cb32287f46c3e451244ae7cf86f4c5ba02e6d
10,339
py
Python
Train/run_Train_SiamFC.py
GengZ/siameseFC-pytorch-vot
e825637b5ac68c38d6c62bba265b61b85c4955d9
[ "Apache-2.0" ]
26
2018-12-27T03:53:33.000Z
2021-06-29T13:11:32.000Z
Train/run_Train_SiamFC.py
GengZ/siameseFC-pytorch-vot
e825637b5ac68c38d6c62bba265b61b85c4955d9
[ "Apache-2.0" ]
3
2019-01-14T20:02:20.000Z
2019-07-08T01:48:19.000Z
Train/run_Train_SiamFC.py
GengZ/siameseFC-pytorch-vot
e825637b5ac68c38d6c62bba265b61b85c4955d9
[ "Apache-2.0" ]
6
2018-12-12T13:50:09.000Z
2019-08-02T13:48:22.000Z
import __init_paths import os import numpy as np from tqdm import tqdm import torch from torch.autograd import Variable from torch.optim.lr_scheduler import LambdaLR from torch.utils.data import DataLoader import torchvision.transforms as transforms from lib.VIDDataset import VIDDataset from lib.DataAugmentation imp...
36.663121
85
0.543863
import __init_paths import os import numpy as np from tqdm import tqdm import torch from torch.autograd import Variable from torch.optim.lr_scheduler import LambdaLR from torch.utils.data import DataLoader import torchvision.transforms as transforms from lib.VIDDataset import VIDDataset from lib.DataAugmentation imp...
true
true
f73cb3333a08b309d1f39edb1693b416c9b3c731
2,170
py
Python
website/website/texts.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
website/website/texts.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
website/website/texts.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
import logging import requests from django.conf import settings from django.template.loader import render_to_string logger = logging.getLogger(__name__) class TextMessagingAPIException(Exception): pass class TextMessagingAPI: API_BASE_URL = "https://application.textline.com/api" GROUPS = { "d...
30.138889
79
0.603687
import logging import requests from django.conf import settings from django.template.loader import render_to_string logger = logging.getLogger(__name__) class TextMessagingAPIException(Exception): pass class TextMessagingAPI: API_BASE_URL = "https://application.textline.com/api" GROUPS = { "d...
true
true
f73cb4291efff6e508979f434ec2c7c7247f7463
244
py
Python
tests/basics/string_split.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
1
2019-05-07T15:01:19.000Z
2019-05-07T15:01:19.000Z
tests/basics/string_split.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
null
null
null
tests/basics/string_split.py
bygreencn/micropython
3f759b71c63f5e01df18a6e204c50f78d1b6a20b
[ "MIT" ]
null
null
null
print("a b".split()) print(" a b ".split(None)) print(" a b ".split(None, 1)) print(" a b ".split(None, 2)) print(" a b c ".split(None, 1)) print(" a b c ".split(None, 0)) print(" a b c ".split(None, -1))
30.5
38
0.47541
print("a b".split()) print(" a b ".split(None)) print(" a b ".split(None, 1)) print(" a b ".split(None, 2)) print(" a b c ".split(None, 1)) print(" a b c ".split(None, 0)) print(" a b c ".split(None, -1))
true
true
f73cb539d947c85f0ce6a8a9d877fe496437ddaf
9,047
py
Python
pyseer/kmer_mapping/annotate_hits.py
yemilawal/pyseer
0d2130a1a0cb5fe247f339b226ea4f69b12fc321
[ "Apache-2.0" ]
1
2021-02-01T00:42:02.000Z
2021-02-01T00:42:02.000Z
pyseer/kmer_mapping/annotate_hits.py
johnlees/pyseer
acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b
[ "Apache-2.0" ]
null
null
null
pyseer/kmer_mapping/annotate_hits.py
johnlees/pyseer
acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 Marco Galardini and John Lees '''Script to annotate kmer hits''' import sys import os import re import tempfile import subprocess import pybedtools from .bwa import bwa_index from .bwa import bwa_iter def get_options(): import argparse description = 'Iteratively annot...
40.388393
142
0.557643
import sys import os import re import tempfile import subprocess import pybedtools from .bwa import bwa_index from .bwa import bwa_iter def get_options(): import argparse description = 'Iteratively annotate significant kmers from SEER' parser = argparse.ArgumentParser(description=description, prog="a...
true
true
f73cb6ea810c89eb0590e550a18e30bd2aa34a2f
1,029
py
Python
setup.py
didadadida93/tkpy
c8cc41e2115cca7d975a68e418c462a4da3232a9
[ "MIT" ]
1
2019-11-12T12:56:54.000Z
2019-11-12T12:56:54.000Z
setup.py
didadadida93/tkpy
c8cc41e2115cca7d975a68e418c462a4da3232a9
[ "MIT" ]
1
2019-02-16T17:06:04.000Z
2019-02-16T20:53:05.000Z
setup.py
didadadida93/tkpy
c8cc41e2115cca7d975a68e418c462a4da3232a9
[ "MIT" ]
5
2018-12-23T14:52:32.000Z
2021-07-17T06:11:15.000Z
import setuptools with open("README.md", "r") as f: long_description = f.read() about = {} with open("tkpy/__attrs__.py") as f: exec(f.read(), about) setuptools.setup( name=about["__name__"], version=about["__version__"], description=about["__description__"], long_description=long_descript...
27.810811
66
0.624879
import setuptools with open("README.md", "r") as f: long_description = f.read() about = {} with open("tkpy/__attrs__.py") as f: exec(f.read(), about) setuptools.setup( name=about["__name__"], version=about["__version__"], description=about["__description__"], long_description=long_descript...
true
true
f73cb71a565eaec15d39cf312dbd5018b983cef6
10,419
py
Python
hanbrake_revLights/src/fdp.py
ricardo-quintela/SimRacingSetup
3d995ca2097a951aa3b54cf627598481f9fcd54d
[ "MIT" ]
41
2018-06-06T18:08:13.000Z
2022-01-25T17:01:13.000Z
hanbrake_revLights/src/fdp.py
ricardo-quintela/SimRacingSetup
3d995ca2097a951aa3b54cf627598481f9fcd54d
[ "MIT" ]
9
2018-07-10T04:51:41.000Z
2022-03-02T20:04:03.000Z
hanbrake_revLights/src/fdp.py
ricardo-quintela/SimRacingSetup
3d995ca2097a951aa3b54cf627598481f9fcd54d
[ "MIT" ]
12
2019-05-25T14:58:16.000Z
2022-03-27T14:56:08.000Z
#!/usr/env/python # -*- coding: utf-8 -*- ''' Python class for Forza Motorsport 7's data stream format. Copyright (c) 2018 Morten Wang 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 rest...
63.920245
1,916
0.695844
from struct import unpack ngular_velocity_y', 'angular_velocity_z', 'yaw', 'pitch', 'roll', 'norm_suspension_travel_FL', 'norm_suspension_travel_FR', 'norm_suspension_travel_RL', 'norm_suspension_travel_RR', 'tire_slip_ratio_FL', 'tire_slip_ratio_FR', 'tire_slip_ratio_RL', 't...
true
true
f73cb8544021686bca7140f3665f3a31dac0efba
187
py
Python
ftlib/finetune/__init__.py
ashok-arjun/Transfer-Learning-Library
e13bb3e37bc7ca74a382cfdc85a640deaf0333b3
[ "MIT" ]
1
2021-08-04T23:31:30.000Z
2021-08-04T23:31:30.000Z
ftlib/finetune/__init__.py
ashok-arjun/Transfer-Learning-Library
e13bb3e37bc7ca74a382cfdc85a640deaf0333b3
[ "MIT" ]
null
null
null
ftlib/finetune/__init__.py
ashok-arjun/Transfer-Learning-Library
e13bb3e37bc7ca74a382cfdc85a640deaf0333b3
[ "MIT" ]
null
null
null
from .stochnorm import * from .bss import * from .co_tuning import * from .delta import * from .bi_tuning import * __all__ = ['stochnorm', 'bss', 'co_tuning', 'delta', 'bi_tuning']
26.714286
65
0.679144
from .stochnorm import * from .bss import * from .co_tuning import * from .delta import * from .bi_tuning import * __all__ = ['stochnorm', 'bss', 'co_tuning', 'delta', 'bi_tuning']
true
true
f73cbc9c60f9e8a9868301eef42e3e0f1610c845
980
py
Python
python/microphone.py
Coolstuff14/RaspberryPI-ws2812b-audio-reactive
561a5bee9fd688b908d69ab81ef5af3e2cabd9cb
[ "MIT" ]
1
2021-01-07T02:03:16.000Z
2021-01-07T02:03:16.000Z
python/microphone.py
Coolstuff14/RaspberryPI-ws2812b-audio-reactive
561a5bee9fd688b908d69ab81ef5af3e2cabd9cb
[ "MIT" ]
null
null
null
python/microphone.py
Coolstuff14/RaspberryPI-ws2812b-audio-reactive
561a5bee9fd688b908d69ab81ef5af3e2cabd9cb
[ "MIT" ]
null
null
null
import time import numpy as np import pyaudio import config import sys def start_stream(callback): p = pyaudio.PyAudio() frames_per_buffer = int(config.MIC_RATE / config.FPS) stream = p.open(format=pyaudio.paInt16, channels=1, rate=config.MIC_RATE, ...
26.486486
79
0.55102
import time import numpy as np import pyaudio import config import sys def start_stream(callback): p = pyaudio.PyAudio() frames_per_buffer = int(config.MIC_RATE / config.FPS) stream = p.open(format=pyaudio.paInt16, channels=1, rate=config.MIC_RATE, ...
true
true
f73cbf2bab99a7328feb35771cde3ea1764c3913
60
py
Python
DIRE/neural_model/model/encoder.py
lukedram/DIRE
f2149bad5d655938bb682fddd33e6cd652f0bf4a
[ "MIT" ]
43
2019-11-20T18:19:05.000Z
2022-03-30T11:56:33.000Z
DIRE/neural_model/model/encoder.py
lukedram/DIRE
f2149bad5d655938bb682fddd33e6cd652f0bf4a
[ "MIT" ]
8
2020-05-07T01:34:02.000Z
2021-04-15T14:06:14.000Z
DIRE/neural_model/model/encoder.py
lukedram/DIRE
f2149bad5d655938bb682fddd33e6cd652f0bf4a
[ "MIT" ]
15
2019-11-19T14:15:36.000Z
2021-06-04T17:54:54.000Z
import torch.nn as nn class Encoder(nn.Module): pass
8.571429
25
0.683333
import torch.nn as nn class Encoder(nn.Module): pass
true
true
f73cbf51f9b21d8b224cf99c1bb40bb26089e615
610
py
Python
d1.py
jbruns/advent-of-code-2018
f15f469e338e7c9a7da4c3490746af91a6871637
[ "MIT" ]
null
null
null
d1.py
jbruns/advent-of-code-2018
f15f469e338e7c9a7da4c3490746af91a6871637
[ "MIT" ]
null
null
null
d1.py
jbruns/advent-of-code-2018
f15f469e338e7c9a7da4c3490746af91a6871637
[ "MIT" ]
null
null
null
import itertools, sys, time frequencies = [int(x) for x in sys.stdin] print(sum(frequencies)) startTime = time.time() # initialize frequency counter int at zero and occurrences set at zero f = 0 o = {0: 1} for i in itertools.cycle(frequencies): # maintain the frequency count as we loop f += i # add this f...
32.105263
82
0.663934
import itertools, sys, time frequencies = [int(x) for x in sys.stdin] print(sum(frequencies)) startTime = time.time() f = 0 o = {0: 1} for i in itertools.cycle(frequencies): f += i result = o[f] = o.setdefault(f, 0) + 1 if result == 2: print(f) print("%s seconds" % (time.ti...
true
true
f73cbf7ba96aea8aafa0a276cba70a6c852db5b3
4,042
py
Python
google/ads/google_ads/v1/proto/common/feed_common_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/common/feed_common_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/common/feed_common_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/common/feed_common.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
43.462366
677
0.781049
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db =...
true
true
f73cbfc71b037b76a31f00e51e456e1555ab18b4
1,378
py
Python
ltf/generate_samples.py
KT12/Training
ac4de382a1387ccfe51404eb3302cc518762a781
[ "MIT" ]
1
2017-08-17T04:44:53.000Z
2017-08-17T04:44:53.000Z
ltf/generate_samples.py
KT12/training
ac4de382a1387ccfe51404eb3302cc518762a781
[ "MIT" ]
null
null
null
ltf/generate_samples.py
KT12/training
ac4de382a1387ccfe51404eb3302cc518762a781
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np from functions import * n_features = 2 n_clusters = 3 n_samples_per_cluster = 500 seed = 700 embiggen_factor = 70 np.random.seed() data_centroids, samples = create_samples(n_clusters, n_samples_per_cluster, n_features, embiggen_factor, seed) initial_centroids = choose_...
36.263158
88
0.761974
import tensorflow as tf import numpy as np from functions import * n_features = 2 n_clusters = 3 n_samples_per_cluster = 500 seed = 700 embiggen_factor = 70 np.random.seed() data_centroids, samples = create_samples(n_clusters, n_samples_per_cluster, n_features, embiggen_factor, seed) initial_centroids = choose_...
true
true
f73cbff97795e0691af8ab3a7ccb4cfc17d7868c
1,074
py
Python
setup.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
5
2018-01-15T08:18:12.000Z
2021-05-27T02:53:28.000Z
setup.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
1
2019-02-20T09:26:22.000Z
2019-04-02T01:00:21.000Z
setup.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
2
2017-04-05T04:04:27.000Z
2018-01-22T14:22:22.000Z
#!/usr/bin/env python from setuptools import setup try: from pypandoc import convert_file read_me = lambda f: convert_file(f, 'rst') except ImportError: print('pypandoc is not installed.') read_me = lambda f: open(f, 'r').read() setup(name='echonetlite', version='0.1.0', description='Echo...
32.545455
74
0.612663
from setuptools import setup try: from pypandoc import convert_file read_me = lambda f: convert_file(f, 'rst') except ImportError: print('pypandoc is not installed.') read_me = lambda f: open(f, 'r').read() setup(name='echonetlite', version='0.1.0', description='Echonet Lite', long...
true
true
f73cc125b672ed61f967b8ca253b3d35daa76596
91
py
Python
ex110.py
jgabriel1607/Python
d6b75519eb8f0d4fef944e1690ba8914d81a5d16
[ "MIT" ]
null
null
null
ex110.py
jgabriel1607/Python
d6b75519eb8f0d4fef944e1690ba8914d81a5d16
[ "MIT" ]
null
null
null
ex110.py
jgabriel1607/Python
d6b75519eb8f0d4fef944e1690ba8914d81a5d16
[ "MIT" ]
null
null
null
from modulos import moeda p = float(input('Digite o preço: R$ ')) moeda.resumo(p, 80, 35)
18.2
39
0.681319
from modulos import moeda p = float(input('Digite o preço: R$ ')) moeda.resumo(p, 80, 35)
true
true
f73cc1e1f027b6872ae33d68f3c4888d5df09ea0
484
py
Python
height_map/timeit.py
jaluebbe/HeightMap
1463f9ef16f4b12aec7164250c57c7b494b1d813
[ "MIT" ]
5
2019-09-01T12:09:58.000Z
2019-11-24T02:06:29.000Z
height_map/timeit.py
jaluebbe/HeightMap
1463f9ef16f4b12aec7164250c57c7b494b1d813
[ "MIT" ]
1
2019-09-06T17:34:53.000Z
2019-09-06T17:34:53.000Z
height_map/timeit.py
jaluebbe/HeightMap
1463f9ef16f4b12aec7164250c57c7b494b1d813
[ "MIT" ]
1
2019-09-01T12:10:39.000Z
2019-09-01T12:10:39.000Z
import time import logging logger = logging.getLogger(__name__) def timeit(method): def timed(*args, **kw): ts = time.time() result = method(*args, **kw) te = time.time() if 'log_time' in kw: name = kw.get('log_name', method.__name__.upper()) kw['log_time']...
25.473684
79
0.543388
import time import logging logger = logging.getLogger(__name__) def timeit(method): def timed(*args, **kw): ts = time.time() result = method(*args, **kw) te = time.time() if 'log_time' in kw: name = kw.get('log_name', method.__name__.upper()) kw['log_time']...
true
true
f73cc419f9ae211dad2586ffe7ed7cd04c7a144d
1,096
py
Python
src/mds/core/models/queue.py
m-socha/sana.mds
4d3b71b7ba939c91570fee4f60444cf07035bd51
[ "BSD-3-Clause" ]
2
2016-05-19T02:32:13.000Z
2017-09-06T07:06:25.000Z
src/mds/core/models/queue.py
m-socha/sana.mds
4d3b71b7ba939c91570fee4f60444cf07035bd51
[ "BSD-3-Clause" ]
6
2015-07-19T17:40:49.000Z
2016-12-20T21:54:59.000Z
src/mds/core/models/queue.py
m-socha/sana.mds
4d3b71b7ba939c91570fee4f60444cf07035bd51
[ "BSD-3-Clause" ]
14
2015-10-30T09:50:21.000Z
2019-06-15T13:07:37.000Z
''' Created on Aug 9, 2012 :author: Sana Development Team :version: 2.0 ''' from django.db import models from mds.api.utils import make_uuid QUEUE_STATUS=((0,'Failed Dispatch')) class EncounterQueueElement(models.Model): """ An element that is being processed """ class Meta: app_label = "core" ...
26.731707
90
0.663321
from django.db import models from mds.api.utils import make_uuid QUEUE_STATUS=((0,'Failed Dispatch')) class EncounterQueueElement(models.Model): class Meta: app_label = "core" uuid = models.SlugField(max_length=36, unique=True, default=make_uuid, editable=False) created = models.DateTimeFiel...
true
true
f73cc4568792220ea1ba39341b8438e4e5008863
4,780
py
Python
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_pointpillars_kitti_12000_100_10.8G_1.3/code/train/second/pytorch/builder/optimizer_builder.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
1
2020-12-18T14:49:19.000Z
2020-12-18T14:49:19.000Z
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_pointpillars_kitti_12000_100_10.8G_1.3/code/train/second/pytorch/builder/optimizer_builder.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_pointpillars_kitti_12000_100_10.8G_1.3/code/train/second/pytorch/builder/optimizer_builder.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
# This code is based on: https://github.com/nutonomy/second.pytorch.git # # MIT License # Copyright (c) 2018 # 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 ...
39.833333
80
0.719247
from torchplus.train import learning_schedules import torch def build(optimizer_config, params, name=None): optimizer_type = optimizer_config.WhichOneof('optimizer') optimizer = None if optimizer_type == 'rms_prop_optimizer': config = optimizer_config.rms_prop_...
true
true
f73cc48814ec43a2ac07ab4955c2b43a42d0df9b
551
py
Python
app/WordList_Reader/application/routes.py
RobLewisQA/BChain_Project
7bdf682ea1e23359f2958620ad0afb417892ba1e
[ "MIT" ]
null
null
null
app/WordList_Reader/application/routes.py
RobLewisQA/BChain_Project
7bdf682ea1e23359f2958620ad0afb417892ba1e
[ "MIT" ]
null
null
null
app/WordList_Reader/application/routes.py
RobLewisQA/BChain_Project
7bdf682ea1e23359f2958620ad0afb417892ba1e
[ "MIT" ]
1
2021-04-18T14:09:27.000Z
2021-04-18T14:09:27.000Z
import random import application.BChain_WordList as bwords import pandas as pd from flask import Flask, redirect, request, url_for,render_template, Response, jsonify from application import app @app.route('/mnemonic_generator', methods=['GET']) def mnemonic_generator(): seedphrase_words = [] while len(seedph...
39.357143
94
0.760436
import random import application.BChain_WordList as bwords import pandas as pd from flask import Flask, redirect, request, url_for,render_template, Response, jsonify from application import app @app.route('/mnemonic_generator', methods=['GET']) def mnemonic_generator(): seedphrase_words = [] while len(seedph...
true
true
f73cc914f05895d0ee7fe04577dfa97c7053eeaa
51
py
Python
Topsis_Sakshi_101917011/__init__.py
sakshi0309-champ/Topsis_Sakshi_101917011
962273a7ea7c14e041c0e674018b7ab4045e6ddd
[ "MIT" ]
1
2022-03-10T05:14:59.000Z
2022-03-10T05:14:59.000Z
Topsis_Sakshi_101917011/__init__.py
sakshi0309-champ/Topsis_Sakshi_101917011
962273a7ea7c14e041c0e674018b7ab4045e6ddd
[ "MIT" ]
null
null
null
Topsis_Sakshi_101917011/__init__.py
sakshi0309-champ/Topsis_Sakshi_101917011
962273a7ea7c14e041c0e674018b7ab4045e6ddd
[ "MIT" ]
1
2022-02-27T07:00:23.000Z
2022-02-27T07:00:23.000Z
from Topsis_Sakshi_101917011.topsis import MyTopsis
51
51
0.921569
from Topsis_Sakshi_101917011.topsis import MyTopsis
true
true
f73cc9f1cb16d8f75ed889d9bad26e5df8797488
1,244
py
Python
soluciones/pizza/main.py
carlosviveros/Soluciones
115f4fa929c7854ca497e4c994352adc64565456
[ "MIT" ]
1
2022-02-02T04:44:56.000Z
2022-02-02T04:44:56.000Z
soluciones/pizza/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
null
null
null
soluciones/pizza/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
null
null
null
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython """ from prototools import int_input, menu_input, banner, text_align ADICIONAL = 1.5 IVA = 0.12 PRECIOS = {"pequeña": 6.5, "mediana": 12.35, "familiar": 22.5} iva = lambda precio: precio * IVA precio_con_iva = lambda precio, iva: precio + iva precio_sin_iv...
27.043478
66
0.573955
from prototools import int_input, menu_input, banner, text_align ADICIONAL = 1.5 IVA = 0.12 PRECIOS = {"pequeña": 6.5, "mediana": 12.35, "familiar": 22.5} iva = lambda precio: precio * IVA precio_con_iva = lambda precio, iva: precio + iva precio_sin_iva = lambda t, c, i: PRECIOS[t] * c + (ADICIONAL * i) def datos()...
true
true
f73ccafc72dc2428a82fc32eec25b5c429189627
1,614
py
Python
lane_finder.py
desihsu/lane-finder
f40249c52909d5e235bee40b116965cf0641f871
[ "MIT" ]
null
null
null
lane_finder.py
desihsu/lane-finder
f40249c52909d5e235bee40b116965cf0641f871
[ "MIT" ]
null
null
null
lane_finder.py
desihsu/lane-finder
f40249c52909d5e235bee40b116965cf0641f871
[ "MIT" ]
null
null
null
import sys from moviepy.editor import VideoFileClip import camera import image_thresholding import line_fitting import matplotlib.image as mpimg class Line(): def __init__(self): self.detected = False # lane line detected in previous iteration self.fit = None # most recent polynomial fit ...
32.938776
79
0.651797
import sys from moviepy.editor import VideoFileClip import camera import image_thresholding import line_fitting import matplotlib.image as mpimg class Line(): def __init__(self): self.detected = False self.fit = None self.fitx = None def process_image(img): color_grad_combined ...
true
true
f73ccb497ae212f31e28d3785d2f420d1dedc5b5
8,058
py
Python
03_Scripts/plot.py
willijm92/fsri-compartments-2018
8fd5ddd6f535d434df69e5853aa27db77d599ef3
[ "MIT" ]
null
null
null
03_Scripts/plot.py
willijm92/fsri-compartments-2018
8fd5ddd6f535d434df69e5853aa27db77d599ef3
[ "MIT" ]
null
null
null
03_Scripts/plot.py
willijm92/fsri-compartments-2018
8fd5ddd6f535d434df69e5853aa27db77d599ef3
[ "MIT" ]
null
null
null
# plot.py # --------------- # # Import Packages # # --------------- # import os import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Set seaborn as default plot config sns.set() sns.set_style("whitegrid") from itertools import cycle # ---------------------------------- # # Define Subdirectories...
40.903553
147
0.618888
import os import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() sns.set_style("whitegrid") from itertools import cycle data_dir = '../01_Data/' info_dir = '../02_Info/' plot_dir = '../04_Charts/' if not os.path.exists(plot_dir): os.makedirs(plot_dir) full_channel_list = pd.read_csv(...
true
true
f73ccbef33027dd535f704695801ed382dc28bc0
451
py
Python
core/facade.py
tiagocordeiro/woodash
181323a24270da50da61bb4deb6610a79c13a08e
[ "MIT" ]
null
null
null
core/facade.py
tiagocordeiro/woodash
181323a24270da50da61bb4deb6610a79c13a08e
[ "MIT" ]
4
2021-03-30T13:49:40.000Z
2021-09-22T19:20:34.000Z
core/facade.py
tiagocordeiro/woodash
181323a24270da50da61bb4deb6610a79c13a08e
[ "MIT" ]
null
null
null
from decouple import config from wordpress import API # Configurações do WooCommerce consumer_key = config("WC_CK", False) consumer_secret = config("WC_CS", False) woo_commerce_url = config("WC_URL", False) wpapi = API( url=woo_commerce_url, api="wp-json", version='wc/v3', consumer_key=consumer_key, ...
20.5
42
0.716186
from decouple import config from wordpress import API consumer_key = config("WC_CK", False) consumer_secret = config("WC_CS", False) woo_commerce_url = config("WC_URL", False) wpapi = API( url=woo_commerce_url, api="wp-json", version='wc/v3', consumer_key=consumer_key, consumer_secret=consumer_se...
true
true
f73ccc04714308cfa1fd22cc495a754df509da4a
1,857
py
Python
litex_boards/platforms/de1soc.py
mhrtmnn/litex-boards
e950a4a588515c69c0eb559f432fa41d35f5eb0c
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/de1soc.py
mhrtmnn/litex-boards
e950a4a588515c69c0eb559f432fa41d35f5eb0c
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/de1soc.py
mhrtmnn/litex-boards
e950a4a588515c69c0eb559f432fa41d35f5eb0c
[ "BSD-2-Clause" ]
null
null
null
# # This file is part of LiteX-Boards. # # Copyright (c) 2019 Antony Pavlov <antonynpavlov@gmail.com> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.altera import AlteraPlatform from litex.build.altera.programmer import USBBlaster # IOs ----------------------------...
33.763636
100
0.545504
from litex.build.generic_platform import * from litex.build.altera import AlteraPlatform from litex.build.altera.programmer import USBBlaster _io = [ ("clk50", 0, Pins("AF14"), IOStandard("3.3-V LVTTL")), ("serial", 0, Subsignal("tx", Pins("AC18"), IOStandard("3.3-V LVTTL")), Subsigna...
true
true
f73cce2c7368adf702192de2606836bdc48971e9
30,035
py
Python
test/test_grammars.py
onchiptech/pyjsgf
f7ff26323e5e602ea10e7d302610c2fcb46234d6
[ "MIT" ]
40
2018-01-24T23:01:27.000Z
2022-01-19T03:33:37.000Z
test/test_grammars.py
onchiptech/pyjsgf
f7ff26323e5e602ea10e7d302610c2fcb46234d6
[ "MIT" ]
31
2018-03-01T07:58:27.000Z
2022-01-13T12:07:45.000Z
test/test_grammars.py
onchiptech/pyjsgf
f7ff26323e5e602ea10e7d302610c2fcb46234d6
[ "MIT" ]
21
2017-11-14T09:11:17.000Z
2022-02-02T15:32:57.000Z
# This Python file uses the following encoding: utf-8 # The above line is required for the MultiLingualTests class import copy import tempfile import unittest from jsgf import * from jsgf.ext import Dictation class BasicGrammarCase(unittest.TestCase): def setUp(self): rule2 = PrivateRule("greetWord", Al...
40.587838
85
0.599234
import copy import tempfile import unittest from jsgf import * from jsgf.ext import Dictation class BasicGrammarCase(unittest.TestCase): def setUp(self): rule2 = PrivateRule("greetWord", AlternativeSet("hello", "hi")) rule3 = PrivateRule("name", AlternativeSet( "peter", "john", "ma...
true
true
f73cce886e638b0f21ae25cb7c875f88686c252e
605
py
Python
resources/customJSONEncoder.py
aurelienlegrand/docker_nginx
5b7d064fd1174fff5198f49dd21657af59787c1d
[ "MIT" ]
1
2016-09-24T21:53:47.000Z
2016-09-24T21:53:47.000Z
resources/customJSONEncoder.py
aurelienlegrand/docker_nginx
5b7d064fd1174fff5198f49dd21657af59787c1d
[ "MIT" ]
4
2016-10-08T17:54:22.000Z
2016-10-24T20:42:06.000Z
resources/customJSONEncoder.py
aurelienlegrand/docker_nginx
5b7d064fd1174fff5198f49dd21657af59787c1d
[ "MIT" ]
null
null
null
from flask.json import JSONEncoder from node import Node from application import Application class CustomJSONEncoder(JSONEncoder): def default(self, obj): if isinstance(obj, Node): return { 'node_id' : obj.node_id, 'image' : obj.image, 'ip_addr' :...
27.5
52
0.552066
from flask.json import JSONEncoder from node import Node from application import Application class CustomJSONEncoder(JSONEncoder): def default(self, obj): if isinstance(obj, Node): return { 'node_id' : obj.node_id, 'image' : obj.image, 'ip_addr' :...
false
true
f73ccf43dc25aa7b62c8a9be0f28f353d16014f4
27,178
py
Python
rasa/nlu/selectors/response_selector.py
joeriess/rasa
c1bdfd0934578f515a8bf3ab708c294b809300f8
[ "Apache-2.0" ]
1
2020-09-12T17:27:21.000Z
2020-09-12T17:27:21.000Z
rasa/nlu/selectors/response_selector.py
joeriess/rasa
c1bdfd0934578f515a8bf3ab708c294b809300f8
[ "Apache-2.0" ]
null
null
null
rasa/nlu/selectors/response_selector.py
joeriess/rasa
c1bdfd0934578f515a8bf3ab708c294b809300f8
[ "Apache-2.0" ]
null
null
null
import copy import logging import numpy as np import tensorflow as tf from typing import Any, Dict, Optional, Text, Tuple, Union, List, Type from rasa.shared.nlu.training_data import util import rasa.shared.utils.io from rasa.nlu.config import InvalidConfigError from rasa.shared.nlu.training_data.training_data impor...
36.776725
114
0.650673
import copy import logging import numpy as np import tensorflow as tf from typing import Any, Dict, Optional, Text, Tuple, Union, List, Type from rasa.shared.nlu.training_data import util import rasa.shared.utils.io from rasa.nlu.config import InvalidConfigError from rasa.shared.nlu.training_data.training_data impor...
true
true
f73ccf49bd2bf5c2271598ebb49e9d7cd71ad60d
894
py
Python
ocdskingfisherprocess/maindatabase/migrations/versions/b66e30eb6816_note.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
1
2019-04-11T10:17:32.000Z
2019-04-11T10:17:32.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/b66e30eb6816_note.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
282
2018-12-20T16:49:22.000Z
2022-02-01T00:48:10.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/b66e30eb6816_note.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
7
2019-04-15T13:36:18.000Z
2021-03-02T16:25:41.000Z
"""note Revision ID: b66e30eb6816 Revises: 8add39cb253d Create Date: 2019-02-26 13:09:27.596374 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'b66e30eb6816' down_revision = '8add39cb253d' branch_labels = None depends_on = None def upgrade(): op.create_ta...
27.9375
88
0.582774
import sqlalchemy as sa from alembic import op revision = 'b66e30eb6816' down_revision = '8add39cb253d' branch_labels = None depends_on = None def upgrade(): op.create_table('collection_note', sa.Column('id', sa.Integer, primary_key=True), sa.Column('collection_id', sa.In...
true
true
f73cd0e1fc3d35857bf507391f4ebade7b5b3bd0
1,356
py
Python
util/registry/dockerver.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
1
2021-05-30T01:54:21.000Z
2021-05-30T01:54:21.000Z
util/registry/dockerver.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
20
2019-12-26T17:32:34.000Z
2022-03-21T22:18:06.000Z
util/registry/dockerver.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
1
2020-05-31T16:28:40.000Z
2020-05-31T16:28:40.000Z
import re from semantic_version import Version _USER_AGENT_SEARCH_REGEX = re.compile(r'docker\/([0-9]+(?:\.[0-9]+){1,2})') _EXACT_1_5_USER_AGENT = re.compile(r'^Go 1\.1 package http$') _ONE_FIVE_ZERO = '1.5.0' def docker_version(user_agent_string): """ Extract the Docker version from the user agent, taking special...
38.742857
100
0.722714
import re from semantic_version import Version _USER_AGENT_SEARCH_REGEX = re.compile(r'docker\/([0-9]+(?:\.[0-9]+){1,2})') _EXACT_1_5_USER_AGENT = re.compile(r'^Go 1\.1 package http$') _ONE_FIVE_ZERO = '1.5.0' def docker_version(user_agent_string): found_semver = _USER_AGENT_SEARCH_REGEX.search(user_agent_stri...
true
true
f73cd19dd5c00d5a408287174de39fdf0436a5da
405
py
Python
questionarios/urls.py
bcunhasa/nutriodonto
3ff20377bc85bc4960619f63688b7732e6eebba9
[ "CC0-1.0" ]
null
null
null
questionarios/urls.py
bcunhasa/nutriodonto
3ff20377bc85bc4960619f63688b7732e6eebba9
[ "CC0-1.0" ]
null
null
null
questionarios/urls.py
bcunhasa/nutriodonto
3ff20377bc85bc4960619f63688b7732e6eebba9
[ "CC0-1.0" ]
null
null
null
"""Define os padrões de URL para a aplicação""" from django.conf.urls import url from . import views app_name="questionarios" urlpatterns = [ # Mostra a confirmação do envio do formulário url(r'^confirmacao/$', views.ConfirmacaoView.as_view(), name='confirmacao'), # Questionário para o diretor de escol...
25.3125
80
0.718519
from django.conf.urls import url from . import views app_name="questionarios" urlpatterns = [ url(r'^confirmacao/$', views.ConfirmacaoView.as_view(), name='confirmacao'), url(r'^diretor/$', views.QuestionarioDiretorView.as_view(), name='diretor'), ]
true
true
f73cd309c645f2f8e880f06497b62ff644185a5e
12,003
py
Python
python_modules/libraries/dagstermill/dagstermill/manager.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
1
2021-04-27T19:49:59.000Z
2021-04-27T19:49:59.000Z
python_modules/libraries/dagstermill/dagstermill/manager.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
7
2022-03-16T06:55:04.000Z
2022-03-18T07:03:25.000Z
python_modules/libraries/dagstermill/dagstermill/manager.py
bitdotioinc/dagster
4fe395a37b206b1a48b956fa5dd72bf698104cca
[ "Apache-2.0" ]
null
null
null
import os import pickle import uuid import six from dagster import ( AssetMaterialization, ExpectationResult, Failure, Materialization, ModeDefinition, PipelineDefinition, SolidDefinition, TypeCheck, check, seven, ) from dagster.core.definitions.dependency import SolidHandle fr...
38.348243
158
0.668916
import os import pickle import uuid import six from dagster import ( AssetMaterialization, ExpectationResult, Failure, Materialization, ModeDefinition, PipelineDefinition, SolidDefinition, TypeCheck, check, seven, ) from dagster.core.definitions.dependency import SolidHandle fr...
true
true
f73cd6e62d1bbea7ab19563515d05f154b5d0912
6,004
py
Python
arcade/importers/cos_oem/starlink_oem.py
ProjectPersephone/arcade
a692637312b25347fcf6e3ea0c3ce720b7857a2a
[ "Apache-2.0" ]
22
2021-03-18T12:55:39.000Z
2022-02-09T08:44:02.000Z
arcade/importers/cos_oem/starlink_oem.py
ProjectPersephone/arcade
a692637312b25347fcf6e3ea0c3ce720b7857a2a
[ "Apache-2.0" ]
9
2021-05-13T18:57:24.000Z
2021-10-05T08:14:38.000Z
arcade/importers/cos_oem/starlink_oem.py
ProjectPersephone/arcade
a692637312b25347fcf6e3ea0c3ce720b7857a2a
[ "Apache-2.0" ]
3
2021-10-03T11:38:02.000Z
2021-11-08T10:08:18.000Z
# Copyright 2020 IBM 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, ...
41.986014
78
0.601765
import io import os import logging import zipfile from typing import List, IO, Tuple from datetime import datetime import arcade.models.cos as cos import arcade.models.graph as graph from arcade.importers.cos_oem.cos_oem import (BaseOEMCOSImporter, OEMData, Ep...
true
true
f73cd7659f96363d6da4f7c2bb9631d7abb9b9f3
5,938
py
Python
salt/states/cabal.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
2
2015-08-04T21:54:38.000Z
2019-04-25T21:47:08.000Z
salt/states/cabal.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
1
2015-09-02T12:49:48.000Z
2015-09-02T19:22:58.000Z
salt/states/cabal.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Installation of Cabal Packages ============================== .. versionadded:: 2015.8.0 These states manage the installed packages for Haskell using cabal. Note that cabal-install must be installed for these states to be available, so cabal states should include a requisite to a pkg.insta...
28.965854
78
0.573594
from __future__ import absolute_import from salt.exceptions import CommandExecutionError, CommandNotFoundError import salt.utils def __virtual__(): return (salt.utils.which('cabal') is not None) and \ (salt.utils.which('ghc-pkg') is not None) def _parse_pkg_string(pkg): pkg_name, separator, pkg_v...
true
true