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
1c168222d38f56eb4974eaa09477f3c588451ed8
4,686
py
Python
Java_customization/customjavaaccessbridge.py
rochish-winfo/EBS-Automation-POC
ec21068c48d03134f7ae569830913d8cc63663ad
[ "Apache-2.0" ]
null
null
null
Java_customization/customjavaaccessbridge.py
rochish-winfo/EBS-Automation-POC
ec21068c48d03134f7ae569830913d8cc63663ad
[ "Apache-2.0" ]
null
null
null
Java_customization/customjavaaccessbridge.py
rochish-winfo/EBS-Automation-POC
ec21068c48d03134f7ae569830913d8cc63663ad
[ "Apache-2.0" ]
null
null
null
from pyjab.jabdriver import JABDriver from robot.api.deco import keyword import logging import time import win32api as win32 import win32gui as win32gui import win32con as win32con import time from RPA.Desktop import Desktop APPLICATION = "Oracle Applications - EBSVIS" PATH = "C:\\GitHub\\EBS-Automation-POC\\Driver\\...
32.317241
99
0.694622
from pyjab.jabdriver import JABDriver from robot.api.deco import keyword import logging import time import win32api as win32 import win32gui as win32gui import win32con as win32con import time from RPA.Desktop import Desktop APPLICATION = "Oracle Applications - EBSVIS" PATH = "C:\\GitHub\\EBS-Automation-POC\\Driver\\...
true
true
1c16822b67dcc442cb0bbd6ea89e910c6c1398d0
1,277
py
Python
convertor_in_Python.py
agancsos/python
00f7ca4372ae18f35474a9b899457057511ab71b
[ "MIT" ]
null
null
null
convertor_in_Python.py
agancsos/python
00f7ca4372ae18f35474a9b899457057511ab71b
[ "MIT" ]
null
null
null
convertor_in_Python.py
agancsos/python
00f7ca4372ae18f35474a9b899457057511ab71b
[ "MIT" ]
null
null
null
#!/bin/python import sys def help(): print \"HELP MENU:\"; print \"python converter.py [b||d] [d|b] value\"; exit(); def dec_to_bin(dec): final=\"\"; temp_final=\"\"; while int(dec/2)>=0: if(int(dec%2)>0): temp_final=temp_final+\"1\" else: temp_final=temp_final+\"0\" dec=int(dec/2) ...
22.017241
54
0.584182
import sys def help(): print \"HELP MENU:\"; print \"python converter.py [b||d] [d|b] value\"; exit(); def dec_to_bin(dec): final=\"\"; temp_final=\"\"; while int(dec/2)>=0: if(int(dec%2)>0): temp_final=temp_final+\"1\" else: temp_final=temp_final+\"0\" dec=int(dec/2) if(dec/2==0):...
false
true
1c168521e0ead3840488a6f04b16a568e14b75d4
563
py
Python
user/migrations/0004_auto_20201124_1247.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
user/migrations/0004_auto_20201124_1247.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
user/migrations/0004_auto_20201124_1247.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-24 11:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20201124_1246'), ] operations = [ migrations.AlterField( model_name='user', name='first_name', ...
23.458333
62
0.580817
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20201124_1246'), ] operations = [ migrations.AlterField( model_name='user', name='first_name', field=models.CharField(max_length=128, ...
true
true
1c16855f93a0462af706097c522cc2d8dbd2f5e8
19,051
py
Python
coremltools/converters/mil/backend/mil/load.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/backend/mil/load.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/backend/mil/load.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import logging import numpy as np import os from .passes import mil_passes from coremltools import _...
41.32538
157
0.626214
import logging import numpy as np import os from .passes import mil_passes from coremltools import _SPECIFICATION_VERSION_IOS_15 from coremltools.converters.mil.backend.mil.helper import ( cast_to_framework_io_dtype, create_file_value, create_immediate_value, create_list_scalarvalue, create_scalar...
true
true
1c1685cadc9124150412eb811d9ff47bfba6c403
1,290
py
Python
gmaltapi/admin.py
gmalt/api
c3d35c87564d21f8b7cd061923c155073b467d3d
[ "MIT" ]
null
null
null
gmaltapi/admin.py
gmalt/api
c3d35c87564d21f8b7cd061923c155073b467d3d
[ "MIT" ]
null
null
null
gmaltapi/admin.py
gmalt/api
c3d35c87564d21f8b7cd061923c155073b467d3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # (c) 2017 Jonathan Bouzekri # # This file is part of the gmalt application # # MIT License : # https://raw.githubusercontent.com/gmalt/api/master/LICENSE.txt """ Entry point of the gmaltapi application """ from gevent import monkey monkey.patch_all() # noqa import argparse import os from...
25.8
77
0.691473
from gevent import monkey monkey.patch_all() import argparse import os from .app import App def run_server(*args, **kwargs): parser = argparse.ArgumentParser() parser.add_argument('config', help='configuration file') parser.set_defaults(go=lambda config: App(config).start_server()) args = parser....
true
true
1c16863f75c403b98a5f42b7e3e8422c004ae529
2,633
py
Python
src/compare.py
mgrubisic/Hysteresis
8a27450e3de7a463c43c98ed1c494dc79cb45356
[ "Apache-2.0" ]
8
2021-04-25T01:37:29.000Z
2022-03-09T09:46:52.000Z
src/compare.py
mgrubisic/Hysteresis
8a27450e3de7a463c43c98ed1c494dc79cb45356
[ "Apache-2.0" ]
9
2021-01-25T05:24:04.000Z
2021-11-21T05:21:14.000Z
src/compare.py
mgrubisic/Hysteresis
8a27450e3de7a463c43c98ed1c494dc79cb45356
[ "Apache-2.0" ]
4
2021-04-25T01:37:31.000Z
2022-03-23T06:21:46.000Z
import hysteresis.env as env # from .defaultDataFuncs import defaultSampleFunction, defaultCombineDiff from .resample import resample # ============================================================================= # Compare # ============================================================================= # TODO: consi...
26.33
80
0.617926
import hysteresis.env as env from .resample import resample def compareCycle(Curve1, Curve2, Nsample = 10): sampleFunction = env.environment.fSample if Curve1.Npoints != Curve1.Npoints: raise Exception("Curves don't have a similar number of points.") xy1 = Curve1.xy xy2 = Curv...
true
true
1c16869dfe6c919c41d7f463108d6fc5fadba680
755
py
Python
libsaas/services/github/hooks.py
80vs90/libsaas
1ae47aa8bea5b42f70e8e8bffb7436d92f89bd55
[ "MIT" ]
155
2015-01-27T15:17:59.000Z
2022-02-20T00:14:08.000Z
libsaas/services/github/hooks.py
80vs90/libsaas
1ae47aa8bea5b42f70e8e8bffb7436d92f89bd55
[ "MIT" ]
14
2015-01-12T08:22:37.000Z
2021-06-16T19:49:31.000Z
libsaas/services/github/hooks.py
80vs90/libsaas
1ae47aa8bea5b42f70e8e8bffb7436d92f89bd55
[ "MIT" ]
43
2015-01-28T22:41:45.000Z
2021-09-21T04:44:26.000Z
from libsaas import http, parsers from libsaas.services import base from . import resource class RepoHooksBase(resource.GitHubResource): path = 'hooks' class RepoHook(RepoHooksBase): @base.apimethod def test(self): """ Trigger the hook with the latest push to the repository. "...
19.868421
64
0.611921
from libsaas import http, parsers from libsaas.services import base from . import resource class RepoHooksBase(resource.GitHubResource): path = 'hooks' class RepoHook(RepoHooksBase): @base.apimethod def test(self): url = '{0}/tests'.format(self.get_url()) request = http.Request('POST'...
true
true
1c1686b6e51a088c9c5fc194f31c5b011a67ecde
8,379
py
Python
debug.py
alexarse/Words
7cc01acaa04c5976e0269d24963142e643cdba1b
[ "MIT" ]
null
null
null
debug.py
alexarse/Words
7cc01acaa04c5976e0269d24963142e643cdba1b
[ "MIT" ]
4
2018-05-02T14:50:02.000Z
2018-05-02T14:50:23.000Z
debug.py
alxarsenault/Words
7cc01acaa04c5976e0269d24963142e643cdba1b
[ "MIT" ]
1
2017-04-20T19:38:38.000Z
2017-04-20T19:38:38.000Z
import wx import wx.stc as stc class MyOutput1(stc.StyledTextCtrl): def __init__(self, parent, pos, size ): super( MyOutput1, self ).__init__( parent, pos=pos, size=size, style=wx.TE_MULTILINE ) self.StyleSetSpec( stc.STC_STYLE_DEFAULT, "size:10,face:DejaVu Sans Mono,fore:#EEEEEE,back:#181818" ); ...
44.1
110
0.627163
import wx import wx.stc as stc class MyOutput1(stc.StyledTextCtrl): def __init__(self, parent, pos, size ): super( MyOutput1, self ).__init__( parent, pos=pos, size=size, style=wx.TE_MULTILINE ) self.StyleSetSpec( stc.STC_STYLE_DEFAULT, "size:10,face:DejaVu Sans Mono,fore:#EEEEEE,back:#181818" ); ...
true
true
1c1686bb6df27a23256a505d14d65373120ec5ae
837
py
Python
setup.py
cuenca-mx/quienesquien-client
bc6bfd3c4e080960489df70050f1989782dae6c1
[ "MIT" ]
2
2019-07-04T22:24:07.000Z
2022-01-12T17:56:34.000Z
setup.py
cuenca-mx/quienesquien-client
bc6bfd3c4e080960489df70050f1989782dae6c1
[ "MIT" ]
2
2021-03-31T19:12:43.000Z
2021-12-13T19:57:35.000Z
setup.py
cuenca-mx/quienesquien-client
bc6bfd3c4e080960489df70050f1989782dae6c1
[ "MIT" ]
null
null
null
import setuptools requirements = [ 'requests' ] with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name='quienesquien', version='0.0.2', author='Cuenca', author_email='dev@cuenca.com', description='Cliente para listas quienesquien', long_description=long_...
23.914286
59
0.620072
import setuptools requirements = [ 'requests' ] with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name='quienesquien', version='0.0.2', author='Cuenca', author_email='dev@cuenca.com', description='Cliente para listas quienesquien', long_description=long_...
true
true
1c16873c608e65a85f1e17ef95c5300b41bd0762
650
py
Python
records/06-28/test.py
AaronYang2333/CSCI_570
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
36
2020-07-25T00:13:25.000Z
2022-02-28T17:48:15.000Z
records/06-28/test.py
AaronYang2333/LeetCode
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
6
2020-06-06T04:39:37.000Z
2021-04-03T01:45:39.000Z
records/06-28/test.py
AaronYang2333/LeetCode
03e34ce5ff192fc94612bc3afb51dcab3e854462
[ "Apache-2.0" ]
16
2020-12-16T02:38:16.000Z
2022-02-28T17:48:16.000Z
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '6/28/2020 5:58 PM' if __name__ == '__main__': info = [(0, 0), (1, 1500), (4, 3000), (3, 2000), (1, 2000)] # print(info[:, 1]) a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] print(list(zip(*a))) # [(1, 4, 7), (2, 5, 8), (3, 6, 9)] # def diffe...
27.083333
74
0.5
__author__ = 'Aaron Yang' __email__ = 'byang971@usc.edu' __date__ = '6/28/2020 5:58 PM' if __name__ == '__main__': info = [(0, 0), (1, 1500), (4, 3000), (3, 2000), (1, 2000)] a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] print(list(zip(*a))) ss = [item for item in a if len(item) != 2] print(ss)
true
true
1c16875063db990b64b12b4570c0c91d3b7c45ce
2,735
py
Python
tests/test_calculator.py
MaartenUijen/pp_fibonacci_mpu
d84a265837f9eb205ace387d3f8075f15131b478
[ "MIT" ]
null
null
null
tests/test_calculator.py
MaartenUijen/pp_fibonacci_mpu
d84a265837f9eb205ace387d3f8075f15131b478
[ "MIT" ]
null
null
null
tests/test_calculator.py
MaartenUijen/pp_fibonacci_mpu
d84a265837f9eb205ace387d3f8075f15131b478
[ "MIT" ]
null
null
null
import pytest from pp_fibonacci_mpu.pp_fibonacci_mpu.fibonacci_iteration import FibonacciIteration from pp_fibonacci_mpu.pp_fibonacci_mpu.fibonacci_service import FibonacciService @pytest.mark.parametrize('fibonacci_class', [FibonacciIteration, FibonacciService]) @pytest.mark.parametrize('test_input, expected', [(0,...
52.596154
94
0.549543
import pytest from pp_fibonacci_mpu.pp_fibonacci_mpu.fibonacci_iteration import FibonacciIteration from pp_fibonacci_mpu.pp_fibonacci_mpu.fibonacci_service import FibonacciService @pytest.mark.parametrize('fibonacci_class', [FibonacciIteration, FibonacciService]) @pytest.mark.parametrize('test_input, expected', [(0,...
true
true
1c1687de319bc2a7e8c8636aadcd9e5f70159b07
11,056
py
Python
homeassistant/components/media_player/demo.py
entatix/home-assistant
0f8d599c829a49c8e35d5d6dc08588810fe1fbe8
[ "MIT" ]
13
2017-02-01T13:25:34.000Z
2022-01-26T01:30:39.000Z
homeassistant/components/media_player/demo.py
oandrew/home-assistant
03e0c7c71cbc912d15543c417223c935b14a74d1
[ "MIT" ]
9
2017-07-26T18:05:32.000Z
2021-12-05T14:16:34.000Z
homeassistant/components/media_player/demo.py
oandrew/home-assistant
03e0c7c71cbc912d15543c417223c935b14a74d1
[ "MIT" ]
21
2017-07-26T17:09:40.000Z
2022-03-27T22:37:22.000Z
""" Demo implementation of the media player. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.media_player import ( MEDIA_TYPE_MUSIC, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPO...
30.796657
79
0.636397
from homeassistant.components.media_player import ( MEDIA_TYPE_MUSIC, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK, SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET, SUPPORT_SELECT_SOURCE, SUPPORT_CLEAR_PLAYL...
true
true
1c168862c466c35cb2e72b30c507671339185be8
3,871
py
Python
scratch/regression/mass_range_13.4/train_20sims_random_200k_alpha-2.5_drop.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
2
2021-07-26T10:56:33.000Z
2021-12-20T17:30:53.000Z
scratch/regression/mass_range_13.4/train_20sims_random_200k_alpha-2.5_drop.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
1
2021-11-25T21:01:19.000Z
2021-12-05T01:40:53.000Z
scratch/regression/mass_range_13.4/train_20sims_random_200k_alpha-2.5_drop.py
finn-dodgson/DeepHalos
86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c
[ "MIT" ]
1
2021-11-27T02:35:10.000Z
2021-11-27T02:35:10.000Z
from dlhalos_code import CNN from dlhalos_code import custom_regularizers as reg import dlhalos_code.data_processing as tn from pickle import load import numpy as np import tensorflow as tf import random as python_random if __name__ == "__main__": ########### CREATE GENERATORS FOR TRAINING AND VALIDATION ######### ...
50.272727
115
0.616895
from dlhalos_code import CNN from dlhalos_code import custom_regularizers as reg import dlhalos_code.data_processing as tn from pickle import load import numpy as np import tensorflow as tf import random as python_random if __name__ == "__main__": saving_path = "/mnt/beegfs/work/ati/pearl037/regression/mass_ran...
true
true
1c1688e95763d7597446a94446aa1f820c75546e
893
py
Python
utilities.py
iceandclimate/loggerGUI-D20
0f6c3ee457442deffc05fa34505c1b41b419b546
[ "MIT" ]
null
null
null
utilities.py
iceandclimate/loggerGUI-D20
0f6c3ee457442deffc05fa34505c1b41b419b546
[ "MIT" ]
null
null
null
utilities.py
iceandclimate/loggerGUI-D20
0f6c3ee457442deffc05fa34505c1b41b419b546
[ "MIT" ]
null
null
null
import sys import glob import serial def enumerate_serial(): """Lists serial ports :raises EnvironmentError: On unsupported or unknown platforms :returns: A list of available serial ports """ if sys.platform.startswith('win'): ports = ['COM' + str(i + 1) for i in range(256...
24.805556
79
0.597984
import sys import glob import serial def enumerate_serial(): if sys.platform.startswith('win'): ports = ['COM' + str(i + 1) for i in range(256)] elif sys.platform.startswith('linux') or sys.platform.startswith('cygwin'): ports = glob.glob('/dev/tty[A-Za-z]*') elif sys.platform.st...
true
true
1c168a670fdbb81111152b502b940072610cc791
1,297
py
Python
baton/admin.py
HomesteadCabinet/django-baton
1ac10178a7b95e54e405e04455a1ea3c6d1a06f9
[ "MIT" ]
620
2017-02-11T09:28:11.000Z
2022-03-28T18:51:14.000Z
baton/admin.py
HomesteadCabinet/django-baton
1ac10178a7b95e54e405e04455a1ea3c6d1a06f9
[ "MIT" ]
202
2018-01-08T16:06:14.000Z
2022-03-22T11:15:14.000Z
baton/admin.py
HomesteadCabinet/django-baton
1ac10178a7b95e54e405e04455a1ea3c6d1a06f9
[ "MIT" ]
81
2017-02-13T11:46:31.000Z
2022-03-28T17:13:19.000Z
from django.contrib import admin from django.contrib.admin.filters import ( SimpleListFilter, AllValuesFieldListFilter, ChoicesFieldListFilter, RelatedFieldListFilter, RelatedOnlyFieldListFilter ) class InputFilter(admin.SimpleListFilter): template = 'baton/filters/input_filter.html' def ...
27.595745
71
0.722436
from django.contrib import admin from django.contrib.admin.filters import ( SimpleListFilter, AllValuesFieldListFilter, ChoicesFieldListFilter, RelatedFieldListFilter, RelatedOnlyFieldListFilter ) class InputFilter(admin.SimpleListFilter): template = 'baton/filters/input_filter.html' def ...
true
true
1c168b18c19c768952bbf3adc24823b7d16fa680
1,319
py
Python
network_utils.py
McIntireEvan/raspi-connect
a7d475c62a9ef5ca3931135be012c75f9f76b874
[ "MIT" ]
1
2017-06-07T03:44:32.000Z
2017-06-07T03:44:32.000Z
network_utils.py
McIntireEvan/raspi-connect
a7d475c62a9ef5ca3931135be012c75f9f76b874
[ "MIT" ]
null
null
null
network_utils.py
McIntireEvan/raspi-connect
a7d475c62a9ef5ca3931135be012c75f9f76b874
[ "MIT" ]
null
null
null
import subprocess import socket import re interface = "wlp5s0" # Returns a list of all availible networks def get_networks(): # Get all the local networks through a bash command p1 = subprocess.Popen(["sudo", "iwlist", interface,"scan"], stdout=subprocess.PIPE) p2 = subprocess.check_output(["grep", "ESSID...
31.404762
87
0.605004
import subprocess import socket import re interface = "wlp5s0" def get_networks(): p1 = subprocess.Popen(["sudo", "iwlist", interface,"scan"], stdout=subprocess.PIPE) p2 = subprocess.check_output(["grep", "ESSID"], stdin=p1.stdout) raw_names = p2.decode("utf-8") .split('\n') for i in range(0,...
true
true
1c168b922139888c1da40a23197994b57c2f25f3
1,403
py
Python
simple.py
tsumugu/wordcloud-webapi
77e6eacd3d48d0058548f16aedba4954e4419028
[ "MIT" ]
null
null
null
simple.py
tsumugu/wordcloud-webapi
77e6eacd3d48d0058548f16aedba4954e4419028
[ "MIT" ]
null
null
null
simple.py
tsumugu/wordcloud-webapi
77e6eacd3d48d0058548f16aedba4954e4419028
[ "MIT" ]
null
null
null
import os from os import path from wordcloud import WordCloud from PIL import Image from PIL import ImageFilter import numpy as np import sys import json import uuid d = path.dirname(__file__) if "__file__" in locals() else os.getcwd() # gen text text = "" try: json_dict = json.loads(sys.argv[1]) for k in json_di...
28.06
77
0.596579
import os from os import path from wordcloud import WordCloud from PIL import Image from PIL import ImageFilter import numpy as np import sys import json import uuid d = path.dirname(__file__) if "__file__" in locals() else os.getcwd() text = "" try: json_dict = json.loads(sys.argv[1]) for k in json_dict: tmp...
true
true
1c168dca7daf77d27fc3f8f8648d195726e1c030
89
py
Python
pycache/__init__.py
IISResetMe/pycache
5f56683d38a93d56695b5a3d514a2cfed5c55035
[ "MIT" ]
null
null
null
pycache/__init__.py
IISResetMe/pycache
5f56683d38a93d56695b5a3d514a2cfed5c55035
[ "MIT" ]
null
null
null
pycache/__init__.py
IISResetMe/pycache
5f56683d38a93d56695b5a3d514a2cfed5c55035
[ "MIT" ]
null
null
null
from .PyObjectCache import pyCache, PyObjectCache __all__ = ['pyCache', 'PyObjectCache']
29.666667
49
0.786517
from .PyObjectCache import pyCache, PyObjectCache __all__ = ['pyCache', 'PyObjectCache']
true
true
1c168e55cf5eb6206539c4d0b1d6f344f013327a
24,589
py
Python
src/sage/geometry/newton_polygon.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
2
2019-06-02T03:16:59.000Z
2019-06-15T10:17:18.000Z
src/sage/geometry/newton_polygon.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
null
null
null
src/sage/geometry/newton_polygon.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
1
2019-06-02T03:16:55.000Z
2019-06-02T03:16:55.000Z
""" Newton Polygons This module implements finite Newton polygons and infinite Newton polygons having a finite number of slopes (and hence a last infinite slope). """ ############################################################################# # Copyright (C) 2013 Xavier Caruso <xavier.caruso@normalesup.org> # # ...
32.482166
159
0.540608
from __future__ import division from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.structure.element import Element from sage.structure.richcmp import op_EQ, op_NE, op_LE, op_GE, op_LT from sage.misc.cachefunc import cached_method from sage.rings....
true
true
1c168fb292e85a1f751b0098ac249e7a08fd9c0f
28,327
py
Python
cogs/gpt2_model_production.py
ztoms/GPT2DiscordBot-Marcello
0f47db74ff75451e1fa0aab46c2edafc80fc96b0
[ "MIT" ]
null
null
null
cogs/gpt2_model_production.py
ztoms/GPT2DiscordBot-Marcello
0f47db74ff75451e1fa0aab46c2edafc80fc96b0
[ "MIT" ]
null
null
null
cogs/gpt2_model_production.py
ztoms/GPT2DiscordBot-Marcello
0f47db74ff75451e1fa0aab46c2edafc80fc96b0
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import gpt_2_simple as gpt2 import random import time import re import logging import os TEST_CHANNEL = 776592860723937301 SECRET_TEST_CHANNEL = 507560608430817290 FES_CHANNEL = 416242332241887244 checkpoint_model = 'run_flat_earth_355M_v2.2' # some fun rejoin messages ...
43.379786
142
0.583789
import discord from discord.ext import commands import gpt_2_simple as gpt2 import random import time import re import logging import os TEST_CHANNEL = 776592860723937301 SECRET_TEST_CHANNEL = 507560608430817290 FES_CHANNEL = 416242332241887244 checkpoint_model = 'run_flat_earth_355M_v2.2' ON_CONNECT_SENTENCES = ['I ...
true
true
1c16908699948258ee1f66d211bb45c209a088cd
32,826
py
Python
t2k/analysis/P0DCutUtils.py
tianluyuan/pyutils
2cd3a90dbbd3d0eec3054fb9493ca0f6e0272e50
[ "MIT" ]
1
2019-02-22T10:57:13.000Z
2019-02-22T10:57:13.000Z
t2k/analysis/P0DCutUtils.py
tianluyuan/pyutils
2cd3a90dbbd3d0eec3054fb9493ca0f6e0272e50
[ "MIT" ]
null
null
null
t2k/analysis/P0DCutUtils.py
tianluyuan/pyutils
2cd3a90dbbd3d0eec3054fb9493ca0f6e0272e50
[ "MIT" ]
null
null
null
import ROOT import time import os import sys import numpy as np from array import array from thirdparty import autovivification from tianlu import rootutils from tianlu.analysis.constants import * __author__ = 'Tianlu Yuan' __email__ = 'tianlu.yuan [at] colorado.edu' ################################################...
33.667692
114
0.621611
import ROOT import time import os import sys import numpy as np from array import array from thirdparty import autovivification from tianlu import rootutils from tianlu.analysis.constants import * __author__ = 'Tianlu Yuan' __email__ = 'tianlu.yuan [at] colorado.edu' tpcCut = 'TPC1Used && FGDCosmic' tpc1fidCut = ('...
false
true
1c1691a62f5e5ff40dfd01e812414f3091c3671b
5,729
py
Python
netbox/ipam/models/vlans.py
JonathonReinhart/netbox
f0588505983b4f188c474c50ff11150a14e469c1
[ "Apache-2.0" ]
1
2021-12-09T13:41:46.000Z
2021-12-09T13:41:46.000Z
netbox/ipam/models/vlans.py
JonathonReinhart/netbox
f0588505983b4f188c474c50ff11150a14e469c1
[ "Apache-2.0" ]
null
null
null
netbox/ipam/models/vlans.py
JonathonReinhart/netbox
f0588505983b4f188c474c50ff11150a14e469c1
[ "Apache-2.0" ]
1
2022-02-07T20:36:31.000Z
2022-02-07T20:36:31.000Z
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.urls import reverse from dcim.m...
29.994764
120
0.628033
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.urls import reverse from dcim.m...
true
true
1c169216c4414ef13556952b8b87e5420b569e0a
1,346
py
Python
cryptodoge/util/service_groups.py
grayfallstown-cryptodoge/cryptodoge
ffeb5218ce184a56073a5dc0ac5acddba3728bd4
[ "Apache-2.0" ]
10
2021-08-21T17:41:51.000Z
2022-02-09T04:28:12.000Z
cryptodoge/util/service_groups.py
grayfallstown-cryptodoge/cryptodoge
ffeb5218ce184a56073a5dc0ac5acddba3728bd4
[ "Apache-2.0" ]
1
2021-12-15T21:23:38.000Z
2021-12-15T21:23:38.000Z
cryptodoge/util/service_groups.py
grayfallstown-cryptodoge/cryptodoge
ffeb5218ce184a56073a5dc0ac5acddba3728bd4
[ "Apache-2.0" ]
2
2021-08-21T18:22:59.000Z
2021-12-10T07:12:18.000Z
from typing import KeysView, Generator SERVICES_FOR_GROUP = { "all": "cryptodoge_harvester cryptodoge_timelord_launcher cryptodoge_timelord cryptodoge_farmer cryptodoge_full_node cryptodoge_wallet".split(), "node": "cryptodoge_full_node".split(), "harvester": "cryptodoge_harvester".split(), "farmer": "...
42.0625
148
0.750371
from typing import KeysView, Generator SERVICES_FOR_GROUP = { "all": "cryptodoge_harvester cryptodoge_timelord_launcher cryptodoge_timelord cryptodoge_farmer cryptodoge_full_node cryptodoge_wallet".split(), "node": "cryptodoge_full_node".split(), "harvester": "cryptodoge_harvester".split(), "farmer": "...
true
true
1c1692d26906b4b367a0beda8733220226b01d2c
1,412
py
Python
beyondtheadmin/clients/migrations/0001_initial.py
gfavre/invoice-manager
2a1db22edd51b461c090282c6fc1f290f3265379
[ "MIT" ]
1
2021-11-27T06:40:34.000Z
2021-11-27T06:40:34.000Z
beyondtheadmin/clients/migrations/0001_initial.py
gfavre/invoice-manager
2a1db22edd51b461c090282c6fc1f290f3265379
[ "MIT" ]
2
2021-05-13T04:50:50.000Z
2022-02-28T21:06:24.000Z
beyondtheadmin/clients/migrations/0001_initial.py
gfavre/invoice-manager
2a1db22edd51b461c090282c6fc1f290f3265379
[ "MIT" ]
null
null
null
# Generated by Django 3.0.11 on 2021-01-20 20:51 import uuid import django.utils.timezone from django.db import migrations, models import django_countries.fields import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.C...
37.157895
147
0.627479
import uuid import django.utils.timezone from django.db import migrations, models import django_countries.fields import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Client', ...
true
true
1c1695e48837389a8f43536a04d880f07c74de6b
2,010
py
Python
startup/gui/localDispatcher.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
561
2016-10-18T04:30:48.000Z
2022-03-30T06:52:04.000Z
startup/gui/localDispatcher.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
1,828
2016-10-14T19:01:46.000Z
2022-03-30T16:07:19.000Z
startup/gui/localDispatcher.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
120
2016-10-18T15:19:13.000Z
2021-12-20T16:28:23.000Z
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
47.857143
107
0.69801
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import Gaffer import GafferDispatch Gaffer.Metadata.registerValue( GafferDispatch.LocalDispatcher, "executeInBackground", "userDefault", True ) GafferDispatch.Dispatcher.setDefaultDispatcherType( "Local" )
true
true
1c1695fbc9480c13bbbbc44ec0a4212f34c9ece8
3,149
py
Python
cms/test_utils/project/pluginapp/plugins/caching/cms_plugins.py
Mario-Kart-Felix/django-cms
6d68439fe7fd59d000f99e27c1f2135a3f9c816a
[ "BSD-3-Clause" ]
1,110
2020-10-08T15:12:08.000Z
2022-03-31T23:08:37.000Z
cms/test_utils/project/pluginapp/plugins/caching/cms_plugins.py
rpep/django-cms
53dddb106f45963f9f8393d434b4313fa3bbdf54
[ "BSD-3-Clause" ]
410
2020-10-08T13:24:53.000Z
2022-03-31T23:18:04.000Z
cms/test_utils/project/pluginapp/plugins/caching/cms_plugins.py
rpep/django-cms
53dddb106f45963f9f8393d434b4313fa3bbdf54
[ "BSD-3-Clause" ]
405
2020-10-08T21:22:30.000Z
2022-03-30T20:58:14.000Z
from datetime import datetime, timedelta from django.utils import timezone from cms.plugin_base import CMSPluginBase class NoCachePlugin(CMSPluginBase): name = 'NoCache' module = 'Test' render_plugin = True cache = False render_template = "plugins/nocache.html" def render(self, context, ins...
28.889908
69
0.680534
from datetime import datetime, timedelta from django.utils import timezone from cms.plugin_base import CMSPluginBase class NoCachePlugin(CMSPluginBase): name = 'NoCache' module = 'Test' render_plugin = True cache = False render_template = "plugins/nocache.html" def render(self, context, ins...
true
true
1c1696717d3b08136b368f680e35640032ccafd7
5,756
py
Python
mmdet/datasets/builder.py
surajkothawade/mmdetection
a148d8a9079c6d88ad6eddee929d577388c8182c
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/builder.py
surajkothawade/mmdetection
a148d8a9079c6d88ad6eddee929d577388c8182c
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/builder.py
surajkothawade/mmdetection
a148d8a9079c6d88ad6eddee929d577388c8182c
[ "Apache-2.0" ]
null
null
null
import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from torch.utils.data import DataLoader from .samplers import DistributedGroupSampler, DistributedSampler, ...
36.66242
102
0.661397
import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from torch.utils.data import DataLoader from .samplers import DistributedGroupSampler, DistributedSampler, ...
true
true
1c16971006da2ed33bf7fcd27f4ce650c2e597a1
7,677
py
Python
GhostScan/Cameras/liveDisplay.py
yyf20001230/GhostScan
5694df4532132be5e916bd72a46dc907eb108bf9
[ "MIT" ]
4
2021-09-27T14:16:08.000Z
2022-03-17T07:03:18.000Z
GhostScan/Cameras/liveDisplay.py
clkimsdu/GhostScan
5694df4532132be5e916bd72a46dc907eb108bf9
[ "MIT" ]
null
null
null
GhostScan/Cameras/liveDisplay.py
clkimsdu/GhostScan
5694df4532132be5e916bd72a46dc907eb108bf9
[ "MIT" ]
2
2022-02-04T17:32:04.000Z
2022-03-31T09:53:20.000Z
import time import threading from queue import Queue import cv2 import numpy as np class imgShow: """ Class that continuously shows a frame using a dedicated thread. """ def __init__(self, displayHeight=1024, displayWidth=768, frame=None): self.frame = frame self.stopped = F...
33.524017
162
0.56298
import time import threading from queue import Queue import cv2 import numpy as np class imgShow: def __init__(self, displayHeight=1024, displayWidth=768, frame=None): self.frame = frame self.stopped = False self.displayHeight = displayHeight self.displayWidth = displayWi...
true
true
1c1697d7aa32671bb126c8e4847019ef29749d7f
2,407
py
Python
web_app/main/routes.py
tdroque/byke_webapp
600373bb9ecb8c324488254eb0f78e89fdffc223
[ "MIT" ]
null
null
null
web_app/main/routes.py
tdroque/byke_webapp
600373bb9ecb8c324488254eb0f78e89fdffc223
[ "MIT" ]
1
2019-10-10T20:03:11.000Z
2019-10-10T20:03:11.000Z
web_app/main/routes.py
tdroque/byke_webapp
600373bb9ecb8c324488254eb0f78e89fdffc223
[ "MIT" ]
null
null
null
# ----------------------------------------------------- # Program: Capstone - byke - web app # File: routes.py - main pages routes # Author: Corey Schafer # (https://www.youtube.com/watch?v=MwZwr5Tvyxo&list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH&index=1) # Modified: Tanner L # Date: 01/10/19 # Desc: main pages fun...
29.716049
115
0.554217
from flask import render_template, request, Blueprint from web_app.models import Byke_trip, Byke_trip_stats from web_app import db from flask_login import current_user main = Blueprint('main', __name__) @main.route("/") @main.route("/home") def home(): return render_template('home.html', title='Home') @main.rou...
true
true
1c16980f11bec3ab5fd6de6f9b85723b9dce7596
1,776
py
Python
beacon/db/biosamples.py
elixir-luxembourg/BH2021-beacon-2.x-omop
d811e7902909f5d38f9a5964ff0ff3335ec0056a
[ "Apache-2.0" ]
null
null
null
beacon/db/biosamples.py
elixir-luxembourg/BH2021-beacon-2.x-omop
d811e7902909f5d38f9a5964ff0ff3335ec0056a
[ "Apache-2.0" ]
null
null
null
beacon/db/biosamples.py
elixir-luxembourg/BH2021-beacon-2.x-omop
d811e7902909f5d38f9a5964ff0ff3335ec0056a
[ "Apache-2.0" ]
null
null
null
from beacon.db import client from beacon.db.filters import * from beacon.db.utils import * from beacon.request.model import RequestParams def get_biosamples(entry_id: str, qparams: RequestParams): query = apply_filters({}, qparams.query.filters) return client.beacon.biosamples\ .find(query)\ ....
33.509434
69
0.696509
from beacon.db import client from beacon.db.filters import * from beacon.db.utils import * from beacon.request.model import RequestParams def get_biosamples(entry_id: str, qparams: RequestParams): query = apply_filters({}, qparams.query.filters) return client.beacon.biosamples\ .find(query)\ ....
true
true
1c16998a06295d7c0535ca130253511195a8754e
220
py
Python
AtCoder/Mujin2018/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
AtCoder/Mujin2018/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
AtCoder/Mujin2018/B.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
A = int(input()) S =input() no_man = False if A == 0: no_man = True for s in S: if s == "+": A += 1 else: A -=1 if A == 0: no_man = True print("Yes" if no_man else "No")
14.666667
33
0.427273
A = int(input()) S =input() no_man = False if A == 0: no_man = True for s in S: if s == "+": A += 1 else: A -=1 if A == 0: no_man = True print("Yes" if no_man else "No")
true
true
1c1699c680fad79fcfc39702b4e71ad07d3f3d6f
3,790
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/packetinmaskslave_8ba122a606aac86ac72959a685bc4107.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/packetinmaskslave_8ba122a606aac86ac72959a685bc4107.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/packetinmaskslave_8ba122a606aac86ac72959a685bc4107.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, ...
41.195652
169
0.677836
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class PacketInMaskSlave(Base): __slots__ = () _SDM_NAME = 'packetInMaskSlave' _SDM_ATT_MAP = { 'Action': 'action', 'InvalidTtl': 'invalidTtl', 'NoMatch': 'noMatch', } def __init_...
true
true
1c169a47ea569b8e0bbb25020213231b88d9cf51
6,489
py
Python
glearn/viewers/discrete_env_viewer.py
glennpow/glearn
e50046cb76173668fec12c20b446be7457482528
[ "MIT" ]
null
null
null
glearn/viewers/discrete_env_viewer.py
glennpow/glearn
e50046cb76173668fec12c20b446be7457482528
[ "MIT" ]
null
null
null
glearn/viewers/discrete_env_viewer.py
glennpow/glearn
e50046cb76173668fec12c20b446be7457482528
[ "MIT" ]
null
null
null
import queue import numpy as np from .advanced_viewer import AdvancedViewer class DiscreteEnvViewer(AdvancedViewer): def __init__(self, config, **kwargs): super().__init__(config, **kwargs) def prepare(self, trainer): super().prepare(trainer) self.trainer.add_fetch("Q_values", self.t...
37.947368
105
0.523501
import queue import numpy as np from .advanced_viewer import AdvancedViewer class DiscreteEnvViewer(AdvancedViewer): def __init__(self, config, **kwargs): super().__init__(config, **kwargs) def prepare(self, trainer): super().prepare(trainer) self.trainer.add_fetch("Q_values", self.t...
true
true
1c169c0f87036e8bcbd7a18dc5007fbaf9167795
7,635
py
Python
algorithm.py
ngctnnnn/Simulation_experiments_for_optimizing_objective_function
910f6be50ea95ce04672a6b91c379e4b05a9565d
[ "MIT" ]
2
2021-11-01T03:32:42.000Z
2021-11-01T14:40:59.000Z
algorithm.py
ngctnnnn/Simulation_experiments_for_optimizing_objective_function
910f6be50ea95ce04672a6b91c379e4b05a9565d
[ "MIT" ]
null
null
null
algorithm.py
ngctnnnn/Simulation_experiments_for_optimizing_objective_function
910f6be50ea95ce04672a6b91c379e4b05a9565d
[ "MIT" ]
1
2022-01-18T13:08:09.000Z
2022-01-18T13:08:09.000Z
import numpy as np def DE(test_function, dimension, bounds, F_scale, cross_prob, popsize, max_evals): """ Differential Evolution algorithm Args: test_function -- function to conduct bound_lower -- lower bound of the test function bound_upper -- upper bound of the test function F_scale -- s...
30.297619
112
0.594237
import numpy as np def DE(test_function, dimension, bounds, F_scale, cross_prob, popsize, max_evals): eps = 0.00001 bound_lower, bound_upper = np.asarray(bounds).T diff = np.fabs(bound_lower - bound_upper) pop = bound_lower + diff * np.random.rand(popsize, dimension) fitness = np.asarray([test_...
true
true
1c169c69cd02008ae81b083ed9989c75d5eeb34b
931
py
Python
ptoolbox/google/constants.py
vperron/picasa-toolbox
57aaa4f014c1b8bcc2e8671615870c147d6f03a6
[ "MIT" ]
null
null
null
ptoolbox/google/constants.py
vperron/picasa-toolbox
57aaa4f014c1b8bcc2e8671615870c147d6f03a6
[ "MIT" ]
null
null
null
ptoolbox/google/constants.py
vperron/picasa-toolbox
57aaa4f014c1b8bcc2e8671615870c147d6f03a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime epoch = datetime.utcfromtimestamp(0) ACCESS_PRIVATE = 'private' G_XML_ROOT = 'root' # any identifier really; as long as it's not hardcoded TZ_API_URL = 'https://maps.googleapis.com/maps/api/timezone/json?location={lat},{lon}&timestamp={ts}' G_XML_NAMESPACES =...
32.103448
101
0.649839
from datetime import datetime epoch = datetime.utcfromtimestamp(0) ACCESS_PRIVATE = 'private' G_XML_ROOT = 'root' TZ_API_URL = 'https://maps.googleapis.com/maps/api/timezone/json?location={lat},{lon}&timestamp={ts}' G_XML_NAMESPACES = { G_XML_ROOT: 'http://www.w3.org/2005/Atom', 'gd': 'http://schemas.goo...
true
true
1c169d8a834fe68bd3872286d42682e25375eaee
6,466
py
Python
reliability/tasks/KrakenIntegration.py
afcollins/svt
d780da3162cc300fee640386da7048dd8e2a7c90
[ "Apache-2.0" ]
115
2016-07-15T12:24:42.000Z
2022-02-21T20:40:09.000Z
reliability/tasks/KrakenIntegration.py
afcollins/svt
d780da3162cc300fee640386da7048dd8e2a7c90
[ "Apache-2.0" ]
452
2016-05-19T13:55:19.000Z
2022-03-24T11:25:20.000Z
reliability/tasks/KrakenIntegration.py
afcollins/svt
d780da3162cc300fee640386da7048dd8e2a7c90
[ "Apache-2.0" ]
112
2016-05-16T08:48:55.000Z
2022-01-12T13:13:37.000Z
import logging import sys from apscheduler.schedulers.background import BackgroundScheduler from .GlobalData import global_data from tasks.utils.SlackIntegration import slackIntegration from tasks.utils.oc import shell class KrakenIntegration: def __init__(self): self.logger = logging.getLogger('reliabilit...
48.984848
184
0.596195
import logging import sys from apscheduler.schedulers.background import BackgroundScheduler from .GlobalData import global_data from tasks.utils.SlackIntegration import slackIntegration from tasks.utils.oc import shell class KrakenIntegration: def __init__(self): self.logger = logging.getLogger('reliabilit...
true
true
1c16a06a63bab7be2819b2081250a7126b92fd41
1,453
py
Python
migrations/versions/0f29465a7773_.py
theruuwinn/Audio-test-using-flask
40a035ff4ab43bb9d511bfa639327c98089e8459
[ "MIT" ]
null
null
null
migrations/versions/0f29465a7773_.py
theruuwinn/Audio-test-using-flask
40a035ff4ab43bb9d511bfa639327c98089e8459
[ "MIT" ]
null
null
null
migrations/versions/0f29465a7773_.py
theruuwinn/Audio-test-using-flask
40a035ff4ab43bb9d511bfa639327c98089e8459
[ "MIT" ]
null
null
null
from alembic import op import sqlalchemy as sa revision = '0f29465a7773' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('audiobook', sa.Column('id', sa.Integer(), nullable=False), sa.Column('uploaded_time', sa.DateTime(), nullable=False), sa.Column(...
29.653061
65
0.670337
from alembic import op import sqlalchemy as sa revision = '0f29465a7773' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('audiobook', sa.Column('id', sa.Integer(), nullable=False), sa.Column('uploaded_time', sa.DateTime(), nullable=False), sa.Column(...
true
true
1c16a0b96e5c17d2aef3adce1247de83ec87a712
977
py
Python
all_repos_depends/config.py
mxr/all-repos-depends
dcf715dbfb7182899e2412dbfaaf1ef4cc50865c
[ "MIT" ]
11
2018-04-23T06:41:55.000Z
2022-01-27T13:37:59.000Z
all_repos_depends/config.py
mxr/all-repos-depends
dcf715dbfb7182899e2412dbfaaf1ef4cc50865c
[ "MIT" ]
2
2018-04-23T06:03:18.000Z
2018-04-23T06:03:51.000Z
all_repos_depends/config.py
mxr/all-repos-depends
dcf715dbfb7182899e2412dbfaaf1ef4cc50865c
[ "MIT" ]
2
2021-02-01T15:02:14.000Z
2021-09-25T15:49:44.000Z
import json from typing import Any from typing import Callable from typing import NamedTuple from typing import Tuple from all_repos.config import Config as AllReposConfig from all_repos.config import load_config as all_repos_load_config from all_repos_depends.types import Depends from all_repos_depends.types import ...
28.735294
72
0.715455
import json from typing import Any from typing import Callable from typing import NamedTuple from typing import Tuple from all_repos.config import Config as AllReposConfig from all_repos.config import load_config as all_repos_load_config from all_repos_depends.types import Depends from all_repos_depends.types import ...
true
true
1c16a0e7a2793d36fec82726f402f6dec2074236
17,746
py
Python
src/ivac/nonlinear.py
chatipat/ivac
c4673a8b5e425bc1841415763190996794e48a1e
[ "MIT" ]
1
2021-02-05T16:22:16.000Z
2021-02-05T16:22:16.000Z
src/ivac/nonlinear.py
chatipat/ivac
c4673a8b5e425bc1841415763190996794e48a1e
[ "MIT" ]
null
null
null
src/ivac/nonlinear.py
chatipat/ivac
c4673a8b5e425bc1841415763190996794e48a1e
[ "MIT" ]
null
null
null
import numpy as np import torch import pytorch_lightning as pl from .linear import LinearVAC, LinearIVAC class NonlinearIVAC: """Solve nonlinear IVAC using a neural network basis. Parameters ---------- minlag : int Minimum IVAC lag time in units of frames. maxlag : int, optional M...
31.242958
79
0.590556
import numpy as np import torch import pytorch_lightning as pl from .linear import LinearVAC, LinearIVAC class NonlinearIVAC: def __init__( self, minlag, maxlag=None, nevecs=None, batch_size=None, val_batch_size=None, val_every=1, hidden_widths=[], ...
true
true
1c16a29e21f53c692f6da5cd1e20c975dbd28964
1,067
py
Python
implementation/service/service/models.py
lumakhl/microservices-example
7b633898b030939bbefd8afe17b53f2b0c4ceaf1
[ "MIT" ]
null
null
null
implementation/service/service/models.py
lumakhl/microservices-example
7b633898b030939bbefd8afe17b53f2b0c4ceaf1
[ "MIT" ]
null
null
null
implementation/service/service/models.py
lumakhl/microservices-example
7b633898b030939bbefd8afe17b53f2b0c4ceaf1
[ "MIT" ]
null
null
null
import datetime from sqlalchemy import ( DECIMAL, Column, DateTime, ForeignKey, Integer, String ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship class Base(object): created_at = Column( DateTime, default=datetime.datetime.utcnow, nullab...
20.921569
62
0.677601
import datetime from sqlalchemy import ( DECIMAL, Column, DateTime, ForeignKey, Integer, String ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship class Base(object): created_at = Column( DateTime, default=datetime.datetime.utcnow, nullab...
true
true
1c16a307bc3b9d463cf2e38abac63ddc477f980d
1,151
py
Python
teachers/urls.py
reivhax/Exams-MIS
5c4c6d30d1d8fc3040505c660fffbdffd1ef4a53
[ "MIT" ]
null
null
null
teachers/urls.py
reivhax/Exams-MIS
5c4c6d30d1d8fc3040505c660fffbdffd1ef4a53
[ "MIT" ]
null
null
null
teachers/urls.py
reivhax/Exams-MIS
5c4c6d30d1d8fc3040505c660fffbdffd1ef4a53
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.views.generic.base import RedirectView from django.views.generic import TemplateView from django.contrib.staticfiles.views import serve from . import views,api_views urlpatterns = [ # url(r'^$', serve,kwargs={'path': 'front-end/index.html'}), # url(r'^(?!/?static/)...
46.04
104
0.694179
from django.conf.urls import url from django.views.generic.base import RedirectView from django.views.generic import TemplateView from django.contrib.staticfiles.views import serve from . import views,api_views urlpatterns = [ url(r'^$', RedirectView.as_view(url='/admin')), url(r'^admin/select-exa...
true
true
1c16a33e6398eb02469a1d10b292e7827bf1a4ab
800
py
Python
osm_fudge/osm/amenities.py
amishas157/osm-fudge
58b2f6bfc6c58ff9ca78fd1add5fe3e9fd7e948e
[ "MIT" ]
2
2018-05-28T09:42:19.000Z
2019-06-11T23:55:23.000Z
osm_fudge/osm/amenities.py
amishas157/osm-fudge
58b2f6bfc6c58ff9ca78fd1add5fe3e9fd7e948e
[ "MIT" ]
12
2018-05-26T14:42:34.000Z
2018-07-05T11:04:52.000Z
osm_fudge/osm/amenities.py
amishas157/osm-fudge
58b2f6bfc6c58ff9ca78fd1add5fe3e9fd7e948e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Extract all objects with an amenity tag from an osm file and list them with their name and position. """ import osmium as o import argparse class AmenityListHandler(o.SimpleHandler): def print_amenity(amenity, tags, lon, lat): name = tags.get('name', '') print("{name}"...
27.586207
96
0.6825
import osmium as o import argparse class AmenityListHandler(o.SimpleHandler): def print_amenity(amenity, tags, lon, lat): name = tags.get('name', '') print("{name}".format(name=name)) def node(self, n): if 'amenity' in n.tags and 'name' in n.tags: self.print_amenity(n.ta...
true
true
1c16a41f7a5c9cdacccc71cfdf5fca96710aecfe
315
py
Python
tests/functional/test_logout.py
onyxcherry/OnyxcherryOTP
7ce5d224e5c2694048d567d0f60e2f2f22560a37
[ "MIT" ]
1
2021-06-26T22:22:55.000Z
2021-06-26T22:22:55.000Z
tests/functional/test_logout.py
onyxcherry/OnyxcherryOTP
7ce5d224e5c2694048d567d0f60e2f2f22560a37
[ "MIT" ]
null
null
null
tests/functional/test_logout.py
onyxcherry/OnyxcherryOTP
7ce5d224e5c2694048d567d0f60e2f2f22560a37
[ "MIT" ]
2
2021-02-21T15:59:40.000Z
2021-02-21T19:05:57.000Z
from helping import sign_in def test_logout(test_client, init_database): sign_in(test_client, "straw_berry", "EJew@MHHQ7x-g.4<") logout_response = test_client.get("/auth/logout", follow_redirects=False) cookie_header = logout_response.headers.get("Set-Cookie") assert "session=;" in cookie_header
35
77
0.755556
from helping import sign_in def test_logout(test_client, init_database): sign_in(test_client, "straw_berry", "EJew@MHHQ7x-g.4<") logout_response = test_client.get("/auth/logout", follow_redirects=False) cookie_header = logout_response.headers.get("Set-Cookie") assert "session=;" in cookie_header
true
true
1c16a447e6b98836bf77a2f95989679c6cf59404
457
py
Python
test/test_help.py
tirkarthi/mathics-core
6b07500b935f23dc332f4ec3fac1d71ac4c8fc04
[ "Apache-2.0" ]
90
2021-09-11T14:14:00.000Z
2022-03-29T02:08:29.000Z
test/test_help.py
tirkarthi/mathics-core
6b07500b935f23dc332f4ec3fac1d71ac4c8fc04
[ "Apache-2.0" ]
187
2021-09-13T01:00:41.000Z
2022-03-31T11:52:52.000Z
test/test_help.py
tirkarthi/mathics-core
6b07500b935f23dc332f4ec3fac1d71ac4c8fc04
[ "Apache-2.0" ]
10
2021-10-05T15:44:26.000Z
2022-03-21T12:34:33.000Z
# -*- coding: utf-8 -*- from .helper import check_evaluation, evaluate from mathics.builtin.base import Builtin from mathics.core.atoms import Integer0 class Builtin1(Builtin): summary_text = "short description" class Builtin2(Builtin): "long description" def test_short_description(): check_evaluation...
21.761905
62
0.739606
from .helper import check_evaluation, evaluate from mathics.builtin.base import Builtin from mathics.core.atoms import Integer0 class Builtin1(Builtin): summary_text = "short description" class Builtin2(Builtin): def test_short_description(): check_evaluation("?Builtin1", "Null", "short description") de...
true
true
1c16a45a13599d05f6f95afdc7626524c5a8de0a
37,432
py
Python
api/namex/resources/payment/payment.py
andrepestana-aot/namex
af8f38779812b51469d45ab2b59dc23687ac8eb2
[ "Apache-2.0" ]
1
2020-03-23T21:43:15.000Z
2020-03-23T21:43:15.000Z
api/namex/resources/payment/payment.py
pwei1018/namex
7d2c9aec0b79040b5dc402a0d0e7904c606e499e
[ "Apache-2.0" ]
null
null
null
api/namex/resources/payment/payment.py
pwei1018/namex
7d2c9aec0b79040b5dc402a0d0e7904c606e499e
[ "Apache-2.0" ]
null
null
null
import json from datetime import datetime, timedelta from dateutil import parser as dateutil_parser from flask import current_app, request, make_response, jsonify from flask_restx import cors, fields from flask_jwt_oidc import AuthError from namex import jwt, nro from namex.constants import PaymentState, PaymentStat...
45.872549
155
0.617279
import json from datetime import datetime, timedelta from dateutil import parser as dateutil_parser from flask import current_app, request, make_response, jsonify from flask_restx import cors, fields from flask_jwt_oidc import AuthError from namex import jwt, nro from namex.constants import PaymentState, PaymentStat...
true
true
1c16a4b528b840fc2227677ea4bb07fdc5dd93ff
4,036
py
Python
tensorflow_model_analysis/extractors/sql_slice_key_extractor.py
josephw-ml/model-analysis
3105200fd39aa46e4c4d83aa460d92aa08a4b784
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/extractors/sql_slice_key_extractor.py
josephw-ml/model-analysis
3105200fd39aa46e4c4d83aa460d92aa08a4b784
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/extractors/sql_slice_key_extractor.py
josephw-ml/model-analysis
3105200fd39aa46e4c4d83aa460d92aa08a4b784
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
34.495726
80
0.735382
import copy import functools from typing import List import apache_beam as beam import pyarrow as pa from tensorflow_model_analysis import constants from tensorflow_model_analysis import types from tensorflow_model_analysis.extractors import extractor from tensorflow_model_analysis.proto import config_pb2 from tfx_...
true
true
1c16a5d5e9f73a3a8d26275a1c88db34ac59d054
1,174
py
Python
deepr/layers/lstm.py
criteo-dexter/deepr
4de9cb8afc09cb3d2f7c42da248a966bfea5fc83
[ "Apache-2.0" ]
50
2020-05-19T17:29:44.000Z
2022-01-15T20:50:50.000Z
deepr/layers/lstm.py
criteo-dexter/deepr
4de9cb8afc09cb3d2f7c42da248a966bfea5fc83
[ "Apache-2.0" ]
75
2020-05-20T16:53:37.000Z
2022-01-12T15:53:46.000Z
deepr/layers/lstm.py
criteo-dexter/deepr
4de9cb8afc09cb3d2f7c42da248a966bfea5fc83
[ "Apache-2.0" ]
17
2020-05-25T13:23:03.000Z
2022-02-21T11:22:08.000Z
# pylint: disable=no-value-for-parameter,unexpected-keyword-arg """LSTM layers.""" import tensorflow as tf from deepr.layers import base @base.layer(n_in=2, n_out=3) def LSTM(tensors, num_units: int, bidirectional: bool = False, **kwargs): """LSTM layer.""" words, nwords = tensors t = tf.transpose(words...
37.870968
102
0.689097
import tensorflow as tf from deepr.layers import base @base.layer(n_in=2, n_out=3) def LSTM(tensors, num_units: int, bidirectional: bool = False, **kwargs): words, nwords = tensors t = tf.transpose(words, perm=[1, 0, 2]) lstm_cell_fw = tf.contrib.rnn.LSTMBlockFusedCell(num_units=num_units, **kwargs) ...
true
true
1c16a63f39f73464bd75e94699cdc70373df82f4
35,423
py
Python
OVC_train.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
5
2021-02-25T03:12:01.000Z
2022-03-04T15:17:45.000Z
OVC_train.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
1
2021-02-25T05:42:31.000Z
2022-01-02T17:54:16.000Z
OVC_train.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
null
null
null
''' Our implementation of our proposed OVC refers to the original data pipeline of VAG-NMT and modifications were done, including: 1. Preprocess all object-level features and detect translation-relevant/irrelevant objects in Multi30K, which needs lots of prep work, which costs around 1-2 days. 2. Preprocess all visi...
47.675639
166
0.662705
import torch from torch import optim, nn import time import argparse import numpy as np import os from preprocessing import * from machine_translation_vision.meteor.meteor import Meteor from machine_translation_vision.user_loss import * from machine_translation_vision.models import NMT_AttentionImagine_Seq2Seq_Beam_V1...
true
true
1c16a666497e1dbdf5cf3b62e35fb98441f9718b
650
py
Python
wagtail/admin/migrations/0003_admin_managed.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
8,851
2016-12-09T19:01:45.000Z
2022-03-31T04:45:06.000Z
wagtail/admin/migrations/0003_admin_managed.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
5,197
2016-12-09T19:24:37.000Z
2022-03-31T22:17:55.000Z
wagtail/admin/migrations/0003_admin_managed.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
2,548
2016-12-09T18:16:55.000Z
2022-03-31T21:34:38.000Z
# Generated by Django 3.1.5 on 2021-02-15 15:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailadmin', '0002_admin'), ] operations = [ migrations.DeleteModel(name='Admin'), migrations.CreateModel( name='Admin...
26
114
0.549231
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailadmin', '0002_admin'), ] operations = [ migrations.DeleteModel(name='Admin'), migrations.CreateModel( name='Admin', fields=[ ('id', m...
true
true
1c16a7068f8f072120828a8f267f04f612ef05dd
482
py
Python
lang/py/pylib/12/urlparse_urlparseattrs.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/pylib/12/urlparse_urlparseattrs.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/pylib/12/urlparse_urlparseattrs.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
#!/usr/bin/env python from urlparse import urlparse url = 'http://netloc/path;param?query=arg#frag' parsed = urlparse(url) print'scheme :',parsed.scheme print'netloc :',parsed.netloc print'path :',parsed.path print'params :',parsed.params print'query :',parsed.query print'fragment :',parsed.fragmen...
28.352941
58
0.715768
from urlparse import urlparse url = 'http://netloc/path;param?query=arg#frag' parsed = urlparse(url) print'scheme :',parsed.scheme print'netloc :',parsed.netloc print'path :',parsed.path print'params :',parsed.params print'query :',parsed.query print'fragment :',parsed.fragment print'username :',p...
false
true
1c16a83b31b10cc98fa6597b3783f8a5e708a3ba
3,283
py
Python
tkdet/data/catalog.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
1
2020-10-09T02:27:13.000Z
2020-10-09T02:27:13.000Z
tkdet/data/catalog.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
null
null
null
tkdet/data/catalog.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
null
null
null
import copy import logging import types from typing import List from tkdet.utils.logger import log_first_n __all__ = ["DatasetCatalog", "MetadataCatalog", "Metadata"] class DatasetCatalog(object): _REGISTERED = {} @staticmethod def register(name, func): assert callable(func), "You must register...
27.588235
99
0.558331
import copy import logging import types from typing import List from tkdet.utils.logger import log_first_n __all__ = ["DatasetCatalog", "MetadataCatalog", "Metadata"] class DatasetCatalog(object): _REGISTERED = {} @staticmethod def register(name, func): assert callable(func), "You must register...
true
true
1c16a98b4a669878d4a8c1057a83229955c16da9
23,958
py
Python
python_practice/junk/e.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
null
null
null
python_practice/junk/e.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
null
null
null
python_practice/junk/e.py
vimm0/python_exercise
7773d95b4c25b82a9d014f7a814ac83df9ebac17
[ "MIT" ]
1
2018-01-04T16:27:31.000Z
2018-01-04T16:27:31.000Z
#!/usr/bin/python # # Urwid tutorial documentation generation program # Copyright (C) 2004-2007 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version...
34.079659
91
0.5907
import sys import re import urwid.html_fragment import urwid try: import templayer except ImportError: templayer = None examples = {} interp_line = "#!/usr/bin/python\n\n" cut_comment = "# CUT HERE" examples["min"] = ["example_min"] def example_min(): import urwid txt = urwid.Text("Hello World") ...
false
true
1c16ac3bee1886cc0cd5dc120dfd38e0b484d0c8
940
py
Python
mayan/apps/metadata/validators.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2021-06-17T18:24:25.000Z
2021-06-17T18:24:25.000Z
mayan/apps/metadata/validators.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
7
2020-06-06T00:01:04.000Z
2022-01-13T01:47:17.000Z
mayan/apps/metadata/validators.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2020-07-29T21:03:27.000Z
2020-07-29T21:03:27.000Z
from __future__ import unicode_literals from dateutil.parser import parse from django.core.exceptions import ValidationError from .parsers import MetadataParser class MetadataValidator(MetadataParser): _registry = [] def validate(self, input_data): try: self.execute(input_data) ...
24.736842
55
0.756383
from __future__ import unicode_literals from dateutil.parser import parse from django.core.exceptions import ValidationError from .parsers import MetadataParser class MetadataValidator(MetadataParser): _registry = [] def validate(self, input_data): try: self.execute(input_data) ...
true
true
1c16afa4e1fe82674245fb97764ee04334bd2715
1,113
py
Python
trainer/metrics.py
omkarpat/conversational-movie-recommender
3ee3b4854bbab5eb4730a18972f5cfd5350d9bf4
[ "MIT" ]
1
2021-03-11T08:45:43.000Z
2021-03-11T08:45:43.000Z
trainer/metrics.py
omkarpat/conversational-movie-recommender
3ee3b4854bbab5eb4730a18972f5cfd5350d9bf4
[ "MIT" ]
null
null
null
trainer/metrics.py
omkarpat/conversational-movie-recommender
3ee3b4854bbab5eb4730a18972f5cfd5350d9bf4
[ "MIT" ]
1
2021-03-11T08:45:58.000Z
2021-03-11T08:45:58.000Z
class Metric(object): def get(self): raise NotImplementedError("Subclasses must implement this") class RunningMetric(Metric): def __init__(self): self.current_value = 0.0 self.num_steps = 0 def _add(self, value): self.current_value += (value - self.current_value) / (self.n...
24.195652
81
0.630728
class Metric(object): def get(self): raise NotImplementedError("Subclasses must implement this") class RunningMetric(Metric): def __init__(self): self.current_value = 0.0 self.num_steps = 0 def _add(self, value): self.current_value += (value - self.current_value) / (self.n...
true
true
1c16afe3c05665904e8bc8d200b2f75c9cfd0547
5,257
py
Python
src/bumpver/v1rewrite.py
timoludwig/bumpver
1fb7e84e9146535c9acf4288056fb8cc09dc43af
[ "MIT" ]
9
2018-10-02T22:55:41.000Z
2020-11-15T14:08:22.000Z
src/bumpver/v1rewrite.py
timoludwig/bumpver
1fb7e84e9146535c9acf4288056fb8cc09dc43af
[ "MIT" ]
7
2018-09-04T14:08:14.000Z
2020-10-12T15:33:13.000Z
src/bumpver/v1rewrite.py
timoludwig/bumpver
1fb7e84e9146535c9acf4288056fb8cc09dc43af
[ "MIT" ]
5
2018-09-04T12:37:57.000Z
2020-09-16T07:31:10.000Z
# This file is part of the bumpver project # https://github.com/mbarkhau/bumpver # # Copyright (c) 2018-2022 Manuel Barkhau (mbarkhau@gmail.com) - MIT License # SPDX-License-Identifier: MIT """Rewrite files, updating occurences of version strings.""" import io import typing as typ import logging from . import parse f...
33.916129
87
0.662926
import io import typing as typ import logging from . import parse from . import config from . import rewrite from . import version from . import regexfmt from . import v1version from .patterns import Pattern logger = logging.getLogger("bumpver.v1rewrite") def rewrite_lines( patterns : typ.List[Pattern], ne...
true
true
1c16b07036121a583bb71be6ad51fc10ac67db16
8,272
py
Python
src/vznncv/signal/generator/onedim/_generator.py
vznncv/vznncv-signal-generator
d5fe9a4effa19e4f1af01ab52e782790af11afad
[ "MIT" ]
2
2019-06-18T14:04:51.000Z
2022-02-17T20:24:29.000Z
src/vznncv/signal/generator/onedim/_generator.py
vznncv/vznncv-signal-generator
d5fe9a4effa19e4f1af01ab52e782790af11afad
[ "MIT" ]
null
null
null
src/vznncv/signal/generator/onedim/_generator.py
vznncv/vznncv-signal-generator
d5fe9a4effa19e4f1af01ab52e782790af11afad
[ "MIT" ]
null
null
null
""" Main module to generate one dimensional random process. """ import logging from typing import Iterable import numpy as np from vznncv.signal.generator.onedim._window import calculate_linear_window_size, linear_window from ._utils import get_random_state, UnaryFunction, BinaryFunction, TrendFunction _DEFAULT_DTYP...
35.050847
118
0.649782
import logging from typing import Iterable import numpy as np from vznncv.signal.generator.onedim._window import calculate_linear_window_size, linear_window from ._utils import get_random_state, UnaryFunction, BinaryFunction, TrendFunction _DEFAULT_DTYPE = np.float64 logger = logging.getLogger(__name__) class _Ba...
true
true
1c16b2555542d3fac494c3a89c51b44d5b8e010d
2,501
py
Python
tests/attacks/test_decision_tree_attack.py
smeghana888/adversarial-robustness-toolbox
36bd9edc1b70d85404c5c8b6dc24a6190fe0e6b5
[ "MIT" ]
2
2019-11-05T17:23:37.000Z
2021-07-26T15:09:44.000Z
tests/attacks/test_decision_tree_attack.py
liuye6666/adversarial-robustness-toolbox
548febd02770bf06d9e0bb34974b3d98ec889865
[ "MIT" ]
null
null
null
tests/attacks/test_decision_tree_attack.py
liuye6666/adversarial-robustness-toolbox
548febd02770bf06d9e0bb34974b3d98ec889865
[ "MIT" ]
1
2021-03-16T11:49:02.000Z
2021-03-16T11:49:02.000Z
# MIT License # # Copyright (C) IBM Corporation 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 without limitation the # rights to use, copy, modify, merge...
38.476923
120
0.717713
from __future__ import absolute_import, division, print_function, unicode_literals import logging import unittest from sklearn.tree import DecisionTreeClassifier from sklearn.datasets import load_digits import numpy as np from art.attacks import DecisionTreeAttack from art.classifiers import SklearnClassifier from a...
true
true
1c16b2d9d4ef318df5e4779dc013949d820cee63
8,433
py
Python
tests/test_api_skeleton.py
tadeu/conda-build
395ee91c1f54eeca8d8813f3524281d4590a2756
[ "BSD-3-Clause" ]
null
null
null
tests/test_api_skeleton.py
tadeu/conda-build
395ee91c1f54eeca8d8813f3524281d4590a2756
[ "BSD-3-Clause" ]
null
null
null
tests/test_api_skeleton.py
tadeu/conda-build
395ee91c1f54eeca8d8813f3524281d4590a2756
[ "BSD-3-Clause" ]
null
null
null
import os import sys from pkg_resources import parse_version import pytest try: import ruamel_yaml except ImportError: try: import ruamel.yaml as ruamel_yaml except ImportError: raise ImportError("No ruamel_yaml library available.\n" "To proceed, conda install rua...
41.136585
106
0.665837
import os import sys from pkg_resources import parse_version import pytest try: import ruamel_yaml except ImportError: try: import ruamel.yaml as ruamel_yaml except ImportError: raise ImportError("No ruamel_yaml library available.\n" "To proceed, conda install rua...
true
true
1c16b2f33357741e206f42bc25ef828ad0bdcf8f
2,460
py
Python
compare_complex.py
jamiesweeney/matrixmagic
4c7674232643fa8b7524f0febdefd49f7950c62f
[ "MIT" ]
null
null
null
compare_complex.py
jamiesweeney/matrixmagic
4c7674232643fa8b7524f0febdefd49f7950c62f
[ "MIT" ]
3
2018-04-04T10:00:54.000Z
2018-04-05T08:48:09.000Z
compare_complex.py
jamiesweeney/matrixmagic
4c7674232643fa8b7524f0febdefd49f7950c62f
[ "MIT" ]
null
null
null
''' Jamie Sweeney April 2018 Some more complex examples ''' import numpy as np import matplotlib.pyplot as plt import time import sys import math # Example 1 #-- Take RGB image convert to greyscale RGB_BINS = [0.299, 0.587, 0.114] # Iterative version of turning to greyscale def gsIterative(img): ...
22.162162
84
0.578455
import numpy as np import matplotlib.pyplot as plt import time import sys import math RGB_BINS = [0.299, 0.587, 0.114] def gsIterative(img): gs_img = np.zeros((img.shape[0],img.shape[1])) j = 0 for y in img[:]: i = 0 for x in y[:]: gs_val = 0 k = 0 f...
true
true
1c16b44248fd443847bba0f5b778409d1f9de0af
3,283
py
Python
silx/gui/dialog/utils.py
pierrepaleo/silx
392930f522e291d096ca29facb652a5c8dcfdbcd
[ "CC0-1.0", "MIT" ]
1
2016-10-26T11:05:46.000Z
2016-10-26T11:05:46.000Z
silx/gui/dialog/utils.py
vallsv/silx
834bfe9272af99096faa360e1ad96291bf46a2ac
[ "CC0-1.0", "MIT" ]
7
2016-10-19T09:27:26.000Z
2020-01-24T13:26:56.000Z
silx/gui/dialog/utils.py
payno/silx
13301e61627f98fa837008250ac74a0627a7a560
[ "CC0-1.0", "MIT" ]
null
null
null
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
31.266667
79
0.639354
__authors__ = ["V. Valls"] __license__ = "MIT" __date__ = "25/10/2017" import os import sys import types from silx.gui import qt from silx.third_party import six def samefile(path1, path2): if six.PY2 and sys.platform == "win32": path1 = os.path.normcase(path1) path2 = os.path.normcase(path2) ...
true
true
1c16b55908aabb808d80f990bcbae51c0242047d
2,267
py
Python
Optimizers/Gradient-Descent/python/GD/NAdamGD.py
dkaramit/OpSDE
c20bfbc17b905408aebcc8e32e6265f32738a285
[ "MIT" ]
null
null
null
Optimizers/Gradient-Descent/python/GD/NAdamGD.py
dkaramit/OpSDE
c20bfbc17b905408aebcc8e32e6265f32738a285
[ "MIT" ]
null
null
null
Optimizers/Gradient-Descent/python/GD/NAdamGD.py
dkaramit/OpSDE
c20bfbc17b905408aebcc8e32e6265f32738a285
[ "MIT" ]
1
2021-12-15T02:03:01.000Z
2021-12-15T02:03:01.000Z
from numpy import sqrt as np_sqrt from numpy import abs as np_abs from .GradientDescent import GradientDescent class NAdamGD(GradientDescent): '''Implementation of NAdam.''' def __init__(self,loss,beta_m=1-1e-1,beta_v=1-1e-3,epsilon=1e-8,alpha=1e-2): ''' loss: the loss function bet...
33.338235
92
0.590207
from numpy import sqrt as np_sqrt from numpy import abs as np_abs from .GradientDescent import GradientDescent class NAdamGD(GradientDescent): def __init__(self,loss,beta_m=1-1e-1,beta_v=1-1e-3,epsilon=1e-8,alpha=1e-2): GradientDescent.__init__(self,loss) self.beta_m=beta_m self.beta_...
true
true
1c16b55ca923f7740899933c2a8827402146eb66
6,015
py
Python
seahub/base/context_processors.py
odontomachus/seahub
5b6f2153921da21a473d9ff20ce443d40efc93ab
[ "Apache-2.0" ]
null
null
null
seahub/base/context_processors.py
odontomachus/seahub
5b6f2153921da21a473d9ff20ce443d40efc93ab
[ "Apache-2.0" ]
null
null
null
seahub/base/context_processors.py
odontomachus/seahub
5b6f2153921da21a473d9ff20ce443d40efc93ab
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012-2016 Seafile Ltd. """ A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used b...
37.59375
97
0.717373
import re import os from django.conf import settings as dj_settings from django.utils.functional import lazy from constance import config from seahub.settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, \ MAX_FILE_NAME, LOGO_PATH, BRANDING_CSS, LOGO_WIDTH, LOGO_HEIGHT,\ SHOW_REPO_DOWNLOAD_BUTTON, SITE_ROO...
true
true
1c16b59da461ba6a11e65cfc76f464156bdcdc00
2,214
py
Python
homework/bigram/bigram.py
Bankee-256/NLP_Cource
e73370158db42114ed4e19ebe66607687c947546
[ "MIT" ]
1
2021-02-06T09:37:06.000Z
2021-02-06T09:37:06.000Z
homework/bigram/bigram.py
Bankee-256/NLP_Cource
e73370158db42114ed4e19ebe66607687c947546
[ "MIT" ]
null
null
null
homework/bigram/bigram.py
Bankee-256/NLP_Cource
e73370158db42114ed4e19ebe66607687c947546
[ "MIT" ]
null
null
null
import re import jieba cnt = dict() def init(): total_word = 0 f = open("199801.txt", encoding="UTF-8") print("Generating... Please wait a minute") lines = f.readlines() for line in lines: line = line[21:] # 删除前面的一串 line = re.sub(r'/', "", line) # 删除斜杠 line = re.sub(r'\[]...
28.384615
60
0.403342
import re import jieba cnt = dict() def init(): total_word = 0 f = open("199801.txt", encoding="UTF-8") print("Generating... Please wait a minute") lines = f.readlines() for line in lines: line = line[21:] line = re.sub(r'/', "", line) line = re.sub(r'\[]', "", line) ...
true
true
1c16b6bbe122480b0b83194f1fc2bac2260f954f
2,617
py
Python
models/recurrent/tests/test_tf_qrnn_forward.py
sundogrd/tensorflow_end2end_speech_recognition
61e4a65fb5c9f3d9f690d713dcd77a48b1de0a14
[ "MIT" ]
351
2017-05-27T08:31:27.000Z
2022-03-03T16:47:27.000Z
models/recurrent/tests/test_tf_qrnn_forward.py
eLavin11/tensorflow_end2end_speech_recognition
65b9728089d5e92b25b92384a67419d970399a64
[ "MIT" ]
19
2017-07-19T13:12:18.000Z
2019-06-12T06:07:13.000Z
models/recurrent/tests/test_tf_qrnn_forward.py
eLavin11/tensorflow_end2end_speech_recognition
65b9728089d5e92b25b92384a67419d970399a64
[ "MIT" ]
127
2017-06-12T16:27:21.000Z
2021-12-29T02:22:34.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import numpy as np import tensorflow as tf import unittest sys.path.append(os.pardir) from qrnn import QRNN class TestQRNNForward(unittest.TestCase): def test_qrnn_linear_forward(self): batch_size = 100 sentence_length = 5 ...
33.987013
84
0.625143
import os import sys import numpy as np import tensorflow as tf import unittest sys.path.append(os.pardir) from qrnn import QRNN class TestQRNNForward(unittest.TestCase): def test_qrnn_linear_forward(self): batch_size = 100 sentence_length = 5 word_size = 10 size = 5 dat...
true
true
1c16b73a0c7de96dcd0382f19ff6308629d97a05
7,100
py
Python
tests/integration/operators_test/constexpr_gather.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
61
2020-07-06T17:11:46.000Z
2022-03-12T14:42:51.000Z
tests/integration/operators_test/constexpr_gather.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
1
2021-02-25T01:30:29.000Z
2021-11-09T11:13:14.000Z
tests/integration/operators_test/constexpr_gather.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
6
2020-07-15T12:33:13.000Z
2021-11-07T06:55:00.000Z
# Copyright (c) 2019 Graphcore Ltd. All rights reserved. import itertools import numpy as np from op_tester import op_tester import popart def test_gather_id_pattern(op_tester): d1 = np.array([[-1, -2, -3]]).astype(np.float32) d2 = np.array([0]).astype(np.int32) axis = 0 def init_builder(builder): ...
34.466019
79
0.586479
import itertools import numpy as np from op_tester import op_tester import popart def test_gather_id_pattern(op_tester): d1 = np.array([[-1, -2, -3]]).astype(np.float32) d2 = np.array([0]).astype(np.int32) axis = 0 def init_builder(builder): i1 = builder.aiOnnx.constant(d1) i2 = build...
true
true
1c16b9f4a3c6ab84dcb1cf8e24e3aa9823868d35
12,256
py
Python
Tests/test_Clustalw_tool.py
bioinf-mcb/biopython
1a1f4a7ee4e0efba517d3d607c56c27e72e399cc
[ "BSD-3-Clause" ]
2
2020-06-25T12:52:03.000Z
2020-07-11T09:47:34.000Z
Tests/test_Clustalw_tool.py
cosign070128/biopython
2f02e34ba76306e9c27eec9e051809bec2cece9b
[ "BSD-3-Clause" ]
9
2020-05-05T00:54:23.000Z
2020-06-09T17:10:45.000Z
Tests/test_Clustalw_tool.py
cosign070128/biopython
2f02e34ba76306e9c27eec9e051809bec2cece9b
[ "BSD-3-Clause" ]
3
2020-05-17T19:43:05.000Z
2020-06-04T20:44:38.000Z
# Copyright 2008-2011 by Peter Cock. All rights reserved. # Revisions copyright 2012 by Christian Brueffer. All rights reserved. # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # TODO - Clean up ...
39.921824
89
0.610884
from Bio import MissingExternalDependencyError import sys import os import unittest from Bio import SeqIO from Bio import AlignIO from Bio.Align.Applications import ClustalwCommandline from Bio.Application import ApplicationError os.environ["LANG"] = "C" clustalw_exe = None if sys.platform == "win32": tr...
true
true
1c16bb00bffc1f4b7dcbf7fff3fa71e9dc06f3ff
24,451
py
Python
heudiconv/convert.py
AKSoo/heudiconv
dcc590d0be8c514211c8a7323467acce2b338e9c
[ "Apache-2.0" ]
null
null
null
heudiconv/convert.py
AKSoo/heudiconv
dcc590d0be8c514211c8a7323467acce2b338e9c
[ "Apache-2.0" ]
null
null
null
heudiconv/convert.py
AKSoo/heudiconv
dcc590d0be8c514211c8a7323467acce2b338e9c
[ "Apache-2.0" ]
null
null
null
import os import os.path as op import logging import shutil import sys from .utils import ( read_config, load_json, save_json, write_config, TempDirs, safe_copyfile, treat_infofile, set_readonly, clear_temp_dicoms, seqinfo_fields, assure_no_file_exists, file_md5sum ) fro...
39.373591
99
0.580631
import os import os.path as op import logging import shutil import sys from .utils import ( read_config, load_json, save_json, write_config, TempDirs, safe_copyfile, treat_infofile, set_readonly, clear_temp_dicoms, seqinfo_fields, assure_no_file_exists, file_md5sum ) fro...
true
true
1c16bb26255e78e2ad957e78c8ccc3b480f9de92
4,786
py
Python
GenData.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
GenData.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
GenData.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
# This file is used for training character recognition and the output of this file is classifications.txt and flattened_images.txt import sys import numpy as np import cv2 import os MIN_CONTOUR_AREA = 100 RESIZED_IMAGE_WIDTH = 20 RESIZED_IMAGE_HEIGHT = 30 def main(): imgTrainingNumbers = cv2.imread("training_c...
51.462366
207
0.599039
import sys import numpy as np import cv2 import os MIN_CONTOUR_AREA = 100 RESIZED_IMAGE_WIDTH = 20 RESIZED_IMAGE_HEIGHT = 30 def main(): imgTrainingNumbers = cv2.imread("training_chars.png") if imgTrainingNumbers is None: print("error: image not read from file \...
true
true
1c16bcc4bf3f7ac3d5206f23d309acb825643e89
2,886
py
Python
adduser.py
FabianWe/pymailadmin
35792ee95f1e01c31e098782fd83189439c2d629
[ "MIT" ]
null
null
null
adduser.py
FabianWe/pymailadmin
35792ee95f1e01c31e098782fd83189439c2d629
[ "MIT" ]
null
null
null
adduser.py
FabianWe/pymailadmin
35792ee95f1e01c31e098782fd83189439c2d629
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # Copyright (c) 2016, 2017 Fabian Wenzelmann # MIT License # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the righ...
35.62963
118
0.671518
import sys import mailadmin import MySQLdb import getpass import argparse if __name__ == '__main__': parser = argparse.ArgumentParser( description='Adds a new mail user.', formatter_class=argparse.RawTextHelpFormatter) parser.add_argument( 'mail', help='The new E-Mail (name@d...
true
true
1c16bcf63aedccc87cba0edb4b83c58f77316121
2,801
py
Python
tests/integration/contrib/django/data/djangoproject/settings.py
sisp/openapi-core
f3d7d7396e4dc54197862b4e10c2cfca9c386f8f
[ "BSD-3-Clause" ]
1
2021-07-14T14:43:22.000Z
2021-07-14T14:43:22.000Z
tests/integration/contrib/django/data/djangoproject/settings.py
ashb/openapi-core
c4fab4c4b3830bff5b90c3a0ac8dc62e67ee78a3
[ "BSD-3-Clause" ]
null
null
null
tests/integration/contrib/django/data/djangoproject/settings.py
ashb/openapi-core
c4fab4c4b3830bff5b90c3a0ac8dc62e67ee78a3
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for djangotest project. Generated by 'django-admin startproject' using Django 2.2.18. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import o...
25.234234
78
0.704391
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '9=z^yj5yo%g_dyvgdzbceyph^nae)91lq(7^!qqmr1t9wi8b^=' DEBUG = True ALLOWED_HOSTS = ['testserver'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib....
true
true
1c16becbdc7c8ea2a10fe75b7104cc310b18c084
1,349
py
Python
logger.py
Johannes0Horn/mtl-dts
ae50253c808bbb77af3b1117f69f08d2268099e9
[ "MIT" ]
19
2020-04-06T00:07:19.000Z
2022-03-14T16:13:04.000Z
biLSTM_CRF/logger.py
Victorwz/awesome_NLP_models
d16ca80b1b5bcc0536380599a01af173507961ad
[ "MIT" ]
14
2020-10-22T02:37:36.000Z
2022-03-18T16:50:25.000Z
biLSTM_CRF/logger.py
Victorwz/awesome_NLP_models
d16ca80b1b5bcc0536380599a01af173507961ad
[ "MIT" ]
7
2020-12-08T08:54:14.000Z
2022-03-18T13:13:09.000Z
import os import sys import numpy as np import statistics as stat class Logger(object): def __init__(self, log_path, on=True): self.log_path = log_path self.on = on if self.on: while os.path.isfile(self.log_path): self.log_path += '+' def log(self, string...
32.902439
71
0.544848
import os import sys import numpy as np import statistics as stat class Logger(object): def __init__(self, log_path, on=True): self.log_path = log_path self.on = on if self.on: while os.path.isfile(self.log_path): self.log_path += '+' def log(self, string...
true
true
1c16bf6b2b524c7e2f2341399abef0652b694eea
2,864
py
Python
scripts/lib/xpedite/types/__init__.py
timdewhirst/Xpedite
37d8f1f632e4a00094934e1c4cc87b463dc221ba
[ "Apache-2.0" ]
1
2019-11-16T17:53:30.000Z
2019-11-16T17:53:30.000Z
scripts/lib/xpedite/types/__init__.py
timdewhirst/Xpedite
37d8f1f632e4a00094934e1c4cc87b463dc221ba
[ "Apache-2.0" ]
1
2019-12-10T01:07:20.000Z
2019-12-10T01:07:20.000Z
scripts/lib/xpedite/types/__init__.py
dendisuhubdy/Xpedite
d6b67e98d4b640c98499a373425f1f009e5b9061
[ "Apache-2.0" ]
null
null
null
""" Class definitions used in transaction building Author: Manikandan Dhamodharan, Morgan Stanley """ import os from xpedite.dependencies import Package, DEPENDENCY_LOADER DEPENDENCY_LOADER.load(Package.Enum) from enum import Enum # pylint: disable=wrong-import-position class Counter(object): """ Stores the pro...
24.689655
98
0.67912
import os from xpedite.dependencies import Package, DEPENDENCY_LOADER DEPENDENCY_LOADER.load(Package.Enum) from enum import Enum class Counter(object): def __init__(self, threadId, probe, data, tsc): self.threadId = threadId self.probe = probe data = data.strip() self.txnId = None self.data = ...
true
true
1c16bf8f0f9d6d77f185fcaa8bd56cb9ebb59c1a
1,264
py
Python
donbot/pagetopper.py
skitter30/modbot
6526f5bd1b8e73143ff45d71081d64c6e4aa8ea5
[ "MIT" ]
2
2019-12-29T13:15:13.000Z
2020-04-27T07:32:21.000Z
donbot/pagetopper.py
skitter30/modbot
6526f5bd1b8e73143ff45d71081d64c6e4aa8ea5
[ "MIT" ]
9
2018-05-02T14:39:48.000Z
2018-05-27T22:08:53.000Z
donbot/pagetopper.py
skitter30/modbot
6526f5bd1b8e73143ff45d71081d64c6e4aa8ea5
[ "MIT" ]
6
2018-05-08T19:48:35.000Z
2018-06-03T02:58:55.000Z
from donbot import Donbot from math import ceil import schedule import time content = """ beep boop \n This space is reserved for a vote count! \n This post was made by a bot. Check [url=https://forum.mafiascum.net/viewtopic.php?f=5&t=76109]here[/url] for more info. \n beep boop """ class PageTopper(Donbot): de...
30.829268
122
0.649525
from donbot import Donbot from math import ceil import schedule import time content = """ beep boop \n This space is reserved for a vote count! \n This post was made by a bot. Check [url=https://forum.mafiascum.net/viewtopic.php?f=5&t=76109]here[/url] for more info. \n beep boop """ class PageTopper(Donbot): de...
true
true
1c16bfa65979171d873418c97f1602b961f0b9ee
66
py
Python
02-basics/test.py
sachinpr0001/data_science
d028233ff7bbcbbb6b26f01806d1c5ccf788df9a
[ "MIT" ]
null
null
null
02-basics/test.py
sachinpr0001/data_science
d028233ff7bbcbbb6b26f01806d1c5ccf788df9a
[ "MIT" ]
null
null
null
02-basics/test.py
sachinpr0001/data_science
d028233ff7bbcbbb6b26f01806d1c5ccf788df9a
[ "MIT" ]
null
null
null
from hello import * sayHello("Donald", "Trump") sayHi("Mr. Modi")
16.5
27
0.681818
from hello import * sayHello("Donald", "Trump") sayHi("Mr. Modi")
true
true
1c16c1a5cb4f72b1562b9bf901931ebe48f5f1fe
455
py
Python
tsts/scalers/builder.py
TakuyaShintate/tsts
483db1edc2f765a5449137446a77acaf17684ce9
[ "MIT" ]
16
2021-08-28T16:15:41.000Z
2022-02-25T09:47:01.000Z
tsts/scalers/builder.py
TakuyaShintate/tsts
483db1edc2f765a5449137446a77acaf17684ce9
[ "MIT" ]
null
null
null
tsts/scalers/builder.py
TakuyaShintate/tsts
483db1edc2f765a5449137446a77acaf17684ce9
[ "MIT" ]
1
2021-12-05T20:35:38.000Z
2021-12-05T20:35:38.000Z
from tsts.cfg import CfgNode as CN from tsts.core import SCALERS from .scaler import Scaler __all__ = ["build_X_scaler", "build_y_scaler"] def build_X_scaler(cfg: CN) -> Scaler: scaler_name = cfg.X_SCALER.NAME cls = SCALERS[scaler_name] scaler = cls.from_cfg(cfg) return scaler def build_y_scaler(c...
21.666667
46
0.712088
from tsts.cfg import CfgNode as CN from tsts.core import SCALERS from .scaler import Scaler __all__ = ["build_X_scaler", "build_y_scaler"] def build_X_scaler(cfg: CN) -> Scaler: scaler_name = cfg.X_SCALER.NAME cls = SCALERS[scaler_name] scaler = cls.from_cfg(cfg) return scaler def build_y_scaler(c...
true
true
1c16c23a2db21782e409f8b687f1cfa7642bef30
13,808
py
Python
sdk/translation/azure-ai-translation-document/tests/testcase.py
Codejune/azure-sdk-for-python
cfbc9396e572a044d6e761d4909cfb9ee2cd917d
[ "MIT" ]
null
null
null
sdk/translation/azure-ai-translation-document/tests/testcase.py
Codejune/azure-sdk-for-python
cfbc9396e572a044d6e761d4909cfb9ee2cd917d
[ "MIT" ]
null
null
null
sdk/translation/azure-ai-translation-document/tests/testcase.py
Codejune/azure-sdk-for-python
cfbc9396e572a044d6e761d4909cfb9ee2cd917d
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import time import datetime import uuid from devtools_testutils import ( AzureTestCase, ) from azure_devtools.scenario_tests import ( R...
43.285266
176
0.658242
import os import time import datetime import uuid from devtools_testutils import ( AzureTestCase, ) from azure_devtools.scenario_tests import ( RecordingProcessor, ReplayableTest ) from azure.storage.blob import generate_container_sas, ContainerClient from azure.ai.translation.document import DocumentTrans...
true
true
1c16c2702d56ec843780147187ffbc410a5a4c98
9,603
py
Python
corehq/sql_db/config.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
corehq/sql_db/config.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/sql_db/config.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
import copy import json import logging from typing import Optional from django.conf import settings import attr from jsonobject.api import JsonObject from jsonobject.properties import IntegerProperty, StringProperty from memoized import memoized from .exceptions import ( NonContinuousShardsError, NoSuchShard...
32.224832
113
0.628137
import copy import json import logging from typing import Optional from django.conf import settings import attr from jsonobject.api import JsonObject from jsonobject.properties import IntegerProperty, StringProperty from memoized import memoized from .exceptions import ( NonContinuousShardsError, NoSuchShard...
true
true
1c16c296d9a00d573be4e9e818881918f7bcc86c
73
py
Python
holobot/discord/sdk/models/channel.py
rexor12/holobot
89b7b416403d13ccfeee117ef942426b08d3651d
[ "MIT" ]
1
2021-05-24T00:17:46.000Z
2021-05-24T00:17:46.000Z
holobot/discord/sdk/models/channel.py
rexor12/holobot
89b7b416403d13ccfeee117ef942426b08d3651d
[ "MIT" ]
41
2021-03-24T22:50:09.000Z
2021-12-17T12:15:13.000Z
holobot/discord/sdk/models/channel.py
rexor12/holobot
89b7b416403d13ccfeee117ef942426b08d3651d
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class Channel: id: str
12.166667
33
0.767123
from dataclasses import dataclass @dataclass class Channel: id: str
true
true
1c16c2e284378ddda6dba00863726e5732e23c2a
1,278
py
Python
src/schemathesis/converter.py
charliehohenstein30/schemathesis
d4c6d48ca31666417c9259544ecc837e8694c3df
[ "MIT" ]
null
null
null
src/schemathesis/converter.py
charliehohenstein30/schemathesis
d4c6d48ca31666417c9259544ecc837e8694c3df
[ "MIT" ]
null
null
null
src/schemathesis/converter.py
charliehohenstein30/schemathesis
d4c6d48ca31666417c9259544ecc837e8694c3df
[ "MIT" ]
null
null
null
from typing import Any, Dict def to_json_schema(schema: Dict[str, Any], nullable_name: str) -> Dict[str, Any]: """Convert Open API parameters to JSON Schema.""" if schema.get(nullable_name) is True: del schema[nullable_name] if schema.get("in"): initial_type = {"type": schema["type...
39.9375
105
0.63928
from typing import Any, Dict def to_json_schema(schema: Dict[str, Any], nullable_name: str) -> Dict[str, Any]: if schema.get(nullable_name) is True: del schema[nullable_name] if schema.get("in"): initial_type = {"type": schema["type"]} if schema.get("enum"): ...
true
true
1c16c343a39dd0d1879eea509b46a0e5d6ec83b7
32,400
py
Python
recipes/Python/578636_Droids_2__IF_/recipe-578636.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/578636_Droids_2__IF_/recipe-578636.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/578636_Droids_2__IF_/recipe-578636.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
# -For learner's and beginner's like myself -# # -or for anyone who may have enjoyed Droids. -# import time import random from random import randint print('\n' * 110) print('=============================') print('DROIDS 2 - by jay - type help') print('=============================') print('\n\nCytek inc. 02.10.2214...
28.496042
109
0.64784
import time import random from random import randint print('\n' * 110) print('=============================') print('DROIDS 2 - by jay - type help') print('=============================') print('\n\nCytek inc. 02.10.2214') time.sleep(2) print('\nCMBT645 Re-Boot Sequence..') time.sleep(1) print('\nInitalizing Combat D...
true
true
1c16c609831fcdaeee0d697d76319bdeff4d0136
26,582
py
Python
art/classifiers/keras.py
ebubae/adversarial-robustness-toolbox
55efab2c1a60ae14c37b72fe84778355314396ea
[ "MIT" ]
17
2019-09-15T04:00:31.000Z
2021-03-18T08:12:21.000Z
art/classifiers/keras.py
ebubae/adversarial-robustness-toolbox
55efab2c1a60ae14c37b72fe84778355314396ea
[ "MIT" ]
null
null
null
art/classifiers/keras.py
ebubae/adversarial-robustness-toolbox
55efab2c1a60ae14c37b72fe84778355314396ea
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) IBM Corporation 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 without limitation the # rights to use, copy, modify, merge...
45.91019
120
0.630464
from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np import six from art.classifiers.classifier import Classifier logger = logging.getLogger(__name__) class KerasClassifier(Classifier): def __init__(self, model, use_logits=False, channel_index=3...
true
true
1c16c86a19f4b3012ad0fe807e4f72617c3c365c
481
py
Python
test/python/WMCore_t/Agent_t/TestComponentPoller.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
test/python/WMCore_t/Agent_t/TestComponentPoller.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
test/python/WMCore_t/Agent_t/TestComponentPoller.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ _TestComponentPoller_ Poller to test the skeleton """ from WMCore.WorkerThreads.BaseWorkerThread import BaseWorkerThread class TestComponentPoller(BaseWorkerThread): """ _TestComponentPoller_ """ def __init__(self, config): """ __init__ """ ...
20.041667
69
0.634096
from WMCore.WorkerThreads.BaseWorkerThread import BaseWorkerThread class TestComponentPoller(BaseWorkerThread): def __init__(self, config): BaseWorkerThread.__init__(self) def algorithm(self, parameters = None): return
true
true
1c16c8dd1d8ca409309ff62546ca72112329dc9c
12,926
py
Python
mydatamyconsent/model/user_account_financial_transactions_dto_paginated_list.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
mydatamyconsent/model/user_account_financial_transactions_dto_paginated_list.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
5
2021-12-19T10:29:43.000Z
2022-03-31T22:15:37.000Z
mydatamyconsent/model/user_account_financial_transactions_dto_paginated_list.py
mydatamyconsent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
""" My Data My Consent - Developer API Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and upd...
46
469
0.575197
import re import sys from mydatamyconsent.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, Ope...
true
true
1c16c9ff36ca12e18d14dd1cf170bb269abd16e9
59,792
py
Python
airflow/cli/cli_parser.py
kevin0120/airflow
fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd
[ "Apache-2.0" ]
1
2021-03-03T07:00:02.000Z
2021-03-03T07:00:02.000Z
airflow/cli/cli_parser.py
kevin0120/airflow
fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd
[ "Apache-2.0" ]
36
2021-11-26T00:08:49.000Z
2021-11-26T00:09:33.000Z
airflow/cli/cli_parser.py
kevin0120/airflow
fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd
[ "Apache-2.0" ]
3
2020-06-30T02:38:17.000Z
2022-01-19T06:14:08.000Z
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
34.56185
110
0.632576
import argparse import json import os import textwrap from argparse import Action, ArgumentError, RawTextHelpFormatter from functools import lru_cache from typing import Callable, Dict, Iterable, List, NamedTuple, Optional, Union from airflow import settings from airflow.cli.commands.legacy_commands import check_lega...
true
true
1c16ca91cdf577cddab5a7d4e56c1c27627eaf63
8,423
py
Python
backend/server01.py
alexp25/d4w_app
80ea6bdf28932f02ddbd8fcfc6fcbe03de05fb98
[ "MIT" ]
null
null
null
backend/server01.py
alexp25/d4w_app
80ea6bdf28932f02ddbd8fcfc6fcbe03de05fb98
[ "MIT" ]
null
null
null
backend/server01.py
alexp25/d4w_app
80ea6bdf28932f02ddbd8fcfc6fcbe03de05fb98
[ "MIT" ]
null
null
null
# python modules import copy import csv import datetime import gevent import gevent.monkey import json import os import random import string import subprocess import sys import threading import time from dateutil.parser import parse from flask import Flask from flask import jsonify from flask import render_template, se...
33.96371
209
0.643832
import copy import csv import datetime import gevent import gevent.monkey import json import os import random import string import subprocess import sys import threading import time from dateutil.parser import parse from flask import Flask from flask import jsonify from flask import render_template, send_file, session,...
true
true
1c16cbc8f44b09368fc288b5c31c2adb24d99dfe
6,921
py
Python
hyena.py
walpurgisnatch/hyena
9980fe11341b525ada493ad9b30d36d0bd19117d
[ "MIT" ]
null
null
null
hyena.py
walpurgisnatch/hyena
9980fe11341b525ada493ad9b30d36d0bd19117d
[ "MIT" ]
null
null
null
hyena.py
walpurgisnatch/hyena
9980fe11341b525ada493ad9b30d36d0bd19117d
[ "MIT" ]
null
null
null
import requests import re import argparse first = ["%2e/", "%252e/", "%2e%2f", "%2e%c0%af", "%252e%c0%af"] pre_path = ["..;/", "%2e/", "%252e/", "//", "\\", "%5c", "%255c", "pupa/lupa/../../", "pupa/lupa/%2e%2e/%2e%2e/", "pupa/lupa/.%2e/.%2e/", "pupa/lupa/%2e./%2e./", "pupa\lupa\%2e%2e\%2e%2e\\", "pupa%5clupa%5c.%2e%5...
37.209677
847
0.579107
import requests import re import argparse first = ["%2e/", "%252e/", "%2e%2f", "%2e%c0%af", "%252e%c0%af"] pre_path = ["..;/", "%2e/", "%252e/", "//", "\\", "%5c", "%255c", "pupa/lupa/../../", "pupa/lupa/%2e%2e/%2e%2e/", "pupa/lupa/.%2e/.%2e/", "pupa/lupa/%2e./%2e./", "pupa\lupa\%2e%2e\%2e%2e\\", "pupa%5clupa%5c.%2e%5...
true
true
1c16cbfe394ef60c4dd2bd28326088875698596b
60
py
Python
package_eg_test.py
AyeAyeNwe/python-exercises
68c4152e3527c04e5c0f2a6c34f66ad54701d715
[ "MIT" ]
null
null
null
package_eg_test.py
AyeAyeNwe/python-exercises
68c4152e3527c04e5c0f2a6c34f66ad54701d715
[ "MIT" ]
null
null
null
package_eg_test.py
AyeAyeNwe/python-exercises
68c4152e3527c04e5c0f2a6c34f66ad54701d715
[ "MIT" ]
null
null
null
import package_example.ex43 package_example.ex43.convert()
15
30
0.85
import package_example.ex43 package_example.ex43.convert()
true
true
1c16cc73c7446f9dbf75d594695a14ef42514dcb
3,955
py
Python
clang-tools-extra/test/lit.cfg.py
lxbndr/llvm-project
2b715b15f5f4c6dd60f05d1b62f9c404e8b56e34
[ "Apache-2.0" ]
null
null
null
clang-tools-extra/test/lit.cfg.py
lxbndr/llvm-project
2b715b15f5f4c6dd60f05d1b62f9c404e8b56e34
[ "Apache-2.0" ]
null
null
null
clang-tools-extra/test/lit.cfg.py
lxbndr/llvm-project
2b715b15f5f4c6dd60f05d1b62f9c404e8b56e34
[ "Apache-2.0" ]
null
null
null
# -*- Python -*- import os import platform import re import shlex import subprocess import lit.formats import lit.util from lit.llvm import llvm_config # Configuration file for the 'lit' test runner. # name: The name of this test suite. config.name = 'Clang Tools' # testFormat: The test format to use to interpret...
39.55
83
0.683692
import os import platform import re import shlex import subprocess import lit.formats import lit.util from lit.llvm import llvm_config config.name = 'Clang Tools' config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) config.suffixes = ['.c', '.cpp', '.hpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s'...
true
true
1c16cd0d0ad2542e9d2f4ac241acb2f86a553a09
39,680
py
Python
sabnzbd/downloader.py
blakez89/sabnzbd
129d3eaf07e56d982fa5095230b9e702d9a4d6a7
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
1
2019-05-11T00:19:25.000Z
2019-05-11T00:19:25.000Z
sabnzbd/downloader.py
blakez89/sabnzbd
129d3eaf07e56d982fa5095230b9e702d9a4d6a7
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
sabnzbd/downloader.py
blakez89/sabnzbd
129d3eaf07e56d982fa5095230b9e702d9a4d6a7
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python -OO # Copyright 2007-2019 The SABnzbd-Team <team@sabnzbd.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later...
40.949432
134
0.533518
""" sabnzbd.downloader - download engine """ import time import select import logging from threading import Thread, RLock from nntplib import NNTPPermanentError import socket import random import sys import Queue import sabnzbd from sabnzbd.decorators import synchronized, NzbQueueLocker, DOWNLOADER_CV from sabnzbd.c...
false
true
1c16cd6b693c2d513b6be5741ece60aba30068c2
2,166
py
Python
venv/Lib/site-packages/click_threading/monkey.py
jhonniel/Queuing-python
1b117dc7e4b3274b2f8fe72cce4beea363f563ef
[ "MIT" ]
null
null
null
venv/Lib/site-packages/click_threading/monkey.py
jhonniel/Queuing-python
1b117dc7e4b3274b2f8fe72cce4beea363f563ef
[ "MIT" ]
null
null
null
venv/Lib/site-packages/click_threading/monkey.py
jhonniel/Queuing-python
1b117dc7e4b3274b2f8fe72cce4beea363f563ef
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import types import contextlib import inspect from ._compat import PY2, getargspec class FunctionInfo(object): def __init__(self, interactive): self.interactive = interactive _ui_functions = { 'echo_via_pager': FunctionInfo(interactive=True), 'prompt': FunctionInfo(inte...
26.740741
75
0.580332
import types import contextlib import inspect from ._compat import PY2, getargspec class FunctionInfo(object): def __init__(self, interactive): self.interactive = interactive _ui_functions = { 'echo_via_pager': FunctionInfo(interactive=True), 'prompt': FunctionInfo(interactive=True), 'conf...
true
true
1c16ce27721fc13163ffdba764bcd94f80118014
4,188
py
Python
scipy/sparse/csgraph/tests/test_graph_laplacian.py
FRidh/scipy
dabfb4586e0b656b5f6da8b301643b918259e61f
[ "BSD-3-Clause" ]
39
2016-11-08T11:24:30.000Z
2021-11-18T06:50:21.000Z
scipy/sparse/csgraph/tests/test_graph_laplacian.py
FRidh/scipy
dabfb4586e0b656b5f6da8b301643b918259e61f
[ "BSD-3-Clause" ]
5
2021-03-19T08:36:48.000Z
2022-01-13T01:52:34.000Z
scipy/sparse/csgraph/tests/test_graph_laplacian.py
FRidh/scipy
dabfb4586e0b656b5f6da8b301643b918259e61f
[ "BSD-3-Clause" ]
13
2017-04-08T08:03:12.000Z
2021-08-25T08:38:52.000Z
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (run_module_suite, assert_allclose, assert_array_almost_equal, assert...
31.488722
79
0.579035
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (run_module_suite, assert_allclose, assert_array_almost_equal, assert_raises) from scipy import sparse from scipy.sparse import csgraph def _explicit_laplacian(x, normed=False): if sparse.isspar...
true
true
1c16ce27fb0a2bdb3ee3f1790a1562a6613098c3
23
py
Python
python-Learning/p_02.py
JamesKing9/CS-tips
2ec34d43cf6808cf1ab647eefb67a55dcf0086a4
[ "MIT" ]
null
null
null
python-Learning/p_02.py
JamesKing9/CS-tips
2ec34d43cf6808cf1ab647eefb67a55dcf0086a4
[ "MIT" ]
null
null
null
python-Learning/p_02.py
JamesKing9/CS-tips
2ec34d43cf6808cf1ab647eefb67a55dcf0086a4
[ "MIT" ]
null
null
null
print "Hello, Pyhons!"
11.5
22
0.695652
print "Hello, Pyhons!"
false
true
1c16cef18839b3bbb36b218f7b69ad2fb265951e
805
py
Python
big_data_prepartion.py
pythonist2/marketpy
50df49337012cc4049c395b4ed672e2710f22514
[ "MIT" ]
null
null
null
big_data_prepartion.py
pythonist2/marketpy
50df49337012cc4049c395b4ed672e2710f22514
[ "MIT" ]
null
null
null
big_data_prepartion.py
pythonist2/marketpy
50df49337012cc4049c395b4ed672e2710f22514
[ "MIT" ]
null
null
null
from marketpy.preprocessing import * import pandas as pd import os df_all = pd.DataFrame() for file_name in os.listdir("data/indicies"): df = pd.read_csv("data/indicies/" + file_name) X, y =prepare_data_from_stooq(df) X, _, y, _ = train_test_split(X,y, test_size = 0.2) columns = ['open','high','low',...
23
65
0.628571
from marketpy.preprocessing import * import pandas as pd import os df_all = pd.DataFrame() for file_name in os.listdir("data/indicies"): df = pd.read_csv("data/indicies/" + file_name) X, y =prepare_data_from_stooq(df) X, _, y, _ = train_test_split(X,y, test_size = 0.2) columns = ['open','high','low',...
true
true
1c16cfdfa23e2deca78eda0ff7da493149bdf8fd
10,536
py
Python
src/executor.py
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
null
null
null
src/executor.py
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
null
null
null
src/executor.py
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
null
null
null
""" File: Executor Interface Copyright (C) 2021 Oleksii Oleksenko Copyright (C) 2020 Microsoft Corporation SPDX-License-Identifier: MIT """ from abc import ABC, abstractmethod from collections import Counter import subprocess import os.path from helpers import assemble, load_measurement, write_to_pseudo_file, write_t...
40.060837
130
0.573273
from abc import ABC, abstractmethod from collections import Counter import subprocess import os.path from helpers import assemble, load_measurement, write_to_pseudo_file, write_to_pseudo_file_bytes from custom_types import List, Tuple, CombinedHTrace, Dependencies from config import CONF class Executor(ABC): cov...
true
true
1c16d14bcd04b4d40da260be08153e6de044491e
400
py
Python
rankings/migrations/0035_competition_status.py
rubenvanerk/lifesavingrankings
7d3ed8d5011d9de16e4dd8bffe89faa506041350
[ "MIT" ]
5
2018-06-04T05:12:18.000Z
2021-01-24T13:37:41.000Z
rankings/migrations/0035_competition_status.py
rubenvanerk/lifesavingrankings
7d3ed8d5011d9de16e4dd8bffe89faa506041350
[ "MIT" ]
39
2019-12-07T16:07:05.000Z
2021-05-09T10:57:48.000Z
rankings/migrations/0035_competition_status.py
rubenvanerk/lifesavingrankings
7d3ed8d5011d9de16e4dd8bffe89faa506041350
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-05-08 16:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rankings', '0034_individualresult_disqualified'), ] operations = [ migrations.AddField( model_name='competition', na...
21.052632
59
0.6125
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rankings', '0034_individualresult_disqualified'), ] operations = [ migrations.AddField( model_name='competition', name='status', field=models.IntegerFie...
true
true
1c16d2a90a30183f125b2793328f579df86f503d
8,427
py
Python
core/controllers/topic_viewer_test.py
ashu9999/oppia
f0ee3fad4aaf98bf01b325276ecdc4b2e250bdd4
[ "Apache-2.0" ]
1
2020-02-07T08:24:56.000Z
2020-02-07T08:24:56.000Z
core/controllers/topic_viewer_test.py
Ketan-Suthar/oppia
0eed7bb069b55396d0908ba232d8ef4517231dc2
[ "Apache-2.0" ]
null
null
null
core/controllers/topic_viewer_test.py
Ketan-Suthar/oppia
0eed7bb069b55396d0908ba232d8ef4517231dc2
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
43.663212
80
0.614335
from __future__ import absolute_import from __future__ import unicode_literals from constants import constants from core.domain import skill_services from core.domain import story_domain from core.domain import story_services from core.domain import topic_domain from core.domain import topic_services from core.doma...
true
true
1c16d38cbda1303020e157a0084a84e920807596
16,594
py
Python
tensorflow/python/framework/auto_control_deps.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/auto_control_deps.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/auto_control_deps.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.132979
115
0.718513
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.eager import context from tensorflow.python.framework import dtypes as dtypes_module from tensorflow.python.framework import ops from tensorflow.python.framework import sparse_tensor fro...
true
true
1c16d4ec8522c2a3cc82b98ffb703a789b51970f
13,448
py
Python
src/pretix/control/signals.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/control/signals.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/control/signals.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from django.dispatch import Signal from pretix.base.signals import DeprecatedSignal, EventPluginSignal html_page_start = Signal( providing_args=[] ) """ This signal allows you to put code in the beginning of the main page for every page in the backend. You are expected to return HTML. The ``sender`` keyword argu...
41.251534
109
0.759593
from django.dispatch import Signal from pretix.base.signals import DeprecatedSignal, EventPluginSignal html_page_start = Signal( providing_args=[] ) html_head = EventPluginSignal( providing_args=["request"] ) nav_event = EventPluginSignal( providing_args=["request"] ) nav_topbar = Signal( providing...
true
true
1c16d5677db27d7b2e53441a2bfd120635b1812f
1,924
py
Python
src/aoc_day14.py
samuelrothen/advent_of_code_2020
22cfc62314d0d19fe91cd1e606064a8828ef0bc7
[ "MIT" ]
1
2021-01-24T21:17:22.000Z
2021-01-24T21:17:22.000Z
src/aoc_day14.py
samuelrothen/advent_of_code_2020
22cfc62314d0d19fe91cd1e606064a8828ef0bc7
[ "MIT" ]
null
null
null
src/aoc_day14.py
samuelrothen/advent_of_code_2020
22cfc62314d0d19fe91cd1e606064a8828ef0bc7
[ "MIT" ]
null
null
null
# Advent of Code Day 14 import re import itertools def return_sum_mem_part1(data): mem = {} mask = [] for line in data: if 'mask' in line: mask = [(m.start(0), m.group()) for m in re.finditer('\d', line[7:])] elif 'mem' in line: mem_ix, mem_val_int = list(map(int...
32.066667
93
0.522869
import re import itertools def return_sum_mem_part1(data): mem = {} mask = [] for line in data: if 'mask' in line: mask = [(m.start(0), m.group()) for m in re.finditer('\d', line[7:])] elif 'mem' in line: mem_ix, mem_val_int = list(map(int, re.findall('mem\[(\d+)...
true
true
1c16d5a1cf648ccc890af91e4500a837de811065
12,826
py
Python
dc_gan_cifar.py
MijungTheGatsbyPostdoc/SimSiam
d8dd2b01f493d094dca1e7634d3b7c00857b5224
[ "MIT" ]
null
null
null
dc_gan_cifar.py
MijungTheGatsbyPostdoc/SimSiam
d8dd2b01f493d094dca1e7634d3b7c00857b5224
[ "MIT" ]
null
null
null
dc_gan_cifar.py
MijungTheGatsbyPostdoc/SimSiam
d8dd2b01f493d094dca1e7634d3b7c00857b5224
[ "MIT" ]
null
null
null
# originally code is from https://github.com/Ksuryateja/DCGAN-CIFAR10-pytorch/blob/master/gan_cifar.py # I am taking its generator for cifar10 dataset (nov 18, 2021) # used these are parameters in pycharm # --data_dir ../Data/ --log_dir ../logs/ -c configs/train_gen_cifar10_to_cifar10.yaml --ckpt_dir ~/.cache/ --hide_...
39.708978
190
0.635974
import random import torch import torch.nn as nn from arguments import get_args from augmentations import get_aug from models import get_model, get_backbone from tools import AverageMeter from datasets import get_dataset from optimizers import get_optimizer, LR_Scheduler from mmd2_estimator import get_real_mmd_loss f...
true
true