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
f72ff241d91ef455622d3abfa9df1af912c8d07d
6,207
py
Python
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
1
2022-01-30T20:04:51.000Z
2022-01-30T20:04:51.000Z
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
# Form implementation generated from reading ui file 'pyqtgraph/console/template.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form"...
53.973913
114
0.72241
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(739, 497) self.gridLayout = QtWidgets.QGridLayout(Form) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setSpacing(0) s...
true
true
f72ff2fe325c5f00daf0160abd5517c0408afd68
9,889
py
Python
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
import datetime import pprint import random import time from itertools import cycle from phue import Bridge from helper import colour_helper class HueWrapper(object): def __init__(self, bridge_ip='192.168.1.73', light_configs=None, profiles=None): if not light_configs: light_configs = [ ...
35.317857
116
0.522095
import datetime import pprint import random import time from itertools import cycle from phue import Bridge from helper import colour_helper class HueWrapper(object): def __init__(self, bridge_ip='192.168.1.73', light_configs=None, profiles=None): if not light_configs: light_configs = [ ...
true
true
f72ff313165970077760e6b80119c882d0e4e3b3
57,975
py
Python
openconcept/analysis/performance/solver_phases.py
kanekosh/openconcept
f4646d583ba1840540e648601c963adab13cdccf
[ "MIT" ]
null
null
null
openconcept/analysis/performance/solver_phases.py
kanekosh/openconcept
f4646d583ba1840540e648601c963adab13cdccf
[ "MIT" ]
1
2022-01-18T17:02:23.000Z
2022-01-19T19:33:34.000Z
openconcept/analysis/performance/solver_phases.py
eytanadler/openconcept
7878e5725eed78a023136b58250361531c7c7654
[ "MIT" ]
1
2021-11-13T22:40:31.000Z
2021-11-13T22:40:31.000Z
from __future__ import division from openmdao.api import Group, ExplicitComponent, IndepVarComp, BalanceComp, ImplicitComponent import openconcept.api as oc from openconcept.analysis.atmospherics.compute_atmos_props import ComputeAtmosphericProperties from openconcept.analysis.aerodynamics import Lift, StallSpeed from ...
47.952854
228
0.65185
from __future__ import division from openmdao.api import Group, ExplicitComponent, IndepVarComp, BalanceComp, ImplicitComponent import openconcept.api as oc from openconcept.analysis.atmospherics.compute_atmos_props import ComputeAtmosphericProperties from openconcept.analysis.aerodynamics import Lift, StallSpeed from ...
true
true
f72ff337bdeb94f68574412ce3e985fde8a68cf6
1,360
py
Python
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
1
2021-11-28T14:18:16.000Z
2021-11-28T14:18:16.000Z
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
1
2022-02-10T10:53:12.000Z
2022-02-10T10:53:12.000Z
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
null
null
null
from kombu.utils.url import safequote from .base import * # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_ROOT = '/var/www/edumate/static/' STATIC_URL = '/static/' MEDIA_ROOT = '/var/www/edumate/media/' MEDIA_URL = '/media/' # Email # https://docs.django...
27.2
68
0.775735
from kombu.utils.url import safequote from .base import * STATIC_ROOT = '/var/www/edumate/static/' STATIC_URL = '/static/' MEDIA_ROOT = '/var/www/edumate/media/' MEDIA_URL = '/media/' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = config('EMAIL_HOST') EMAIL_HOST_USER = config('EMAIL_HO...
true
true
f72ff53d421b318c306241599d6708aa4cc0e2a0
6,404
py
Python
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool persistence. By default, bitcoind will dump mempool on shutdown and then reload it on sta...
47.088235
207
0.698626
from decimal import Decimal import os import time from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error, wait_until class MempoolPersistTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 3 self.ext...
true
true
f72ff59bda1aa02358d87a57bd001b6bab504743
5,288
py
Python
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
from torch import Tensor from torch import nn from typing import List, Dict import os import json from ..util import import_from_string from collections import OrderedDict from typing import List, Dict, Optional, Union, Tuple class Asym(nn.Sequential): def __init__(self, sub_modules: Dict[str, List[nn.Module]], al...
42.99187
202
0.637103
from torch import Tensor from torch import nn from typing import List, Dict import os import json from ..util import import_from_string from collections import OrderedDict from typing import List, Dict, Optional, Union, Tuple class Asym(nn.Sequential): def __init__(self, sub_modules: Dict[str, List[nn.Module]], al...
true
true
f72ff810f29418ba62e98a1ce7f5672ac06ff9c2
1,005
py
Python
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
84
2019-04-30T17:35:14.000Z
2022-03-20T21:15:41.000Z
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
26
2019-11-07T19:24:36.000Z
2022-02-10T14:18:58.000Z
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
10
2019-05-24T02:20:02.000Z
2022-03-20T14:17:29.000Z
def create_release_notes(): import os path = os.path.dirname(os.path.abspath(__file__)) changelog_filename = os.path.join(path, "../CHANGELOG.md") release_notes_filename = os.path.join(path, "../RELEASE_NOTES.md") with open(changelog_filename, "r") as changelog: with open(release_notes_file...
31.40625
70
0.528358
def create_release_notes(): import os path = os.path.dirname(os.path.abspath(__file__)) changelog_filename = os.path.join(path, "../CHANGELOG.md") release_notes_filename = os.path.join(path, "../RELEASE_NOTES.md") with open(changelog_filename, "r") as changelog: with open(release_notes_file...
true
true
f72ff87bdabef8d7929fc9db97e276b84505f580
1,196
py
Python
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
"""Zoom.us REST API Python Client -- Chat Messages component""" from zoomapi.util import require_keys, Throttled from zoomapi.components import base class ChatMessagesComponentV2(base.BaseComponent): """Component dealing with all chat messages related matters""" @Throttled def list(self, **kwargs): ...
34.171429
111
0.669732
from zoomapi.util import require_keys, Throttled from zoomapi.components import base class ChatMessagesComponentV2(base.BaseComponent): @Throttled def list(self, **kwargs): require_keys(kwargs, "user_id") return self.get_request( "/chat/users/{}/messages".format(kwargs.get("user_i...
true
true
f72ff90f4cf8c111f5cfabc254f6f2eba07babf7
23,978
py
Python
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
26
2021-07-14T10:55:14.000Z
2022-02-25T05:46:42.000Z
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
2
2021-07-12T09:58:00.000Z
2021-12-14T13:04:47.000Z
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
4
2021-08-22T16:41:35.000Z
2022-03-18T06:54:52.000Z
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from . import box_utils from . import center_utils try: from itertools import ifilterfalse except ImportError: # py3k from itertools import filterfalse as ifilterfalse class SigmoidFo...
35.418021
118
0.594378
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from . import box_utils from . import center_utils try: from itertools import ifilterfalse except ImportError: from itertools import filterfalse as ifilterfalse class SigmoidFocalClas...
true
true
f72ff95e1b300049408b355850be32b4312a414b
10,905
py
Python
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
31
2018-08-19T22:34:53.000Z
2022-03-23T13:39:48.000Z
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
21
2018-08-24T11:52:59.000Z
2021-01-30T18:39:47.000Z
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
11
2018-08-20T05:34:06.000Z
2021-12-07T06:53:23.000Z
# -*- coding: utf-8 -*- """ Created on Mon May 7 17:13:25 2018 @author: dorgham """ import networkx as nx from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from nltk.stem import WordNetLemmatizer import matplotlib.pyplot as plt import xml.etree.ElementTree as ET from collections import Ordered...
40.239852
123
0.584411
import networkx as nx from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from nltk.stem import WordNetLemmatizer import matplotlib.pyplot as plt import xml.etree.ElementTree as ET from collections import OrderedDict import codecs import string from nltk.corpus import stopwords from sklearn.metric...
true
true
f72ffbe57a59f3600333518d118a3d3eda4b5c23
5,497
py
Python
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
null
null
null
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
6
2020-10-27T15:50:49.000Z
2021-10-19T14:37:47.000Z
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
3
2020-10-16T11:04:42.000Z
2021-10-19T14:26:52.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Created by: python.exe -m py2exe myscript.py -W mysetup.py from distutils.core import setup import py2exe class Target(object): '''Target is the baseclass for all executables that are created. It defines properties that are shared by all of them. ''' def __...
32.720238
118
0.65272
from distutils.core import setup import py2exe class Target(object): def __init__(self, **kw): self.__dict__.update(kw) def copy(self): return Target(**self.__dict__) def _...
true
true
f72ffc1214ecd15928542a7ea9a9182e72d89e05
798
py
Python
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
import configparser import psycopg2 from sql_queries import create_table_queries, drop_table_queries def drop_tables(cur, conn): ''' Drop the existing tables ''' for query in drop_table_queries: cur.execute(query) conn.commit() def create_tables(cur, conn): ''' Crea...
19
112
0.631579
import configparser import psycopg2 from sql_queries import create_table_queries, drop_table_queries def drop_tables(cur, conn): for query in drop_table_queries: cur.execute(query) conn.commit() def create_tables(cur, conn): for query in create_table_queries: cur.execute(qu...
true
true
f72ffc4b88ea7b559670f1d9a1678141ddbe338d
4,559
py
Python
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
1
2022-03-31T05:07:44.000Z
2022-03-31T05:07:44.000Z
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
null
null
null
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
1
2019-07-04T05:35:42.000Z
2019-07-04T05:35:42.000Z
import math from cereal import log from common.numpy_fast import interp from selfdrive.controls.lib.latcontrol import LatControl, MIN_STEER_SPEED from selfdrive.controls.lib.pid import PIDController from selfdrive.controls.lib.drive_helpers import apply_deadzone from selfdrive.controls.lib.vehicle_model import ACCELER...
47
129
0.733055
import math from cereal import log from common.numpy_fast import interp from selfdrive.controls.lib.latcontrol import LatControl, MIN_STEER_SPEED from selfdrive.controls.lib.pid import PIDController from selfdrive.controls.lib.drive_helpers import apply_deadzone from selfdrive.controls.lib.vehicle_model import ACCELER...
true
true
f72ffc7299c2bfe078237263c5c34c71dccfc1d9
250
py
Python
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
110
2016-11-25T14:25:10.000Z
2022-02-16T08:25:57.000Z
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
86
2016-11-13T10:04:07.000Z
2022-03-11T23:14:01.000Z
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
21
2016-12-06T15:03:44.000Z
2021-12-30T11:38:19.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sciblog.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
22.727273
71
0.772
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sciblog.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
f72ffcc2bb7815a6350f846fc32861403f679efd
7
py
Python
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
#
7
7
0
true
true
f72ffd82aa9586a214a2d9cf5db0f17af8e80cc5
1,026
py
Python
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
import re import pytest from contextlib import contextmanager class AnyObject: def __eq__(self, actual): return True def __ne__(self, other): return False class SuperdictOf: def __init__(self, required_dict): self.required_dict = required_dict def __eq__(self, actual): ...
21.375
64
0.665692
import re import pytest from contextlib import contextmanager class AnyObject: def __eq__(self, actual): return True def __ne__(self, other): return False class SuperdictOf: def __init__(self, required_dict): self.required_dict = required_dict def __eq__(self, actual): ...
true
true
f72ffe71d2e1e836e254e19dc8302d96f10fbef4
12,747
py
Python
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable from pywarpx import picmi # Number of time steps max_steps = 100 # Grid nx = 128 nz = 128 # Domain xmin = 0.e-6 zmin = 0.e-6 xmax = 50.e-6 zmax = 50.e-6 # Cell size dx = (xmax - xmin) / nx dz = (z...
43.65411
117
0.607045
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable from pywarpx import picmi max_steps = 100 nx = 128 nz = 128 xmin = 0.e-6 zmin = 0.e-6 xmax = 50.e-6 zmax = 50.e-6 dx = (xmax - xmin) / nx dz = (zmax - zmin) / nz max_grid_size_x = 64 max_grid_siz...
true
true
f72ffeac425776525d48f18b9e6845cf44684f3c
35,719
py
Python
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
import pandas as pd import datetime import numpy as np import os import re import matplotlib.pyplot as plot import pytz # @timeit (repeat=3,number=10) def EclatedSubPlot(SerieAfterGrpBy,ActivatePlotting,ListOfDateAndTime,Abbreviation): DicoDayOfWeek={ "00":('Mon','Monday'), "01":('Tue','Tuesday'), "02":...
42.777246
213
0.625605
import pandas as pd import datetime import numpy as np import os import re import matplotlib.pyplot as plot import pytz def EclatedSubPlot(SerieAfterGrpBy,ActivatePlotting,ListOfDateAndTime,Abbreviation): DicoDayOfWeek={ "00":('Mon','Monday'), "01":('Tue','Tuesday'), "02":('Wed','Wednesday'), "03":('Thu...
true
true
f73000570bed55023fdcd7e0333417e05cb7f21a
297
py
Python
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
2
2021-07-17T09:30:42.000Z
2021-12-10T07:42:21.000Z
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
null
null
null
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
null
null
null
__author__ = 'Alex Rogozhnikov' __version__ = '0.3.0' class EinopsError(RuntimeError): """ Runtime error thrown by einops """ pass __all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError'] from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
22.846154
84
0.703704
__author__ = 'Alex Rogozhnikov' __version__ = '0.3.0' class EinopsError(RuntimeError): pass __all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError'] from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
true
true
f730008035e6d577e29225eff7316628cc5ad753
68
py
Python
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.append(os.path.dirname(__file__))
8.5
42
0.75
import os import sys sys.path.append(os.path.dirname(__file__))
true
true
f7300106c5722946f16c6d7a68325a64b58c05ce
787
py
Python
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
1
2021-01-18T13:55:40.000Z
2021-01-18T13:55:40.000Z
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
null
null
null
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import numpy as np import pythtb as pt import tbmodels as tb def test_compare_pythtb(): pt_model = pt.tb_model(1, 1, lat=[[1]], orb=[[0], [0.2]]) tb_model = ...
32.791667
91
0.655654
import numpy as np import pythtb as pt import tbmodels as tb def test_compare_pythtb(): pt_model = pt.tb_model(1, 1, lat=[[1]], orb=[[0], [0.2]]) tb_model = tb.Model(dim=1, pos=[[0], [0.2]], uc=[[1]]) pt_model.set_hop(3j, 0, 1, [1]) tb_model.add_hop(3j, 0, 1, [1]) assert np.isclose(pt_model._g...
true
true
f73001805276877dee1c73c528d58c9860590720
10,586
py
Python
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
40.250951
136
0.657472
import proto from google.cloud.aiplatform_v1.types import feature_selector as gca_feature_selector from google.cloud.aiplatform_v1.types import types from google.protobuf import timestamp_pb2 __protobuf__ = proto.module( package="google.cloud.aiplatform.v1", manifest={ "ReadFeatureValuesRequest", ...
true
true
f7300271abe53d1c530313d92118bc1bdad057e3
2,612
py
Python
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
from __future__ import print_function import os import sys from ooni import canonical_bouncer from ooni.report import __version__ from ooni.report import tool from ooni.settings import config from twisted.python import usage class Options(usage.Options): synopsis = """%s [options] upload | status """ % (os.pa...
28.703297
74
0.561256
from __future__ import print_function import os import sys from ooni import canonical_bouncer from ooni.report import __version__ from ooni.report import tool from ooni.settings import config from twisted.python import usage class Options(usage.Options): synopsis = """%s [options] upload | status """ % (os.pa...
true
true
f7300289bf48754135726dad8a8c684a9ab7d495
14,855
py
Python
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
36
2019-10-22T11:44:37.000Z
2022-03-15T21:27:03.000Z
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
6
2020-10-03T15:13:26.000Z
2021-09-25T14:05:50.000Z
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
3
2021-04-26T08:30:46.000Z
2021-08-18T09:04:49.000Z
# encoding: utf-8 from __future__ import unicode_literals import six from django.db.models import Manager from django.db.models.query import QuerySet from .compat import (ANNOTATION_SELECT_CACHE_NAME, ANNOTATION_TO_AGGREGATE_ATTRIBUTES_MAP, chain_query, chain_queryset, ModelIterable, ValuesQuery...
51.401384
120
0.671289
from __future__ import unicode_literals import six from django.db.models import Manager from django.db.models.query import QuerySet from .compat import (ANNOTATION_SELECT_CACHE_NAME, ANNOTATION_TO_AGGREGATE_ATTRIBUTES_MAP, chain_query, chain_queryset, ModelIterable, ValuesQuerySet) from .excepti...
true
true
f73002d98b59c3477dc664163095a60c163f8748
1,765
py
Python
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
import sys def postprocess( infname, outfname, input_size ): """ parse fairseq interactive output, convert script back to native Indic script (in case of Indic languages) and detokenize. infname: fairseq log file outfname: output file of translation (sentences not translated contain the dummy stri...
36.020408
125
0.626629
import sys def postprocess( infname, outfname, input_size ): consolidated_testoutput = [] consolidated_testoutput = [(x, 0.0, "") for x in range(input_size)] temp_testoutput = [] with open(infname, "r", encoding="utf-8") as infile: temp_testoutput = list( map( ...
true
true
f730037de960ab141d2243d99c48b409e7c12847
424
py
Python
services/datalad/tests/test_validator.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
null
null
null
services/datalad/tests/test_validator.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
1
2020-09-25T11:06:37.000Z
2020-09-25T11:06:37.000Z
services/datalad/tests/test_validator.py
adswa/openneuro
64e7fdbeb8b3c567c340b80f22a6134e4ee8070a
[ "MIT" ]
null
null
null
import json from .dataset_fixtures import * from datalad_service.tasks.validator import validate_dataset_sync def test_validator(new_dataset): results = validate_dataset_sync(new_dataset.path, 'HEAD') # new_dataset doesn't pass validation, should return an error assert 'issues' in results assert 'err...
32.615385
77
0.757075
import json from .dataset_fixtures import * from datalad_service.tasks.validator import validate_dataset_sync def test_validator(new_dataset): results = validate_dataset_sync(new_dataset.path, 'HEAD') assert 'issues' in results assert 'errors' in results['issues'] assert results['issues']['errors...
true
true
f73003dbae406346ceffaad933d70e33d38fff14
190
py
Python
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
""" Circles app """ # Django from django.apps import AppConfig class CirclesAppConfig(AppConfig): """ Circles app config. """ name = 'cride.circles' verbose_name = 'Circles'
15.833333
34
0.663158
from django.apps import AppConfig class CirclesAppConfig(AppConfig): name = 'cride.circles' verbose_name = 'Circles'
true
true
f730044e72d0f566ba1c776e68f1ecc503b9cd45
7,888
py
Python
modules/mdebugger/attachment_marker/motionsense.py
MD2Korg/CerebralCortex-DataAnalysis
73f5ea2430bc7c23de422dccb7b65ef9f8917595
[ "BSD-2-Clause" ]
1
2018-04-24T18:11:24.000Z
2018-04-24T18:11:24.000Z
modules/mdebugger/attachment_marker/motionsense.py
Boris69bg/CerebralCortex-DataAnalysis
49565bdff348d69153bd5d3a37e73f1645f82b32
[ "BSD-2-Clause" ]
10
2018-03-13T19:04:09.000Z
2018-05-12T01:40:03.000Z
modules/mdebugger/attachment_marker/motionsense.py
Boris69bg/CerebralCortex-DataAnalysis
49565bdff348d69153bd5d3a37e73f1645f82b32
[ "BSD-2-Clause" ]
42
2017-12-07T17:08:14.000Z
2019-06-02T08:25:12.000Z
# Copyright (c) 2017, MD2K Center of Excellence # - Nasir Ali <nasir.ali08@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above cop...
54.4
132
0.676344
import uuid from collections import OrderedDict from cerebralcortex.cerebralcortex import CerebralCortex from modules.mdebugger.post_processing import get_execution_context, get_annotations from modules.mdebugger.post_processing import store from modules.mdebugger.util import get_stream_days from modules.mdebugger.ut...
true
true
f73004f4a82f8a65d0815fa2c8179029a64348c3
17,171
py
Python
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
42.502475
108
0.632695
from __future__ import division from __future__ import print_function from __future__ import absolute_import import datetime import importlib import shutil import sys import tempfile from dateutil.parser import parse from aiida.backends.utils import is_dbenv_loaded, load_dbenv, BACKEND_SQLA, BACKEND_DJANGO from aiida...
true
true
f73005b31846f4a78636353fe91ff4e0db98bd66
221
pyde
Python
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
def setup(): size(500,500) smooth() background(235) strokeWeight(30) noLoop() def draw(): for i in range(1,8): stroke(20) line(i*50,200,150+(i-1)*50,300)
17
40
0.475113
def setup(): size(500,500) smooth() background(235) strokeWeight(30) noLoop() def draw(): for i in range(1,8): stroke(20) line(i*50,200,150+(i-1)*50,300)
true
true
f73005c3d0ecb0b6aa0d1b17a014e3ce2b1283cd
2,751
py
Python
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-04 13:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import tasks.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_M...
51.90566
206
0.616503
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import tasks.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migratio...
true
true
f73006eb526b889195551e800d11eb06f680327c
5,986
py
Python
adb/windows/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
1
2019-01-17T19:03:17.000Z
2019-01-17T19:03:17.000Z
adb/MACOS/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
2
2017-09-08T20:26:05.000Z
2017-09-08T20:29:07.000Z
adb/windows/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. try: import resource # pylint: disable=import-error except ImportError: resource = None # Not available on all platforms import re from telemetry.cor...
34.011364
86
0.683762
try: import resource except ImportError: resource = None import re from telemetry.core import exceptions from telemetry import decorators from telemetry.internal.platform import platform_backend class LinuxBasedPlatformBackend(platform_backend.PlatformBackend): def GetSystemCommitCharge(self): memi...
true
true
f73008d4776542c97030787b5e4f290a43754608
267
py
Python
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
null
null
null
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
null
null
null
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
1
2022-03-04T16:21:16.000Z
2022-03-04T16:21:16.000Z
from py21cmmc_wv import morlet import numpy as np bw = 50.0 numin = 130.0 N = 736 nu = np.arange(N) * bw/N + numin mid = (nu[0] + nu[-1])/2 spectrum = np.exp(-(nu-mid)**2/ (2*4.0**2)) trnsc, fc, _ = morlet.morlet_transform_c(spectrum, nu) trnsc = np.abs(trnsc)**2
19.071429
54
0.636704
from py21cmmc_wv import morlet import numpy as np bw = 50.0 numin = 130.0 N = 736 nu = np.arange(N) * bw/N + numin mid = (nu[0] + nu[-1])/2 spectrum = np.exp(-(nu-mid)**2/ (2*4.0**2)) trnsc, fc, _ = morlet.morlet_transform_c(spectrum, nu) trnsc = np.abs(trnsc)**2
true
true
f7300951a7ef4c3c8387293955d5b336a64a4701
151,815
py
Python
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. from typing import Any, Callable, Dict, List, Optional, Set, Tuple import copy import os import shutil import sys from django.conf import settings from django.http...
41.856907
200
0.58101
from typing import Any, Callable, Dict, List, Optional, Set, Tuple import copy import os import shutil import sys from django.conf import settings from django.http import HttpRequest, HttpResponse from django.utils.timezone import now as timezone_now from io import StringIO from zerver.models import ( get_client,...
true
true
f730098e8822814319a07f20bdedf1174871a9d9
674
py
Python
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import find_packages, setup NAME = "jupyter-notebook-tools" with open("README.md", "r") as f: readme = f.read() setup( name=NAME, url=f"https://github.com/akuhnregnier/{NAME}", author="Alexander Kuhn-Regnier", author_email="ahf.kuhnregnier@gmail.com", ...
25.923077
78
0.667656
from setuptools import find_packages, setup NAME = "jupyter-notebook-tools" with open("README.md", "r") as f: readme = f.read() setup( name=NAME, url=f"https://github.com/akuhnregnier/{NAME}", author="Alexander Kuhn-Regnier", author_email="ahf.kuhnregnier@gmail.com", long_description=readme,...
true
true
f7300a2ffabcd3bc05da38c7d5de492b1f25e72f
901
py
Python
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets from .models import Product from .serializers import ProductSerializer from core.permissions import MarketOwnerPermission from rest_framework.permissions import IsAuthenticated, AllowAny from rest_framework import filters class ProductViewSet(vi...
34.653846
78
0.746948
from django.shortcuts import render from rest_framework import viewsets from .models import Product from .serializers import ProductSerializer from core.permissions import MarketOwnerPermission from rest_framework.permissions import IsAuthenticated, AllowAny from rest_framework import filters class ProductViewSet(vi...
true
true
f7300b19d159e1cd832307bc71cecb184c4499e1
48,458
py
Python
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.769291
154
0.694725
import os import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import future from google.api_core ...
true
true
f7300bb85137e40f00493456c34280037c0a2f36
273
py
Python
src/oscar/apps/offer/config.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/offer/config.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/offer/config.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class OfferConfig(AppConfig): label = 'offer' name = 'oscar.apps.offer' verbose_name = _('Offer') def ready(self): from . import signals # noqa
22.75
56
0.663004
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class OfferConfig(AppConfig): label = 'offer' name = 'oscar.apps.offer' verbose_name = _('Offer') def ready(self): from . import signals
true
true
f7300c7f3d0d042ee232156f7fea0be53fb5f268
18,769
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_1568efcb71d423db7b9caee1463792cd.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_1568efcb71d423db7b9caee1463792cd.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_1568efcb71d423db7b9caee1463792cd.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# 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, modify,...
45.335749
297
0.644414
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class PassCriteria(Base): __slots__ = () _SDM_NAME = 'passCriteria' _SDM_ATT_MAP = { 'EnableLatencyPassFail': 'enableLatencyPassFail', 'EnablePassFail': 'enablePassFail', ...
true
true
f7300d0ecc7c55bf1cf645207acdfe80dd0197b9
40
py
Python
GAN-man/__init__.py
shauray8/GameGAN-stuff
54eec30e839279b697166d7ad1bbcf0d342f62b3
[ "MIT" ]
null
null
null
GAN-man/__init__.py
shauray8/GameGAN-stuff
54eec30e839279b697166d7ad1bbcf0d342f62b3
[ "MIT" ]
null
null
null
GAN-man/__init__.py
shauray8/GameGAN-stuff
54eec30e839279b697166d7ad1bbcf0d342f62b3
[ "MIT" ]
null
null
null
## right now i know nothing about this
20
39
0.725
true
true
f7300e0e1a30b53883b40f11ba8186a2c62c128e
2,827
py
Python
gw2/gw2_authserver.py
Mixaill/galaxy-integration-gw2
3727c90e340763e61738f8edd97025242ff34946
[ "MIT" ]
20
2019-07-26T10:38:26.000Z
2021-01-31T17:16:45.000Z
gw2/gw2_authserver.py
FriendsOfGalaxy/galaxy-integration-gw2
dbb5cd082f4ebeef502e2185773e1ab36ead7c74
[ "MIT" ]
18
2019-08-01T10:18:00.000Z
2022-03-01T08:10:56.000Z
gw2/gw2_authserver.py
Mixaill/galaxy-integration-gw2
3727c90e340763e61738f8edd97025242ff34946
[ "MIT" ]
4
2019-08-08T16:39:53.000Z
2020-10-17T09:01:47.000Z
# (c) 2019-2020 Mikhail Paulyshka # SPDX-License-Identifier: MIT import os.path import aiohttp import common.mglx_webserver from .gw2_constants import GW2AuthorizationResult class Gw2AuthServer(common.mglx_webserver.MglxWebserver): def __init__(self, gw2api = None): super(Gw2AuthServer, self).__init__...
39.263889
126
0.696498
import os.path import aiohttp import common.mglx_webserver from .gw2_constants import GW2AuthorizationResult class Gw2AuthServer(common.mglx_webserver.MglxWebserver): def __init__(self, gw2api = None): super(Gw2AuthServer, self).__init__() self.__gw2api = gw2api self.add_route('GET',...
true
true
f7300e6ef235606ad3583d99a0c55a99bd82137c
2,108
py
Python
toontown/coghq/FactoryEntityCreator.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/coghq/FactoryEntityCreator.py
AnythingTechPro/Project-Altis
7ead614abdb5072ca06323982de461f4e775d1b3
[ "Apache-2.0" ]
null
null
null
toontown/coghq/FactoryEntityCreator.py
AnythingTechPro/Project-Altis
7ead614abdb5072ca06323982de461f4e775d1b3
[ "Apache-2.0" ]
2
2021-02-25T06:02:05.000Z
2021-06-19T03:11:22.000Z
from otp.level import EntityCreator from toontown.coghq import FactoryLevelMgr from toontown.coghq import PlatformEntity from toontown.coghq import ConveyorBelt from toontown.coghq import GearEntity from toontown.coghq import PaintMixer from toontown.coghq import GoonClipPlane from toontown.coghq import MintProduct fro...
37.642857
66
0.680266
from otp.level import EntityCreator from toontown.coghq import FactoryLevelMgr from toontown.coghq import PlatformEntity from toontown.coghq import ConveyorBelt from toontown.coghq import GearEntity from toontown.coghq import PaintMixer from toontown.coghq import GoonClipPlane from toontown.coghq import MintProduct fro...
false
true
f7301020113d711cc94ea89e1f61b1588ee24669
30,958
py
Python
func.py
jhe8281/openSW
6f3bc5bb34996616a6e862b48e5d164da12344a7
[ "BSD-3-Clause" ]
2
2019-01-16T02:03:41.000Z
2019-03-07T04:43:08.000Z
func.py
jhe8281/openSW
6f3bc5bb34996616a6e862b48e5d164da12344a7
[ "BSD-3-Clause" ]
null
null
null
func.py
jhe8281/openSW
6f3bc5bb34996616a6e862b48e5d164da12344a7
[ "BSD-3-Clause" ]
null
null
null
import email.mime.text import urllib.request import sqlite3 import hashlib import smtplib import bcrypt import flask import json import html import sys import re import os try: import css_html_js_minify except: pass if sys.version_info < (3, 6): import sha3 from set_mark.tool import * from mark import * ...
33.686616
233
0.473093
import email.mime.text import urllib.request import sqlite3 import hashlib import smtplib import bcrypt import flask import json import html import sys import re import os try: import css_html_js_minify except: pass if sys.version_info < (3, 6): import sha3 from set_mark.tool import * from mark import * ...
true
true
f73010c48c4a643298d574ef9fdbe70bed0b28c8
20,916
py
Python
fitapp/tests/test_integration.py
thesignalcenter/django-fitbit
aa17ee5dacbbf4ad1edea85f480829185e6f39f9
[ "Apache-2.0" ]
null
null
null
fitapp/tests/test_integration.py
thesignalcenter/django-fitbit
aa17ee5dacbbf4ad1edea85f480829185e6f39f9
[ "Apache-2.0" ]
null
null
null
fitapp/tests/test_integration.py
thesignalcenter/django-fitbit
aa17ee5dacbbf4ad1edea85f480829185e6f39f9
[ "Apache-2.0" ]
2
2018-06-21T20:12:01.000Z
2019-06-11T23:32:07.000Z
import json import time from collections import OrderedDict from datetime import datetime import requests_mock from django.conf import settings from django.contrib import messages from django.contrib.auth.models import AnonymousUser from django.http import HttpRequest from django.test.utils import override_settings fr...
41.335968
81
0.672117
import json import time from collections import OrderedDict from datetime import datetime import requests_mock from django.conf import settings from django.contrib import messages from django.contrib.auth.models import AnonymousUser from django.http import HttpRequest from django.test.utils import override_settings fr...
true
true
f730117870c82072f11be34d8f41060542937d2d
2,060
py
Python
otcextensions/tests/functional/sdk/vpc/v1/test_vpc.py
artem-lifshits/python-otcextensions
2021da124f393e0429dd5913a3bc635e6143ba1e
[ "Apache-2.0" ]
10
2018-03-03T17:59:59.000Z
2020-01-08T10:03:00.000Z
otcextensions/tests/functional/sdk/vpc/v1/test_vpc.py
artem-lifshits/python-otcextensions
2021da124f393e0429dd5913a3bc635e6143ba1e
[ "Apache-2.0" ]
39
2018-03-26T14:43:23.000Z
2020-02-07T16:42:53.000Z
otcextensions/tests/functional/sdk/vpc/v1/test_vpc.py
artem-lifshits/python-otcextensions
2021da124f393e0429dd5913a3bc635e6143ba1e
[ "Apache-2.0" ]
9
2018-03-27T09:17:40.000Z
2019-08-07T12:53:49.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
32.1875
75
0.655825
import uuid from openstack import _log from otcextensions.sdk.vpc.v1 import vpc from otcextensions.tests.functional import base _logger = _log.setup_logging('openstack') class TestService(base.BaseFunctionalTest): ID = None uuid = uuid.uuid4().hex[:8] def setUp(self): super(TestService, self)....
true
true
f73012160ab63e97ce0cba976dae618df8d31d23
15,096
py
Python
src/python/org/cassandra/geo_maps/geo_maps.py
cassandra/geo_maps
0257bd73456f9312070e3f7627effee30b73fdea
[ "MIT" ]
null
null
null
src/python/org/cassandra/geo_maps/geo_maps.py
cassandra/geo_maps
0257bd73456f9312070e3f7627effee30b73fdea
[ "MIT" ]
null
null
null
src/python/org/cassandra/geo_maps/geo_maps.py
cassandra/geo_maps
0257bd73456f9312070e3f7627effee30b73fdea
[ "MIT" ]
null
null
null
from dataclasses import dataclass import math from typing import List from .display_bounds import DisplayBounds from .geo_bounds import GeoBounds from .view_box import ViewBox from . import utils @dataclass class AlbersMapProjection: # Ref: https://en.wikipedia.org/wiki/Albers_projection # The center o...
31.58159
118
0.624338
from dataclasses import dataclass import math from typing import List from .display_bounds import DisplayBounds from .geo_bounds import GeoBounds from .view_box import ViewBox from . import utils @dataclass class AlbersMapProjection: reference_longitude_deg : float reference_latitude_deg ...
true
true
f7301234057765dcbe4ab1b5008caded738d56b6
5,879
py
Python
src/sadie/airr/igblast/germline.py
jwillis0720/sadie
d289ae68f06f5698ee40ffc1757e1b8aa85f1175
[ "MIT" ]
9
2020-12-22T19:14:01.000Z
2022-03-17T04:34:06.000Z
src/sadie/airr/igblast/germline.py
jwillis0720/sadie
d289ae68f06f5698ee40ffc1757e1b8aa85f1175
[ "MIT" ]
32
2020-12-28T07:46:44.000Z
2022-03-31T01:25:01.000Z
src/sadie/airr/igblast/germline.py
jwillis0720/sadie
d289ae68f06f5698ee40ffc1757e1b8aa85f1175
[ "MIT" ]
2
2021-07-30T16:44:46.000Z
2022-01-12T20:15:17.000Z
import os import warnings from pathlib import Path # package/module level from sadie.reference.reference import YamlRef from sadie.airr.igblast.igblast import ensure_prefix_to class GermlineData: """ The germline data paths are extremely cumbersome to workwith. This class will abstract away their paths to ma...
31.607527
146
0.610478
import os import warnings from pathlib import Path from sadie.reference.reference import YamlRef from sadie.airr.igblast.igblast import ensure_prefix_to class GermlineData: def __init__( self, species: str, database: str = "imgt", receptor: str = "Ig", database_dir: str =...
true
true
f7301314cf1642769e6fb9225052147fc23be5cb
996
py
Python
cluster.py
vgp314/Udacity-Arvato-Identify-Customer-Segments
6be1d4f1eeac391c17c70fdf584bdc4813f80fd8
[ "ADSL" ]
1
2020-05-21T23:56:57.000Z
2020-05-21T23:56:57.000Z
cluster.py
vgp314/Udacity-Arvato-Identify-Customer-Segments
6be1d4f1eeac391c17c70fdf584bdc4813f80fd8
[ "ADSL" ]
null
null
null
cluster.py
vgp314/Udacity-Arvato-Identify-Customer-Segments
6be1d4f1eeac391c17c70fdf584bdc4813f80fd8
[ "ADSL" ]
null
null
null
from sklearn.cluster import KMeans from sklearn.cluster import MiniBatchKMeans import matplotlib.pyplot as plt def plot_clustering(data): ''' Definition: This function plot the squared error for the clustered points args: data to be clusterd returns: None ''' cost =[] max_clusters = 20 for i ...
21.652174
72
0.702811
from sklearn.cluster import KMeans from sklearn.cluster import MiniBatchKMeans import matplotlib.pyplot as plt def plot_clustering(data): cost =[] max_clusters = 20 for i in range(2, max_clusters): print("Analysing ", i, " clusters") KM = MiniBatchKMeans(n_clusters = i,batch_size=20000) KM.fit(dat...
true
true
f730132751b666d6cb1f40177578d5b53a823707
4,202
py
Python
Main.py
Serdobe/Markus
725538666f81a11361b90e57fad2a00cb9888685
[ "MIT" ]
null
null
null
Main.py
Serdobe/Markus
725538666f81a11361b90e57fad2a00cb9888685
[ "MIT" ]
null
null
null
Main.py
Serdobe/Markus
725538666f81a11361b90e57fad2a00cb9888685
[ "MIT" ]
null
null
null
# MAIN SCRIPT """ This script computes all the biological experiments. To run it is necessary to load the Function_Files script that contains all the functions. """ import os import multiprocessing from multiprocessing import Pool # Set work directory: os.chdir(r"C:\Users\Sergio\Desktop\Markus_Project") import Funct...
30.671533
85
0.73584
import os import multiprocessing from multiprocessing import Pool os.chdir(r"C:\Users\Sergio\Desktop\Markus_Project") import Functions_Files network = "systematic_PPI_BioGRID" technique_1 = "GCV-all" technique_2 = "GCV-O+" technique_3 = "triangle" technique_4 = "GDV" enrichemnt_1 = "BP" enrichemnt_2 = "C...
true
true
f73013d5b899b1bc75fe9a03e46f38591a6f58b9
2,287
py
Python
userbot/plugins/gbun.py
Aliensuniquebot/CatUserbot
93561a620fc1198c6fe6c259412088f4bc81d97b
[ "MIT" ]
1
2020-07-18T07:42:58.000Z
2020-07-18T07:42:58.000Z
userbot/plugins/gbun.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
userbot/plugins/gbun.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
2
2020-06-25T11:14:50.000Z
2021-04-04T13:49:13.000Z
# This is a troll indeed ffs *facepalm* import asyncio from telethon import events from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="gbun")) async def gbun(event): if event.fwd_from: ...
42.351852
255
0.594666
import asyncio from telethon import events from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="gbun")) async def gbun(event): if event.fwd_from: return gbunVar = event.text ...
true
true
f7301463f9c4beb4ba5e2fac1fb2efbd03eeb42b
2,697
py
Python
projects/PointRend/point_rend/coarse_mask_head.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
1
2020-10-09T02:27:13.000Z
2020-10-09T02:27:13.000Z
projects/PointRend/point_rend/coarse_mask_head.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
null
null
null
projects/PointRend/point_rend/coarse_mask_head.py
tkhe/tkdetection
54e6c112ef2930e755f457e38449736f5743a9ea
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from tkdet.layers import Conv2d from tkdet.layers import ShapeSpec from tkdet.models.roi_head.mask_head import MASK_HEAD_REGISTRY from tkdet.utils import weight_init __all__ = ["CoarseMaskHead"] @MASK_HEAD_REGISTRY.register() class CoarseMaskHead(nn...
32.493976
97
0.622914
import torch import torch.nn as nn import torch.nn.functional as F from tkdet.layers import Conv2d from tkdet.layers import ShapeSpec from tkdet.models.roi_head.mask_head import MASK_HEAD_REGISTRY from tkdet.utils import weight_init __all__ = ["CoarseMaskHead"] @MASK_HEAD_REGISTRY.register() class CoarseMaskHead(nn...
true
true
f730147e7eb4322f1a6d2019bd8d168aab36bec1
3,924
py
Python
adiscorduser/settings/mock_prod.py
ADiscordUser/adiscorduser-site
af6eb58ab528fddba82b8c65bfdd06b6663333cc
[ "MIT" ]
2
2021-03-06T02:21:35.000Z
2021-03-06T09:34:57.000Z
adiscorduser/settings/mock_prod.py
ADiscordUser/adiscorduser-site
af6eb58ab528fddba82b8c65bfdd06b6663333cc
[ "MIT" ]
null
null
null
adiscorduser/settings/mock_prod.py
ADiscordUser/adiscorduser-site
af6eb58ab528fddba82b8c65bfdd06b6663333cc
[ "MIT" ]
null
null
null
""" Django settings for adiscorduser project. Generated by 'django-admin startproject' using Django 3.0.7. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import ...
23.926829
91
0.66947
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '' DEBUG = False ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'core.apps.CoreConfig', 'uploader.apps.UploaderConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contr...
true
true
f73014c18015c10c4a57a92b8fba96062dd8c405
110
py
Python
runtest.py
krerkkiat/word-fusion
54074539b5255830b700c5de185e6dded8f3aec4
[ "MIT" ]
null
null
null
runtest.py
krerkkiat/word-fusion
54074539b5255830b700c5de185e6dded8f3aec4
[ "MIT" ]
null
null
null
runtest.py
krerkkiat/word-fusion
54074539b5255830b700c5de185e6dded8f3aec4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- '''A module to run testcaes.''' import unittest from tests import * unittest.main()
13.75
31
0.645455
import unittest from tests import * unittest.main()
true
true
f7301503bf0efbff166667ede074659aa5f11e70
391
py
Python
Twitter/wsgi.py
sonus21/MiniTwitter
b62c0c540c1726fc7e6197b33514d7af15f1b58e
[ "BSD-2-Clause" ]
null
null
null
Twitter/wsgi.py
sonus21/MiniTwitter
b62c0c540c1726fc7e6197b33514d7af15f1b58e
[ "BSD-2-Clause" ]
null
null
null
Twitter/wsgi.py
sonus21/MiniTwitter
b62c0c540c1726fc7e6197b33514d7af15f1b58e
[ "BSD-2-Clause" ]
null
null
null
""" WSGI config for Twitter project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Twitter.settings") application = get_wsgi_application()
true
true
f730151b01f0716512edaac7c34300146b453531
5,477
py
Python
docs/conf.py
agaveplatform/agavepy
c2b39fdf60648f7025234f7aa175af873ef0ff75
[ "BSD-3-Clause" ]
16
2015-07-24T16:54:23.000Z
2020-10-18T23:10:37.000Z
docs/conf.py
agaveplatform/agavepy
c2b39fdf60648f7025234f7aa175af873ef0ff75
[ "BSD-3-Clause" ]
77
2015-06-11T22:08:10.000Z
2020-09-09T19:25:27.000Z
docs/conf.py
agaveplatform/agavepy
c2b39fdf60648f7025234f7aa175af873ef0ff75
[ "BSD-3-Clause" ]
24
2015-11-05T20:32:48.000Z
2022-01-26T22:05:53.000Z
# -*- coding: utf-8 -*- # # AgavePy documentation build configuration file, created by # sphinx-quickstart on Mon Feb 5 11:08:11 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
30.427778
79
0.680117
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'AgavePy' copyright = u'2018- Texas Advanced Computing Center' author = u'Texas Advanced Computing Center' # |version| and |release|, also used in various other...
true
true
f73017628abc5a648c3b0d3f76094d50e2de040a
8,111
py
Python
contrib/trainer/dream_tf/layers/policy_head.py
Chicoryn/dream-go
6a4b71d7e1fcc28110ba859c0a2b59c10041c083
[ "Apache-2.0" ]
46
2017-12-08T01:40:08.000Z
2022-02-07T12:56:14.000Z
contrib/trainer/dream_tf/layers/policy_head.py
Chicoryn/dream-go
6a4b71d7e1fcc28110ba859c0a2b59c10041c083
[ "Apache-2.0" ]
56
2017-12-28T04:00:31.000Z
2022-03-20T12:39:39.000Z
contrib/trainer/dream_tf/layers/policy_head.py
Chicoryn/dream-go
6a4b71d7e1fcc28110ba859c0a2b59c10041c083
[ "Apache-2.0" ]
8
2018-02-01T13:12:32.000Z
2020-05-11T04:12:25.000Z
# Copyright (c) 2019 Karl Sundequist Blomdahl <karl.sundequist.blomdahl@gmail.com> # # 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...
66.483607
122
0.633461
import numpy as np import tensorflow as tf from .batch_norm import batch_norm_conv2d from .dense import dense from .recompute_grad import recompute_grad def policy_head(x, mode, params): num_channels = params['num_channels'] num_samples = params['num_samples'] def _forward(x, is_recomputing=False): ...
true
true
f73017774feaf0d8d33dce061c23d77e28fb2da8
1,072
py
Python
aidistillery/models/fasttext_wrapper.py
TheMTank/arxiv-summariser
db4f1e42bcc9185e197a00a18e280a4a3011453c
[ "MIT" ]
17
2018-11-26T23:06:20.000Z
2022-01-18T21:43:17.000Z
aidistillery/models/fasttext_wrapper.py
TheMTank/arxiv-summariser
db4f1e42bcc9185e197a00a18e280a4a3011453c
[ "MIT" ]
3
2018-11-27T12:17:20.000Z
2019-02-05T11:40:44.000Z
aidistillery/models/fasttext_wrapper.py
TheMTank/arxiv-summariser
db4f1e42bcc9185e197a00a18e280a4a3011453c
[ "MIT" ]
3
2019-03-06T10:14:08.000Z
2020-01-21T17:26:20.000Z
import logging from gensim.models import fasttext from aidistillery import file_handling class FastTextWrapper: def __init__(self, sentences, use_bf = True, dimension=100, window=5, min_count=5, workers=4, sg=0, iterations=5, type="fasttext", dataset = ""): logging.info("FastText Wrapper I...
29.777778
117
0.606343
import logging from gensim.models import fasttext from aidistillery import file_handling class FastTextWrapper: def __init__(self, sentences, use_bf = True, dimension=100, window=5, min_count=5, workers=4, sg=0, iterations=5, type="fasttext", dataset = ""): logging.info("FastText Wrapper I...
true
true
f730187437fb8528dba378747c162f34dd4029e0
270
py
Python
subprocess_audio_scripts/success_bad_form.py
colesteere/PT-Exercise-Feedback
974b6e441bc096d691bd4abd490cfab165560512
[ "Apache-2.0" ]
null
null
null
subprocess_audio_scripts/success_bad_form.py
colesteere/PT-Exercise-Feedback
974b6e441bc096d691bd4abd490cfab165560512
[ "Apache-2.0" ]
null
null
null
subprocess_audio_scripts/success_bad_form.py
colesteere/PT-Exercise-Feedback
974b6e441bc096d691bd4abd490cfab165560512
[ "Apache-2.0" ]
null
null
null
import pyttsx3 # from run_bicep_curl import bicepCount import sys engine = pyttsx3.init() voices = engine.getProperty("voices") engine.setProperty("rate", 165) engine.setProperty("voice", "english-us") engine.say("Number {}.".format(sys.argv[1])) engine.runAndWait()
20.769231
44
0.748148
import pyttsx3 import sys engine = pyttsx3.init() voices = engine.getProperty("voices") engine.setProperty("rate", 165) engine.setProperty("voice", "english-us") engine.say("Number {}.".format(sys.argv[1])) engine.runAndWait()
true
true
f73019c9ad078a6db358a139a1c9a8db4ff33165
2,259
py
Python
newdust/graindist/composition/cmdrude.py
eblur/newdust
7e843ae2604a844826606ea04c459694fdd5c178
[ "BSD-2-Clause" ]
4
2018-02-04T19:04:01.000Z
2022-02-09T04:11:18.000Z
newdust/graindist/composition/cmdrude.py
eblur/newdust
7e843ae2604a844826606ea04c459694fdd5c178
[ "BSD-2-Clause" ]
21
2017-08-15T21:13:42.000Z
2021-12-23T20:07:24.000Z
newdust/graindist/composition/cmdrude.py
eblur/newdust
7e843ae2604a844826606ea04c459694fdd5c178
[ "BSD-2-Clause" ]
1
2021-01-28T18:29:12.000Z
2021-01-28T18:29:12.000Z
import numpy as np from newdust import constants as c __all__ = ['CmDrude'] RHO_DRUDE = 3.0 # g cm^-3 LAM_MAX = c.hc / 0.01 # maximal wavelength that we will allow for RG-Drude class CmDrude(object): """ | **ATTRIBUTES** | cmtype : 'Drude' | rho : grain density [g cm^-3] | citation : A st...
35.296875
167
0.558212
import numpy as np from newdust import constants as c __all__ = ['CmDrude'] RHO_DRUDE = 3.0 LAM_MAX = c.hc / 0.01 class CmDrude(object): def __init__(self, rho=RHO_DRUDE): self.cmtype = 'Drude' self.rho = rho self.citation = "Using the Drude approximation.\nBohren, C. F. & Huffma...
true
true
f7301aac92ea6041e0cee9eb39608de909e9d91c
6,055
py
Python
tests/doc_test/doc_export_id/conf.py
David-Le-Nir/sphinxcontrib-needs
fe809445505fa1e9bf5963eab1d6283dad405e92
[ "MIT" ]
null
null
null
tests/doc_test/doc_export_id/conf.py
David-Le-Nir/sphinxcontrib-needs
fe809445505fa1e9bf5963eab1d6283dad405e92
[ "MIT" ]
2
2022-02-13T19:49:18.000Z
2022-02-13T19:49:18.000Z
tests/doc_test/doc_export_id/conf.py
David-Le-Nir/sphinxcontrib-needs
fe809445505fa1e9bf5963eab1d6283dad405e92
[ "MIT" ]
null
null
null
# # needs test docs documentation build configuration file, created by # sphinx-quickstart on Tue Mar 28 11:37:14 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration...
32.553763
118
0.647399
import os import sys sys.path.insert(0, os.path.abspath("../../sphinxcontrib")) extensions = ["sphinxcontrib.needs", "sphinxcontrib.plantuml"] needs_types = [ {"directive": "story", "title": "User Story", "prefix": "US_", "color": "#BFD8D2", "style": "node"}, {"directive": "spec", "title": "Specification...
true
true
f7301c822967e62a7a90c57cb1b15bfd69425390
1,409
py
Python
pyganalytics/extract.py
dacker-team/pyganalytics
e64eedc582ddd31cc9534cf414d1734b4f512f9e
[ "BSD-2-Clause" ]
6
2018-05-07T14:33:32.000Z
2019-12-05T12:58:24.000Z
pyganalytics/extract.py
dacker-team/pyganalytics
e64eedc582ddd31cc9534cf414d1734b4f512f9e
[ "BSD-2-Clause" ]
1
2020-02-17T09:24:54.000Z
2020-02-17T09:24:54.000Z
pyganalytics/extract.py
dacker-team/pyganalytics
e64eedc582ddd31cc9534cf414d1734b4f512f9e
[ "BSD-2-Clause" ]
null
null
null
def get_metrics(response): """ Extract asked metrics from api response @list_metrics : list of dict """ list_metrics = [] for i in response['reports'][0]['columnHeader']['metricHeader']['metricHeaderEntries']: list_metrics.append(i['name']) return list_metrics def get_dimensions(re...
26.092593
91
0.584102
def get_metrics(response): list_metrics = [] for i in response['reports'][0]['columnHeader']['metricHeader']['metricHeaderEntries']: list_metrics.append(i['name']) return list_metrics def get_dimensions(response): return response['reports'][0]['columnHeader']['dimensions'] def extract_api_da...
true
true
f7301e348946657ef9cc15b2a18a1e18c5bb9a53
1,556
py
Python
Graph/P02_DepthFirstSearch.py
Abhishekkumar001/Data-Structures-using-Python-master
b17b1f50032f1460000f411e22a419675a0c08dc
[ "MIT" ]
null
null
null
Graph/P02_DepthFirstSearch.py
Abhishekkumar001/Data-Structures-using-Python-master
b17b1f50032f1460000f411e22a419675a0c08dc
[ "MIT" ]
null
null
null
Graph/P02_DepthFirstSearch.py
Abhishekkumar001/Data-Structures-using-Python-master
b17b1f50032f1460000f411e22a419675a0c08dc
[ "MIT" ]
null
null
null
class Graph(): def __init__(self): self.vertex = {} # for printing the Graph vertexes def printGraph(self): print(self.vertex) for i in self.vertex.keys(): print(i,' -> ', ' -> '.join([str(j) for j in self.vertex[i]])) # for adding the edge beween two vertexes d...
25.933333
74
0.539846
class Graph(): def __init__(self): self.vertex = {} def printGraph(self): print(self.vertex) for i in self.vertex.keys(): print(i,' -> ', ' -> '.join([str(j) for j in self.vertex[i]])) def addEdge(self, fromVertex, toVertex): if fromVertex in sel...
true
true
f7301e8a0de80422b08e8287165f800e2b77df36
29,295
py
Python
perfkitbenchmarker/benchmark_spec.py
sachinpatkar/PerfKitBenchmarker
ed2898278244d71501de87bb181d50b3561dcf44
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/benchmark_spec.py
sachinpatkar/PerfKitBenchmarker
ed2898278244d71501de87bb181d50b3561dcf44
[ "Apache-2.0" ]
1
2021-03-26T00:41:05.000Z
2021-03-26T00:41:05.000Z
perfkitbenchmarker/benchmark_spec.py
sachinpatkar/PerfKitBenchmarker
ed2898278244d71501de87bb181d50b3561dcf44
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 PerfKitBenchmarker 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 appli...
37.557692
80
0.697901
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import copy import datetime import importlib import logging import os import pickle import threading import uuid from perfkitbenchmarker import benchmark_status from perfkitbenchmarker impor...
true
true
f7301e9a6d3cfd1a5e7377df11cefe34a6c0eeb6
251
py
Python
orio/validators/__init__.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
6
2017-04-19T08:49:20.000Z
2020-12-18T16:13:28.000Z
orio/validators/__init__.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
null
null
null
orio/validators/__init__.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
1
2020-12-18T16:14:45.000Z
2020-12-18T16:14:45.000Z
from .base import get_chromosome_size_path # noqa from .analysis import AnalysisValidator # noqa from .bigwig import BigWigValidator # noqa from .feature_list import FeatureListValidator # noqa from .sort_vector import SortVectorValidator # noqa
41.833333
54
0.820717
from .base import get_chromosome_size_path from .analysis import AnalysisValidator from .bigwig import BigWigValidator from .feature_list import FeatureListValidator from .sort_vector import SortVectorValidator
true
true
f7301f02b847c99bc61b46703e6c682dfcb86ed7
2,745
py
Python
bidobe/astunit.py
pbrus/binary-doppler-beaming
fb7b8e58d36da41759d643a58270a76f61bd5c90
[ "MIT" ]
1
2018-06-19T18:35:55.000Z
2018-06-19T18:35:55.000Z
bidobe/astunit.py
pbrus/binary-doppler-beaming
fb7b8e58d36da41759d643a58270a76f61bd5c90
[ "MIT" ]
null
null
null
bidobe/astunit.py
pbrus/binary-doppler-beaming
fb7b8e58d36da41759d643a58270a76f61bd5c90
[ "MIT" ]
null
null
null
""" Store physical constants and calculate astronomical units from and to the International System of Units. """ class UnitsConverter: """ UnitsConverter converts different astronomical units from and to the International System of Units (SI). """ # All constants in SI units. G = 6.67408e-11...
30.5
74
0.660109
class UnitsConverter: G = 6.67408e-11 LIGHT_SPEED = 2.99792458e8 PLANCK_CONSTANT = 6.62606979e-34 BOLTZMANN_CONSTANT = 1.38064852e-23 STEFAN_BOLTZMANN_CONSTANT = 5.670367e-8 SUN_MASS = 1.9884e30 SUN_RADIUS = 6.957e8 AU = 1.49597e11 PARSEC = 3.086e16 DAY = 86400 MINUTE ...
true
true
f7301f8356df84dbab174e8675eb84f92ee3ede7
13,286
py
Python
DaisyXMusic/modules/song.py
skypar/NITIN_VC__MUSIC
d09f303018ab51bd1b7266ba339e3325520fe429
[ "Unlicense" ]
null
null
null
DaisyXMusic/modules/song.py
skypar/NITIN_VC__MUSIC
d09f303018ab51bd1b7266ba339e3325520fe429
[ "Unlicense" ]
null
null
null
DaisyXMusic/modules/song.py
skypar/NITIN_VC__MUSIC
d09f303018ab51bd1b7266ba339e3325520fe429
[ "Unlicense" ]
null
null
null
# Daisyxmusic (Telegram bot project ) # Copyright (C) 2021 Inukaasith # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ve...
31.187793
129
0.594084
from __future__ import unicode_literals import asyncio import math import os import time from random import randint from urllib.parse import urlparse import aiofiles import aiohttp import requests import wget import youtube_dl from pyrogram import Client, filters from pyrogram.errors import FloodWait, MessageNotM...
true
true
f7301f8cc870b348e9ccc730cb09c52bb390f47c
2,406
py
Python
src/ast_toolbox/mcts/tree_plot.py
hdelecki/AdaptiveStressTestingToolbox
184d7d7f1b4acb65eecb749e3c3a78cbcfc3c4ed
[ "MIT" ]
29
2019-01-09T23:56:35.000Z
2022-03-18T03:41:10.000Z
src/ast_toolbox/mcts/tree_plot.py
hdelecki/AdaptiveStressTestingToolbox
184d7d7f1b4acb65eecb749e3c3a78cbcfc3c4ed
[ "MIT" ]
39
2019-01-10T00:32:26.000Z
2022-03-12T00:29:05.000Z
src/ast_toolbox/mcts/tree_plot.py
hdelecki/AdaptiveStressTestingToolbox
184d7d7f1b4acb65eecb749e3c3a78cbcfc3c4ed
[ "MIT" ]
11
2019-01-10T08:11:47.000Z
2021-12-28T15:56:02.000Z
import uuid import pydot def get_root(tree): """Get the root node of the tree. Parameters ---------- tree : dict The tree. Returns ---------- s : :py:class:`ast_toolbox.mcts.AdaptiveStressTesting.ASTState` The root state. """ for s in tree.keys(): if s.pa...
24.30303
124
0.525769
import uuid import pydot def get_root(tree): for s in tree.keys(): if s.parent is None: return s def s2node(s, tree): if s in tree.keys(): return pydot.Node(str(uuid.uuid4()), label='n=' + str(tree[s].n)) else: return None def add_children(s, s_node, tree, graph, d...
true
true
f7302001cebe3ed8119fa24d93d0e279303b50c9
1,169
py
Python
soctrack/utils.py
kcsry/soctrack
b8cfa8aefab98f8daeea0cafa10932f67bcda9dc
[ "MIT" ]
null
null
null
soctrack/utils.py
kcsry/soctrack
b8cfa8aefab98f8daeea0cafa10932f67bcda9dc
[ "MIT" ]
1
2022-02-21T19:16:21.000Z
2022-02-21T19:16:21.000Z
soctrack/utils.py
kcsry/soctrack
b8cfa8aefab98f8daeea0cafa10932f67bcda9dc
[ "MIT" ]
null
null
null
import re import time from django.conf import settings from django.utils.timezone import make_aware, make_naive, utc re_pattern = re.compile('[^\u0000-\uD7FF\uE000-\uFFFF]+', re.UNICODE) def sanitize_unicode(u): # We may not be able to store all special characters thanks # to MySQL's boneheadedness, so acce...
27.186047
79
0.640719
import re import time from django.conf import settings from django.utils.timezone import make_aware, make_naive, utc re_pattern = re.compile('[^\u0000-\uD7FF\uE000-\uFFFF]+', re.UNICODE) def sanitize_unicode(u): # in the cached data fields. return re_pattern.sub(' ', u) def could_be_utc(dt): i...
true
true
f73021df6f3092bb9478c485785dab873f73a920
7,244
py
Python
pynodegl-utils/pynodegl_utils/misc.py
gopro/gopro-lib-node.gl
60d163cf65385b772f1d83d125f0bfe09db5352b
[ "Apache-2.0" ]
45
2017-02-07T13:13:52.000Z
2022-03-18T07:12:39.000Z
pynodegl-utils/pynodegl_utils/misc.py
mrobertseidowsky-gpsw/gopro-lib-node.gl
fbe427e4ea108468a63cde5920cf6f6ce03478bc
[ "Apache-2.0" ]
148
2017-02-02T18:35:32.000Z
2022-03-28T13:53:22.000Z
pynodegl-utils/pynodegl_utils/misc.py
mrobertseidowsky-gpsw/gopro-lib-node.gl
fbe427e4ea108468a63cde5920cf6f6ce03478bc
[ "Apache-2.0" ]
28
2017-02-01T10:06:47.000Z
2022-03-18T07:12:26.000Z
# # Copyright 2016 GoPro Inc. # # 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 ...
33.077626
104
0.609194
import os import os.path as op import tempfile import platform import math import inspect import json import subprocess import random import pynodegl as ngl from collections import namedtuple def scene(**controls): def real_decorator(scene_func): def func_wrapper(idict=None, **extra_args): if...
true
true
f73022031f62389d37c109bce546ac2a6294bc50
6,377
py
Python
main_pretrain.py
xwyzsn/solo-learn
16d021d8053439a3de205337ab2a11d191500b09
[ "MIT" ]
693
2021-05-31T15:48:32.000Z
2022-03-31T17:12:46.000Z
main_pretrain.py
xwyzsn/solo-learn
16d021d8053439a3de205337ab2a11d191500b09
[ "MIT" ]
151
2021-06-15T00:22:57.000Z
2022-03-27T15:17:02.000Z
main_pretrain.py
xwyzsn/solo-learn
16d021d8053439a3de205337ab2a11d191500b09
[ "MIT" ]
79
2021-06-02T10:31:15.000Z
2022-03-25T01:25:09.000Z
# Copyright 2021 solo-learn development team. # 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, publ...
33.740741
97
0.682923
import os from pprint import pprint from pytorch_lightning import Trainer, seed_everything from pytorch_lightning.callbacks import LearningRateMonitor from pytorch_lightning.loggers import WandbLogger from solo.args.setup import parse_args_pretrain from solo.methods import METHODS from solo.utils.auto_resumer imp...
true
true
f730226ebacc7664173975d612d2e800b7ac3472
20,723
py
Python
Blackjack/blackjack.py
nairoukh-code/Python_Projects
9a0e2adb6e352b301ed9e542be9c9f1cd16b95b0
[ "MIT" ]
null
null
null
Blackjack/blackjack.py
nairoukh-code/Python_Projects
9a0e2adb6e352b301ed9e542be9c9f1cd16b95b0
[ "MIT" ]
null
null
null
Blackjack/blackjack.py
nairoukh-code/Python_Projects
9a0e2adb6e352b301ed9e542be9c9f1cd16b95b0
[ "MIT" ]
null
null
null
# took some ideas from this source ( https://dev.to/nexttech/build-a-blackjack-command-line-game-3o4b ) import random from enum import Enum from time import time class Game_Status(Enum): WIN = 1 LOSE = 2 PUSH = 3 class Card: def __init__(self, suit, value): self.suit = suit self.val...
39.623327
120
0.509917
import random from enum import Enum from time import time class Game_Status(Enum): WIN = 1 LOSE = 2 PUSH = 3 class Card: def __init__(self, suit, value): self.suit = suit self.value = value def __repr__(self): return " of ".join((self.value, self.suit)) class Deck: ...
true
true
f73023b517d0845ea1d7905c59222d02f1e64c12
362
py
Python
transcription_folder_to_sclite_hyp.py
c0louri/kaldi-grpc-server
d0f6881099423e6d08df74dc4217ddf3f43621a2
[ "Apache-2.0" ]
null
null
null
transcription_folder_to_sclite_hyp.py
c0louri/kaldi-grpc-server
d0f6881099423e6d08df74dc4217ddf3f43621a2
[ "Apache-2.0" ]
null
null
null
transcription_folder_to_sclite_hyp.py
c0louri/kaldi-grpc-server
d0f6881099423e6d08df74dc4217ddf3f43621a2
[ "Apache-2.0" ]
null
null
null
import fileinput import os def to_sclite_line(trans): with open(trans, "r") as fd: hyp = fd.read() _id, _ = os.path.splitext(os.path.basename(trans)) return f"{hyp} ({_id})" def main(): with fileinput.input() as finput: for ln in finput: print(to_sclite_line(ln.strip())...
16.454545
54
0.596685
import fileinput import os def to_sclite_line(trans): with open(trans, "r") as fd: hyp = fd.read() _id, _ = os.path.splitext(os.path.basename(trans)) return f"{hyp} ({_id})" def main(): with fileinput.input() as finput: for ln in finput: print(to_sclite_line(ln.strip())...
true
true
f73024ea71ed1bb25989143787154d6617e53ae0
18,051
py
Python
sdk/python/pulumi_azure_native/recoveryservices/v20210601/protection_container.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/recoveryservices/v20210601/protection_container.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/recoveryservices/v20210601/protection_container.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
56.943218
1,968
0.70046
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ProtectionContainerArgs', 'ProtectionContainer'] @pulumi.input_type class ProtectionContai...
true
true
f73025866ffd701b1513e28d9ce8005b3fbbd1c8
12,554
py
Python
compbio/gff.py
Open-Technology/Computational-Biology
f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7
[ "MIT" ]
30
2015-05-08T19:21:15.000Z
2022-03-11T21:30:33.000Z
compbio/gff.py
Open-Technology/Computational-Biology
f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7
[ "MIT" ]
null
null
null
compbio/gff.py
Open-Technology/Computational-Biology
f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7
[ "MIT" ]
8
2015-05-08T02:02:33.000Z
2021-06-10T17:51:03.000Z
""" GTF file format http://genes.cse.wustl.edu/GTF22.html <seqname> <source> <feature> <start> <end> <score> <strand> <frame> [attributes] [comments] The following feature types are required: "CDS", "start_codon", "stop_codon". The features "5UTR", "3UTR", "inter", "inter_CNS", "intron_CNS" and "exon" are optional. ...
28.926267
95
0.558945
""" GTF file format http://genes.cse.wustl.edu/GTF22.html <seqname> <source> <feature> <start> <end> <score> <strand> <frame> [attributes] [comments] The following feature types are required: "CDS", "start_codon", "stop_codon". The features "5UTR", "3UTR", "inter", "inter_CNS", "intron_CNS" and "exon" are optional. ...
false
true
f73025c4d9d89dd6e0b7fe5b4dd2de1d97525760
3,376
py
Python
examples/nips17_adversarial_competition/dev_toolkit/sample_defenses/ens_adv_inception_resnet_v2/defense.py
luvrpg/cleverhans
1f2ee7a04cff1ec54c96dcba5294f6e2d7780d42
[ "MIT" ]
50
2018-11-20T11:59:18.000Z
2021-11-01T18:01:42.000Z
examples/nips17_adversarial_competition/dev_toolkit/sample_defenses/ens_adv_inception_resnet_v2/defense.py
luvrpg/cleverhans
1f2ee7a04cff1ec54c96dcba5294f6e2d7780d42
[ "MIT" ]
2
2019-07-22T20:59:01.000Z
2019-11-17T07:00:00.000Z
examples/nips17_adversarial_competition/dev_toolkit/sample_defenses/ens_adv_inception_resnet_v2/defense.py
luvrpg/cleverhans
1f2ee7a04cff1ec54c96dcba5294f6e2d7780d42
[ "MIT" ]
20
2018-03-14T14:01:55.000Z
2021-09-17T19:19:56.000Z
"""Implementation of sample defense. This defense loads inception resnet v2 checkpoint and classifies all images using loaded checkpoint. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from scipy.misc import imread impor...
29.876106
79
0.707642
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from scipy.misc import imread import tensorflow as tf import inception_resnet_v2 slim = tf.contrib.slim tf.flags.DEFINE_string( 'master', '', 'The address of the TensorFl...
true
true
f730267630885ce1626fc7dd223bb44956acfce4
1,937
py
Python
transformers/md5/server.py
NVIDIA/ais-etl
e60e4c5a8be208379916fc245fd874f670336ce2
[ "MIT" ]
4
2020-08-08T19:39:33.000Z
2021-06-02T19:14:34.000Z
transformers/md5/server.py
NVIDIA/ais-tar2tf
4e4a9e448d7249e3e19481ca32c3f53fe5022ecc
[ "MIT" ]
null
null
null
transformers/md5/server.py
NVIDIA/ais-tar2tf
4e4a9e448d7249e3e19481ca32c3f53fe5022ecc
[ "MIT" ]
4
2020-10-28T19:49:15.000Z
2022-03-28T23:21:02.000Z
#!/usr/bin/env python import argparse import hashlib import requests import os from http.server import HTTPServer, BaseHTTPRequestHandler from socketserver import ThreadingMixIn host_target = os.environ['AIS_TARGET_URL'] class Handler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): #...
27.28169
81
0.637584
import argparse import hashlib import requests import os from http.server import HTTPServer, BaseHTTPRequestHandler from socketserver import ThreadingMixIn host_target = os.environ['AIS_TARGET_URL'] class Handler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): pass def _...
true
true
f7302747c69d4cf11b6c0eb5fdafe30a97f317af
4,356
py
Python
KoreanLipNet/training/overlapped_speakers/train.py
khujay15/koreanLipNet
9db7524c7f3a577841cff88c7cd195e941c06fd6
[ "MIT" ]
1
2020-05-19T01:47:24.000Z
2020-05-19T01:47:24.000Z
KoreanLipNet/training/overlapped_speakers/train.py
youda9/koreanLipNet
46e1304477b2bd275206559e21815d204a5d1a72
[ "MIT" ]
null
null
null
KoreanLipNet/training/overlapped_speakers/train.py
youda9/koreanLipNet
46e1304477b2bd275206559e21815d204a5d1a72
[ "MIT" ]
null
null
null
from keras.optimizers import Adam from keras.callbacks import TensorBoard, CSVLogger, ModelCheckpoint from lipnet.lipreading.generators import BasicGenerator from lipnet.lipreading.callbacks import Statistics, Visualize from lipnet.lipreading.curriculums import Curriculum from lipnet.core.decoders import Decoder from l...
49.5
161
0.688246
from keras.optimizers import Adam from keras.callbacks import TensorBoard, CSVLogger, ModelCheckpoint from lipnet.lipreading.generators import BasicGenerator from lipnet.lipreading.callbacks import Statistics, Visualize from lipnet.lipreading.curriculums import Curriculum from lipnet.core.decoders import Decoder from l...
false
true
f73027e9e4952cf5a8f78b5328442c74a11c9e43
234
py
Python
kwueBackend/kwue/controllers/list.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
6
2016-02-14T18:04:48.000Z
2016-12-18T20:09:15.000Z
kwueBackend/kwue/controllers/list.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
113
2016-02-14T18:06:57.000Z
2021-06-10T17:57:12.000Z
kwueBackend/kwue/controllers/list.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
1
2017-02-15T18:48:55.000Z
2017-02-15T18:48:55.000Z
from django.shortcuts import render def get_list(req): return render(req, 'kwue/food.html', {}) def add_item(req): return render(req, 'kwue/food.html', {}) def create_list(req): return render(req, 'kwue/food.html', {})
21.272727
44
0.67094
from django.shortcuts import render def get_list(req): return render(req, 'kwue/food.html', {}) def add_item(req): return render(req, 'kwue/food.html', {}) def create_list(req): return render(req, 'kwue/food.html', {})
true
true
f73028328736056212bd4d00388f2744b0775730
29,066
py
Python
mbpo/algorithms/meee.py
YaoYao1995/mbpo
b9571e469459ce3a632b19dc3fee68c9ac3857b2
[ "MIT" ]
null
null
null
mbpo/algorithms/meee.py
YaoYao1995/mbpo
b9571e469459ce3a632b19dc3fee68c9ac3857b2
[ "MIT" ]
null
null
null
mbpo/algorithms/meee.py
YaoYao1995/mbpo
b9571e469459ce3a632b19dc3fee68c9ac3857b2
[ "MIT" ]
null
null
null
## adapted from https://github.com/rail-berkeley/softlearning/blob/master/softlearning/algorithms/sac.py import os import math import pickle from collections import OrderedDict from numbers import Number from itertools import count import gtimer as gt import pdb import numpy as np import tensorflow as tf ...
38.498013
155
0.588729
import os import math import pickle from collections import OrderedDict from numbers import Number from itertools import count import gtimer as gt import pdb import numpy as np import tensorflow as tf from tensorflow.python.training import training_util from softlearning.algorithms.rl_algorithm import ...
true
true
f7302be119c81384731038eacea54af1c0b78722
2,312
py
Python
customSDK/servicefabric/models/service_backup_configuration_info.py
hans-olav/service-fabric-cli
baf27342ad4b9f74dee1954e60ed5b40ebcf039d
[ "MIT" ]
null
null
null
customSDK/servicefabric/models/service_backup_configuration_info.py
hans-olav/service-fabric-cli
baf27342ad4b9f74dee1954e60ed5b40ebcf039d
[ "MIT" ]
null
null
null
customSDK/servicefabric/models/service_backup_configuration_info.py
hans-olav/service-fabric-cli
baf27342ad4b9f74dee1954e60ed5b40ebcf039d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.622642
163
0.67301
from .backup_configuration_info import BackupConfigurationInfo class ServiceBackupConfigurationInfo(BackupConfigurationInfo): _validation = { 'kind': {'required': True}, } _attribute_map = { 'policy_name': {'key': 'PolicyName', 'type': 'str'}, 'policy_inherited_from': {'key': 'P...
true
true
f7302cc54f16c065e96db6b3d234be1df4223db1
691
py
Python
parlai/tasks/squad/test.py
zl930216/ParlAI
abf0ad6d1779af0f8ce0b5aed00d2bab71416684
[ "MIT" ]
9,228
2017-05-03T03:40:34.000Z
2022-03-31T14:03:29.000Z
parlai/tasks/squad/test.py
zl930216/ParlAI
abf0ad6d1779af0f8ce0b5aed00d2bab71416684
[ "MIT" ]
2,660
2017-05-03T23:06:02.000Z
2022-03-31T21:24:29.000Z
parlai/tasks/squad/test.py
zl930216/ParlAI
abf0ad6d1779af0f8ce0b5aed00d2bab71416684
[ "MIT" ]
2,058
2017-05-04T12:19:48.000Z
2022-03-31T10:28:11.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.utils.testing import AutoTeacherTest class TestDefaultTeacher(AutoTeacherTest): task = "squad" class...
21.59375
65
0.76411
from parlai.utils.testing import AutoTeacherTest class TestDefaultTeacher(AutoTeacherTest): task = "squad" class TestIndexTeacher(AutoTeacherTest): task = "squad:index" class TestOpensquadTeacher(AutoTeacherTest): task = "squad:opensquad" class TestFulldocTeacher(AutoTeacherTest): task = "squa...
true
true
f7302ce59810c52de7625664e0887f9d75b5fb56
6,150
py
Python
.docs/conf.py
Gael-de-Sailly/flopy
4104cf5e6a35e2a1fd6183442962ae5cb258fa7a
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
.docs/conf.py
Gael-de-Sailly/flopy
4104cf5e6a35e2a1fd6183442962ae5cb258fa7a
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
.docs/conf.py
Gael-de-Sailly/flopy
4104cf5e6a35e2a1fd6183442962ae5cb258fa7a
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.791209
217
0.677073
import os import sys sys.path.insert(0, os.path.abspath("..")) from flopy import __version__ on_rtd = os.environ.get('READTHEDOCS') == 'True' cmd = "sphinx-apidoc -e -o source/ ../flopy/" print(cmd) os.system(cmd) cmd = ("python", "create_rstfiles.py") print(" ".join(cmd)) os.system(" ".join(cmd)) if not on_rtd:...
true
true
f7302d7fbc14ba5b762d875c3cc9ddd617ab5ad6
77,626
py
Python
test_integration/geopm_test_integration.py
RyoTTa/geopm
74246c8ce70ee47f53bc5629638f51c2c391027b
[ "BSD-3-Clause" ]
null
null
null
test_integration/geopm_test_integration.py
RyoTTa/geopm
74246c8ce70ee47f53bc5629638f51c2c391027b
[ "BSD-3-Clause" ]
null
null
null
test_integration/geopm_test_integration.py
RyoTTa/geopm
74246c8ce70ee47f53bc5629638f51c2c391027b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2015, 2016, 2017, 2018, 2019, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # ...
49.068268
165
0.618775
from __future__ import absolute_import from __future__ import division from future import standard_library standard_library.install_aliases() from builtins import str import os import sys import unittest import subprocess import time import pandas import collections import socket import shlex import json sys.path.ap...
true
true
f7302e0b103de32216051a22e30483430b67f84e
940
py
Python
running_modes/utils/general.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
183
2020-04-04T02:01:15.000Z
2022-03-30T21:56:56.000Z
running_modes/utils/general.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
39
2020-04-05T15:19:56.000Z
2022-03-09T12:58:21.000Z
running_modes/utils/general.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
70
2020-04-05T19:25:43.000Z
2022-02-22T12:04:39.000Z
import time import numpy as np import torch def to_tensor(tensor): if isinstance(tensor, np.ndarray): tensor = torch.from_numpy(tensor) if torch.cuda.is_available(): return torch.autograd.Variable(tensor).cuda() return torch.autograd.Variable(tensor) def set_default_device_cuda(): "...
30.322581
69
0.678723
import time import numpy as np import torch def to_tensor(tensor): if isinstance(tensor, np.ndarray): tensor = torch.from_numpy(tensor) if torch.cuda.is_available(): return torch.autograd.Variable(tensor).cuda() return torch.autograd.Variable(tensor) def set_default_device_cuda(): i...
true
true
f7302e9cf28bc426a294342f8db30d4a7364613d
370
py
Python
multiple-languages/python/ros-cdk-cas-1.0.3/src/ros_cdk_cas/_jsii/__init__.py
aliyun/Resource-Orchestration-Service-Cloud-Development-K
2b81e135002ed81cb72f7d07be7ff497ea39e2e1
[ "Apache-2.0" ]
15
2020-11-10T02:00:28.000Z
2022-02-07T19:28:10.000Z
multiple-languages/python/ros-cdk-cas-1.0.3/src/ros_cdk_cas/_jsii/__init__.py
aliyun/Resource-Orchestration-Service-Cloud-Development-K
2b81e135002ed81cb72f7d07be7ff497ea39e2e1
[ "Apache-2.0" ]
23
2021-02-02T04:37:02.000Z
2022-03-31T06:41:06.000Z
multiple-languages/python/ros-cdk-cas-1.0.3/src/ros_cdk_cas/_jsii/__init__.py
aliyun/Resource-Orchestration-Service-Cloud-Development-K
2b81e135002ed81cb72f7d07be7ff497ea39e2e1
[ "Apache-2.0" ]
4
2021-01-13T05:48:43.000Z
2022-03-15T11:26:48.000Z
import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions import constructs._jsii import ros_cdk_core._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "@alicloud/ros-cdk-cas", "1.0.3", __name__[0:-6], "ros-cdk-cas@1.0.3.jsii.tgz" ) __all__ = [ ...
16.086957
82
0.759459
import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions import constructs._jsii import ros_cdk_core._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( "@alicloud/ros-cdk-cas", "1.0.3", __name__[0:-6], "ros-cdk-cas@1.0.3.jsii.tgz" ) __all__ = [ ...
true
true
f7302ec626d9babefa67e7f7cd70358eb037d937
1,552
py
Python
src/pyri/webui_browser/plugins/panel.py
pyri-project/pyri-webui-browser
57f20bef7af357a8d051c700aff95fef389a3be0
[ "Apache-2.0" ]
null
null
null
src/pyri/webui_browser/plugins/panel.py
pyri-project/pyri-webui-browser
57f20bef7af357a8d051c700aff95fef389a3be0
[ "Apache-2.0" ]
null
null
null
src/pyri/webui_browser/plugins/panel.py
pyri-project/pyri-webui-browser
57f20bef7af357a8d051c700aff95fef389a3be0
[ "Apache-2.0" ]
null
null
null
from typing import List, Dict, Callable, Any, NamedTuple, TYPE_CHECKING from pyri.plugins import util as plugin_util if TYPE_CHECKING: from .. import PyriWebUIBrowser class PyriWebUIBrowserPanelInfo(NamedTuple): title: str panel_type: str priority: int class PyriWebUIBrowserPanelBase: pass class...
33.021277
123
0.73518
from typing import List, Dict, Callable, Any, NamedTuple, TYPE_CHECKING from pyri.plugins import util as plugin_util if TYPE_CHECKING: from .. import PyriWebUIBrowser class PyriWebUIBrowserPanelInfo(NamedTuple): title: str panel_type: str priority: int class PyriWebUIBrowserPanelBase: pass class...
true
true
f7302fb44428bb7330b8cbab6d2be8a127232a1b
1,451
py
Python
monk/system_unit_tests/pytorch/test_block_resnet_v2.py
Shreyashwaghe/monk_v1
4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b
[ "Apache-2.0" ]
7
2020-07-26T08:37:29.000Z
2020-10-30T10:23:11.000Z
monk/system_unit_tests/pytorch/test_block_resnet_v2.py
mursalfk/monk_v1
62f34a52f242772186ffff7e56764e958fbcd920
[ "Apache-2.0" ]
null
null
null
monk/system_unit_tests/pytorch/test_block_resnet_v2.py
mursalfk/monk_v1
62f34a52f242772186ffff7e56764e958fbcd920
[ "Apache-2.0" ]
1
2020-10-07T12:57:44.000Z
2020-10-07T12:57:44.000Z
import os import sys sys.path.append("../../../monk/"); import psutil from pytorch_prototype import prototype from compare_prototype import compare from common import print_start from common import print_status import torch import numpy as np from pytorch.losses.return_loss import load_loss def test_block_resnet_v2...
29.612245
96
0.644383
import os import sys sys.path.append("../../../monk/"); import psutil from pytorch_prototype import prototype from compare_prototype import compare from common import print_start from common import print_status import torch import numpy as np from pytorch.losses.return_loss import load_loss def test_block_resnet_v2...
true
true
f7302ffbe807ed5672868941d35075e072212e37
2,694
py
Python
sgnlp/models/span_extraction/train.py
raymondng76/sgnlp
f09eada90ef5b1ee979901e5c14413d32e758049
[ "MIT" ]
14
2021-08-02T01:52:18.000Z
2022-01-14T10:16:02.000Z
sgnlp/models/span_extraction/train.py
raymondng76/sgnlp
f09eada90ef5b1ee979901e5c14413d32e758049
[ "MIT" ]
29
2021-08-02T01:53:46.000Z
2022-03-30T05:40:46.000Z
sgnlp/models/span_extraction/train.py
raymondng76/sgnlp
f09eada90ef5b1ee979901e5c14413d32e758049
[ "MIT" ]
7
2021-08-02T01:54:19.000Z
2022-01-07T06:37:45.000Z
import json import math from transformers import Trainer from transformers import TrainingArguments from .config import RecconSpanExtractionConfig from .data_class import RecconSpanExtractionArguments from .modeling import RecconSpanExtractionModel from .tokenization import RecconSpanExtractionTokenizer from .utils i...
32.071429
88
0.717892
import json import math from transformers import Trainer from transformers import TrainingArguments from .config import RecconSpanExtractionConfig from .data_class import RecconSpanExtractionArguments from .modeling import RecconSpanExtractionModel from .tokenization import RecconSpanExtractionTokenizer from .utils i...
true
true
f73030990cc126d9327feaa150791a0d22622092
1,387
py
Python
tests/update_test_outputs.py
UUDigitalHumanitieslab/folia2alpino
4181955ccecadd02e311a548d67b17c09bfd81d4
[ "MIT" ]
null
null
null
tests/update_test_outputs.py
UUDigitalHumanitieslab/folia2alpino
4181955ccecadd02e311a548d67b17c09bfd81d4
[ "MIT" ]
null
null
null
tests/update_test_outputs.py
UUDigitalHumanitieslab/folia2alpino
4181955ccecadd02e311a548d67b17c09bfd81d4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Script for updating the output files using the current behavior. """ import sys sys.path.append("..") sys.path.append(".") from glob import glob import unittest import re from typing import cast, List, Sequence from os import path from corpus2alpino.converter import Converter from corpus2al...
29.510638
82
0.733237
import sys sys.path.append("..") sys.path.append(".") from glob import glob import unittest import re from typing import cast, List, Sequence from os import path from corpus2alpino.converter import Converter from corpus2alpino.collectors.filesystem import FilesystemCollector from corpus2alpino.targets.memory import M...
true
true
f730313f1a3cfec6df0cdc426961abe92340dec7
2,873
py
Python
spiketoolkit/preprocessing/center.py
teristam/spiketoolk
0ae7adabce46cf620c3627ee0093d890996ef355
[ "MIT" ]
null
null
null
spiketoolkit/preprocessing/center.py
teristam/spiketoolk
0ae7adabce46cf620c3627ee0093d890996ef355
[ "MIT" ]
null
null
null
spiketoolkit/preprocessing/center.py
teristam/spiketoolk
0ae7adabce46cf620c3627ee0093d890996ef355
[ "MIT" ]
null
null
null
from spikeextractors import RecordingExtractor from .transform import TransformRecording import numpy as np class CenterRecording(TransformRecording): preprocessor_name = 'Center' def __init__(self, recording, mode, seconds, n_snippets): if not isinstance(recording, RecordingExtractor): r...
41.637681
109
0.637313
from spikeextractors import RecordingExtractor from .transform import TransformRecording import numpy as np class CenterRecording(TransformRecording): preprocessor_name = 'Center' def __init__(self, recording, mode, seconds, n_snippets): if not isinstance(recording, RecordingExtractor): r...
true
true
f7303176a948e5cc9fbd74ef4d04e4f617797080
3,283
py
Python
dcgan/mnist/InceptionScore.py
DoubleE1/Keras-GAN
775eb82b18cb146203295f19c937d4290de2953f
[ "MIT" ]
null
null
null
dcgan/mnist/InceptionScore.py
DoubleE1/Keras-GAN
775eb82b18cb146203295f19c937d4290de2953f
[ "MIT" ]
null
null
null
dcgan/mnist/InceptionScore.py
DoubleE1/Keras-GAN
775eb82b18cb146203295f19c937d4290de2953f
[ "MIT" ]
null
null
null
# calculate inception score for cifar-10 in Keras import numpy as np import matplotlib.pyplot as plt from math import floor from numpy import ones, expand_dims, log, mean, std, exp from numpy.random import shuffle from keras.applications.inception_v3 import InceptionV3, preprocess_input from keras.datasets import cifar...
30.971698
91
0.687176
import numpy as np import matplotlib.pyplot as plt from math import floor from numpy import ones, expand_dims, log, mean, std, exp from numpy.random import shuffle from keras.applications.inception_v3 import InceptionV3, preprocess_input from keras.datasets import cifar10 from skimage.transform import resize from numpy...
true
true
f73032ee4c4acdb0ede3dd7e43679cf1876d488e
2,431
py
Python
theseus/utilities/cuda.py
kaylode/Custom-Template
b2f11bfacf2b03b793476a19781f9046fab6fd82
[ "MIT" ]
2
2022-02-18T04:41:29.000Z
2022-03-12T09:04:14.000Z
theseus/utilities/cuda.py
kaylode/Custom-Template
b2f11bfacf2b03b793476a19781f9046fab6fd82
[ "MIT" ]
8
2022-02-16T17:01:28.000Z
2022-03-28T02:53:45.000Z
theseus/utilities/cuda.py
kaylode/Custom-Template
b2f11bfacf2b03b793476a19781f9046fab6fd82
[ "MIT" ]
3
2022-02-13T05:00:13.000Z
2022-03-02T00:11:27.000Z
""" CUDA / AMP utils Hacked together by / Copyright 2020 Ross Wightman """ import torch from typing import Any from theseus.utilities.loggers.observer import LoggerObserver LOGGER = LoggerObserver.getLogger('main') def get_devices_info(device_names="0"): if device_names.startswith('cuda'): device_names =...
34.728571
103
0.643768
import torch from typing import Any from theseus.utilities.loggers.observer import LoggerObserver LOGGER = LoggerObserver.getLogger('main') def get_devices_info(device_names="0"): if device_names.startswith('cuda'): device_names = device_names.split('cuda:')[1] elif device_names.startswith('cpu'): ...
true
true
f73033cb691eb8edb9ba077278124a516a5d48f4
15,257
py
Python
bingraphvis/angr/annotator.py
fanyao/bingraphvis
72f3f6abc0c30bc14916325c886e43dbbd853a97
[ "BSD-2-Clause" ]
1
2018-11-19T11:03:29.000Z
2018-11-19T11:03:29.000Z
bingraphvis/angr/annotator.py
fanyao/bingraphvis
72f3f6abc0c30bc14916325c886e43dbbd853a97
[ "BSD-2-Clause" ]
null
null
null
bingraphvis/angr/annotator.py
fanyao/bingraphvis
72f3f6abc0c30bc14916325c886e43dbbd853a97
[ "BSD-2-Clause" ]
1
2018-11-19T11:03:30.000Z
2018-11-19T11:03:30.000Z
from ..base import * import capstone import pyvex class AngrColorSimprocedures(NodeAnnotator): def __init__(self): super(AngrColorSimprocedures, self).__init__() def annotate_node(self, node): if node.obj.is_simprocedure: if node.obj.simprocedure_name in ['PathTerminator','Re...
35.235566
124
0.509274
from ..base import * import capstone import pyvex class AngrColorSimprocedures(NodeAnnotator): def __init__(self): super(AngrColorSimprocedures, self).__init__() def annotate_node(self, node): if node.obj.is_simprocedure: if node.obj.simprocedure_name in ['PathTerminator','Re...
true
true
f73033d88a29a228548a8549a992ff3da490ca17
3,826
py
Python
.history/functions_20211223153653.py
tjxj/pdf2docx
3338a95f1a971de8caf0369fa3ce794d2d6d57cd
[ "Apache-2.0" ]
null
null
null
.history/functions_20211223153653.py
tjxj/pdf2docx
3338a95f1a971de8caf0369fa3ce794d2d6d57cd
[ "Apache-2.0" ]
null
null
null
.history/functions_20211223153653.py
tjxj/pdf2docx
3338a95f1a971de8caf0369fa3ce794d2d6d57cd
[ "Apache-2.0" ]
null
null
null
import streamlit as st import base64 import os import time from pdf2docx import Converter import tempfile from pathlib import Path import streamlit as st from pdf2image import convert_from_path def show_pdf(uploaded_file): with st.expander("Original PDF file"): base64_pdf = base64.b64encode(uploaded_file....
28.552239
128
0.65081
import streamlit as st import base64 import os import time from pdf2docx import Converter import tempfile from pathlib import Path import streamlit as st from pdf2image import convert_from_path def show_pdf(uploaded_file): with st.expander("Original PDF file"): base64_pdf = base64.b64encode(uploaded_file....
true
true
f730342ab5ef9de61150bbe987c938e724c98ab0
793
py
Python
taxcli/helper/invoice_files.py
Nukesor/taxcli
f313acd2f1c9a551361a535f8428a17c53e6b468
[ "MIT" ]
null
null
null
taxcli/helper/invoice_files.py
Nukesor/taxcli
f313acd2f1c9a551361a535f8428a17c53e6b468
[ "MIT" ]
null
null
null
taxcli/helper/invoice_files.py
Nukesor/taxcli
f313acd2f1c9a551361a535f8428a17c53e6b468
[ "MIT" ]
null
null
null
import os def get_invoice_files(invoices, year=False): for invoice in invoices: if invoice.invoice_file: # Get folder for this invoice and create it if it doesn't exist if not invoice.afa: folder = invoice.invoice_type.name else: folder =...
33.041667
75
0.538462
import os def get_invoice_files(invoices, year=False): for invoice in invoices: if invoice.invoice_file: if not invoice.afa: folder = invoice.invoice_type.name else: folder = 'afa' if not os.path.exists(folder): ...
true
true
f73034f20da654c6f6022c6e0ce37e0082277f05
8,692
py
Python
src/config/train_config.py
wangx1996/CenterPillarNet
4be3d53265b8ecb1f9572612fa87f7acd8c57669
[ "MIT" ]
22
2021-03-19T03:13:16.000Z
2022-03-31T03:05:07.000Z
src/config/train_config.py
wangx1996/CenterPillarNet
4be3d53265b8ecb1f9572612fa87f7acd8c57669
[ "MIT" ]
4
2021-04-18T02:23:13.000Z
2021-08-25T13:21:08.000Z
src/config/train_config.py
wangx1996/CenterPillarNet
4be3d53265b8ecb1f9572612fa87f7acd8c57669
[ "MIT" ]
7
2021-06-04T06:54:21.000Z
2022-01-17T09:18:50.000Z
""" # -*- coding: utf-8 -*- ----------------------------------------------------------------------------------- # Author: Nguyen Mau Dung # DoC: 2020.08.17 # email: nguyenmaudung93.kstn@gmail.com ----------------------------------------------------------------------------------- # Description: The configurations of the...
53.654321
102
0.499655
import os import argparse import torch from easydict import EasyDict as edict import kitti_config as cnf def parse_train_configs(): parser = argparse.ArgumentParser(description='The Implementation using PyTorch') parser.add_argument('--seed', type=int, default=2020, help='re-produce t...
true
true
f73035c8e8d37029f07a95dd13aa78a0f9696623
22,403
py
Python
scipy/special/__init__.py
alimuldal/scipy
713cf7df7b759e2aaeef0f81eb632f48c9b4bae0
[ "BSD-3-Clause" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
scipy/special/__init__.py
alimuldal/scipy
713cf7df7b759e2aaeef0f81eb632f48c9b4bae0
[ "BSD-3-Clause" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
scipy/special/__init__.py
alimuldal/scipy
713cf7df7b759e2aaeef0f81eb632f48c9b4bae0
[ "BSD-3-Clause" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
""" ======================================== Special functions (:mod:`scipy.special`) ======================================== .. module:: scipy.special Nearly all of the functions below are universal functions and follow broadcasting and automatic array-looping rules. Exceptions are noted. Error handling ==========...
34.679567
121
0.658796
from __future__ import division, print_function, absolute_import from ._ufuncs import * from .basic import * from . import specfun from . import orthogonal from .orthogonal import * from .spfun_stats import multigammaln from ._ellip_harm import ellip_harm, ellip_harm_2, ellip_normal from .lambertw import lambertw ...
true
true
f730363349853b93aa06cd6ec0467353dfec8ae9
2,024
py
Python
config/settings/test.py
seankim84/twitter
71cbcd821effc4e77588b195d770ef003887d322
[ "MIT" ]
null
null
null
config/settings/test.py
seankim84/twitter
71cbcd821effc4e77588b195d770ef003887d322
[ "MIT" ]
null
null
null
config/settings/test.py
seankim84/twitter
71cbcd821effc4e77588b195d770ef003887d322
[ "MIT" ]
null
null
null
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = False # https://docs.djangoproject.com/en/dev/ref/settings/#se...
36.142857
113
0.546443
from .base import * from .base import env DEBUG = False SECRET_KEY = env("DJANGO_SECRET_KEY", default="uaAkGkerZ7vi0VWITpJheK17oRcfIACMfcTmeZhyrF5IG4jJO3ougsdusXKzpyF0") TEST_RUNNER = "django.test.runner.DiscoverRunner" CACHES = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", ...
true
true
f73036fe32a7f58510cda8b92c49c85b9b6d8b44
1,195
py
Python
src/scrape/organisation_model.py
younginnovations/iati-organisations-cleanup
6a073abbb43957632d988880fc96319da2265e13
[ "MIT" ]
1
2017-09-07T11:44:56.000Z
2017-09-07T11:44:56.000Z
src/scrape/organisation_model.py
younginnovations/iati-organisations-cleanup
6a073abbb43957632d988880fc96319da2265e13
[ "MIT" ]
null
null
null
src/scrape/organisation_model.py
younginnovations/iati-organisations-cleanup
6a073abbb43957632d988880fc96319da2265e13
[ "MIT" ]
null
null
null
from peewee import * import datetime from config import * database = PostgresqlDatabase(POSTGRES_DATABASE, user=POSTGRES_USER, password=POSTGRES_PASSWORD, host=POSTGRES_HOST) class TblOrganisation(Model): id = PrimaryKeyField() identifier = CharField() type = IntegerField() country = CharField() i...
33.194444
121
0.68954
from peewee import * import datetime from config import * database = PostgresqlDatabase(POSTGRES_DATABASE, user=POSTGRES_USER, password=POSTGRES_PASSWORD, host=POSTGRES_HOST) class TblOrganisation(Model): id = PrimaryKeyField() identifier = CharField() type = IntegerField() country = CharField() i...
true
true
f730371b81367b93cefe310f9c09565e96aac8e7
1,124
py
Python
edit/deleteaward.py
lokal-profil/isfdb_site
0ce20d6347849926d4eda961ea9249c31519eea5
[ "BSD-3-Clause" ]
null
null
null
edit/deleteaward.py
lokal-profil/isfdb_site
0ce20d6347849926d4eda961ea9249c31519eea5
[ "BSD-3-Clause" ]
null
null
null
edit/deleteaward.py
lokal-profil/isfdb_site
0ce20d6347849926d4eda961ea9249c31519eea5
[ "BSD-3-Clause" ]
null
null
null
#!_PYTHONLOC # # (C) COPYRIGHT 2004-2021 Al von Ruff and Ahasuerus # ALL RIGHTS RESERVED # # The copyright notice above does not evidence any actual or # intended publication of such source code. # # Version: $Revision$ # Date: $Date$ from isfdb import * from isfdblib import * from award...
28.1
78
0.636121
from isfdb import * from isfdblib import * from awardClass import * from SQLparsing import * if __name__ == '__main__': award_id = SESSION.Parameter(0, 'int') award = SQLloadAwards(award_id) if not award: SESSION.DisplayError('Record Does Not Exist') PrintPreSearch('Delete Award Submis...
false
true