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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2df59b3624e83309ba6fde19949ccfe728cf89
689
py
Python
Scripts/django-admin.py
narsimrao/django_project
8bd6b3db69505bfc7c78de9e58058efe76505485
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
narsimrao/django_project
8bd6b3db69505bfc7c78de9e58058efe76505485
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
narsimrao/django_project
8bd6b3db69505bfc7c78de9e58058efe76505485
[ "bzip2-1.0.6" ]
null
null
null
#!e:\django_projects\django_project\scripts\python.exe # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was depr...
31.318182
80
0.730044
import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was deprecated in Django 3.1 and removed in Django ' '4.0. Please manually remove this script from your virtual enviro...
true
true
1c2df61a7417955bda87d8d71d299b279e8a2f26
1,103
py
Python
utils/sputa.py
piger/dulbecco
8d0c1a62d64214f1962077385216f09866767720
[ "BSD-2-Clause" ]
null
null
null
utils/sputa.py
piger/dulbecco
8d0c1a62d64214f1962077385216f09866767720
[ "BSD-2-Clause" ]
null
null
null
utils/sputa.py
piger/dulbecco
8d0c1a62d64214f1962077385216f09866767720
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import cPickle as pickle import shutil import os import json import sys class PersistentDict(dict): def __init__(self, filename, *args, **kwargs): self.filename = filename dict.__init__(self, *args, **kwargs) def save(self): tmpfile = self...
23.978261
53
0.55757
import cPickle as pickle import shutil import os import json import sys class PersistentDict(dict): def __init__(self, filename, *args, **kwargs): self.filename = filename dict.__init__(self, *args, **kwargs) def save(self): tmpfile = self.filename + ".tmp" try: ...
true
true
1c2df64db076a8bba366965c59793e8dbaeb6a13
882
py
Python
esmvalcore/cmor/_fixes/cmip5/fgoals_g2.py
jvegreg/ESMValCore
03eb1c942bf1dc3be98cb30c3592b42e82a94f16
[ "Apache-2.0" ]
null
null
null
esmvalcore/cmor/_fixes/cmip5/fgoals_g2.py
jvegreg/ESMValCore
03eb1c942bf1dc3be98cb30c3592b42e82a94f16
[ "Apache-2.0" ]
2
2022-03-02T16:16:06.000Z
2022-03-10T12:58:49.000Z
esmvalcore/cmor/_fixes/cmip5/fgoals_g2.py
valeriupredoi/ESMValCore
b46b948c47d8579d997b28501f8588f5531aa354
[ "Apache-2.0" ]
null
null
null
"""Fixes for FGOALS-g2 model.""" import iris from cf_units import Unit from ..fix import Fix from ..shared import round_coordinates class AllVars(Fix): """Fixes for all variables.""" def fix_metadata(self, cubes): """Fix metadata. Fix time coordinate and round other coordinates to fix issue...
22.615385
73
0.568027
import iris from cf_units import Unit from ..fix import Fix from ..shared import round_coordinates class AllVars(Fix): def fix_metadata(self, cubes): for cube in cubes: try: time = cube.coord('time') except iris.exceptions.CoordinateNotFoundError: ...
true
true
1c2df64e53bd14b34a66a8f182d65708eb56769f
195
py
Python
BAEKJOON/Python/10773.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/10773.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/10773.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
result = [] for i in range(int(input())): temp = int(input()) if temp == 0: if len(result) != 0: result.pop() else: result.append(temp) print(sum(result))
19.5
29
0.507692
result = [] for i in range(int(input())): temp = int(input()) if temp == 0: if len(result) != 0: result.pop() else: result.append(temp) print(sum(result))
true
true
1c2df69976a1483f6eb5b5dc7775f32a86fd296a
313
py
Python
packages/pycopy/v2.11.0.1/esp8266/stubs/uselect.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
18
2019-07-11T13:31:09.000Z
2022-01-27T06:38:40.000Z
packages/pycopy/v2.11.0.1/esp8266/stubs/uselect.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
9
2019-09-01T21:44:49.000Z
2022-02-04T20:55:08.000Z
packages/pycopy/v2.11.0.1/esp8266/stubs/uselect.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
6
2019-10-08T05:31:21.000Z
2021-04-22T10:21:01.000Z
""" Module: 'uselect' on esp8266 v2.11.0.1 on 2019 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v2.11.0.1 on 2019-07-26', machine='ESP module with ESP8266') # Stubber: 1.2.0 POLLERR = 8 POLLHUP = 16 POLLIN = 1 POLLOUT = 4 def poll(): pass def select(): pass
19.5625
146
0.645367
POLLERR = 8 POLLHUP = 16 POLLIN = 1 POLLOUT = 4 def poll(): pass def select(): pass
true
true
1c2df8007af113fc464b9a79dc28207ab10a761d
227
py
Python
image-processing-package/image-processing-my-package/utils/io.py
isabellazramos/criacao-de-pacotes-em-python
6ee97f1365813832bd530f0df6e2159c5b2cb06d
[ "MIT" ]
null
null
null
image-processing-package/image-processing-my-package/utils/io.py
isabellazramos/criacao-de-pacotes-em-python
6ee97f1365813832bd530f0df6e2159c5b2cb06d
[ "MIT" ]
null
null
null
image-processing-package/image-processing-my-package/utils/io.py
isabellazramos/criacao-de-pacotes-em-python
6ee97f1365813832bd530f0df6e2159c5b2cb06d
[ "MIT" ]
2
2022-03-21T20:15:46.000Z
2022-03-31T14:50:43.000Z
#Author: Karina Tiemi Kato from skimage.io import inread, insave def read_image(path, is_gray = False): image = inread(path, as_gray = is_gray) return image def save_image(image, path): insave(path, image)
25.222222
44
0.696035
from skimage.io import inread, insave def read_image(path, is_gray = False): image = inread(path, as_gray = is_gray) return image def save_image(image, path): insave(path, image)
true
true
1c2df8a4ae9fd16c06a3de5c0f9723cea7c360e8
7,052
py
Python
flloat/flloat.py
marcofavorito/flloat
75e8ec9219763eba5feb362438604693b6cc7346
[ "Apache-2.0" ]
3
2019-07-14T21:15:26.000Z
2019-12-12T21:51:35.000Z
flloat/flloat.py
MarcoFavorito/flloat
75e8ec9219763eba5feb362438604693b6cc7346
[ "MIT" ]
1
2019-09-03T16:35:59.000Z
2019-09-03T16:35:59.000Z
flloat/flloat.py
MarcoFavorito/flloat
75e8ec9219763eba5feb362438604693b6cc7346
[ "MIT" ]
1
2019-08-30T18:15:02.000Z
2019-08-30T18:15:02.000Z
# -*- coding: utf-8 -*- """Main module of the pakage.""" from typing import Set, FrozenSet, Dict, cast, List import sympy from pythomata import SymbolicAutomaton, PropositionalInterpretation from pythomata.impl.symbolic import SymbolicDFA from sympy.logic.boolalg import BooleanFalse from flloat.base import Formula ...
32.497696
87
0.617413
from typing import Set, FrozenSet, Dict, cast, List import sympy from pythomata import SymbolicAutomaton, PropositionalInterpretation from pythomata.impl.symbolic import SymbolicDFA from sympy.logic.boolalg import BooleanFalse from flloat.base import Formula from flloat.delta import Delta from flloat.helpers impor...
true
true
1c2df8d4702fe1cbbe53da69f75b40db9ac2ed4c
2,100
py
Python
lib/bes/fs/file_metadata.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
lib/bes/fs/file_metadata.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
lib/bes/fs/file_metadata.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import os import os.path as path from bes.common.check import check from bes.sqlite.sqlite import sqlite from bes.fs.file_util import file_util from .detail.file_metadata_db import file_metadata_db class file_metadata(object):...
33.333333
96
0.741429
import os import os.path as path from bes.common.check import check from bes.sqlite.sqlite import sqlite from bes.fs.file_util import file_util from .detail.file_metadata_db import file_metadata_db class file_metadata(object): DEFAULT_DB_FILENAME = '.bes_file_metadata.db' def __init__(self, root_dir, db_fil...
true
true
1c2df8d6876849a9a0dc4d55bdff271a4397f835
4,006
py
Python
app_data2.py
rongqingpin/iOS_app_data
c9beecfb3878f64568b1d9626412ba6b346934cd
[ "MIT" ]
null
null
null
app_data2.py
rongqingpin/iOS_app_data
c9beecfb3878f64568b1d9626412ba6b346934cd
[ "MIT" ]
null
null
null
app_data2.py
rongqingpin/iOS_app_data
c9beecfb3878f64568b1d9626412ba6b346934cd
[ "MIT" ]
null
null
null
import pandas as pd import csv import json import re # load the category IDs flc = '/Users/pinqingkan/Desktop/Codes/Project_iTunes/' #flc = '/Users/Melanie/Library/Mobile Documents/com~apple~CloudDocs/Desktop/Codes/Project_iTunes/' fname = flc + 'IDs/iosapp_categories.csv' X0 = pd.read_csv(fname) # remove repetitive o...
38.152381
117
0.507239
import pandas as pd import csv import json import re flc = '/Users/pinqingkan/Desktop/Codes/Project_iTunes/' fname = flc + 'IDs/iosapp_categories.csv' X0 = pd.read_csv(fname) X0 = X0.drop(labels = [7, 28, 67], axis = 0) Ncatg, N = X0.shape app_keys = ['trackId', 'artistId', 'artistViewUrl...
true
true
1c2df98873fe0c0b722513464ffa00ef6d1ec3c8
9,758
py
Python
userbot/plugins/pmpermit_menu.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
userbot/plugins/pmpermit_menu.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
userbot/plugins/pmpermit_menu.py
midhunkm1294-bit/TeleBot
b4309fb662e834d9d3826172b69fd07d42ef83a2
[ "MIT" ]
null
null
null
# if you change credits, you get anal cancer and get murdered by russians in 3 days. """ Support chatbox for pmpermit. Used by incoming messages with trigger as /start Will not work for already approved people. Credits: written by TONY STARK {@MARIODEVS} """ import asyncio import io import telethon.sync from telethon....
58.431138
441
0.563435
import asyncio import io import telethon.sync from telethon.tl.functions.users import GetFullUserRequest import userbot.plugins.sql_helper.pmpermit_sql as pmpermit_sql from telethon import events, errors, functions, types from userbot import ALIVE_NAME, LESS_SPAMMY from userbot.utils import admin_cmd DEFAULTUSER = ...
true
true
1c2df992be4a199d35b73f2d802812983d8cdbe0
332
py
Python
nltk/test/inference_fixt.py
smoitra87/nltk
ca357e5cdcdb137f40c45346bb8bfea618dd863f
[ "Apache-2.0" ]
1
2020-07-08T11:26:30.000Z
2020-07-08T11:26:30.000Z
nltk/test/inference_fixt.py
smoitra87/nltk
ca357e5cdcdb137f40c45346bb8bfea618dd863f
[ "Apache-2.0" ]
null
null
null
nltk/test/inference_fixt.py
smoitra87/nltk
ca357e5cdcdb137f40c45346bb8bfea618dd863f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- def setup_module(module): from nose import SkipTest from nltk.inference.mace import Mace try: m = Mace() m._find_binary("mace4") except LookupError as e: raise SkipTest( "Mace4/Prover9 is not available so inference.doctest was skipped" ...
22.133333
77
0.608434
def setup_module(module): from nose import SkipTest from nltk.inference.mace import Mace try: m = Mace() m._find_binary("mace4") except LookupError as e: raise SkipTest( "Mace4/Prover9 is not available so inference.doctest was skipped" ) from e
true
true
1c2dfb973cecc953979c917b147c635120afc5ab
6,710
py
Python
pyEX/stocks/batch.py
cjwang/pyEX
1b5f40f80110afaa4809ea48fac067033c7bdf89
[ "Apache-2.0" ]
1
2020-10-11T07:05:49.000Z
2020-10-11T07:05:49.000Z
pyEX/stocks/batch.py
cjwang/pyEX
1b5f40f80110afaa4809ea48fac067033c7bdf89
[ "Apache-2.0" ]
null
null
null
pyEX/stocks/batch.py
cjwang/pyEX
1b5f40f80110afaa4809ea48fac067033c7bdf89
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import itertools import pandas as pd from multiprocessing.pool import ThreadPool from ..common import _TIMEFRAME_CHART, _getJson, _raiseIfNotStr, PyEXception, _strOrDate, _toDatetime, _BATCH_TYPES from .fundamentals import _dividendsToDF, _earningsToDF, _financialsToDF, _splitsToDF from .news im...
31.209302
127
0.619821
import itertools import pandas as pd from multiprocessing.pool import ThreadPool from ..common import _TIMEFRAME_CHART, _getJson, _raiseIfNotStr, PyEXception, _strOrDate, _toDatetime, _BATCH_TYPES from .fundamentals import _dividendsToDF, _earningsToDF, _financialsToDF, _splitsToDF from .news import _newsToDF from .pr...
true
true
1c2dfce3b790c8a524ac769021eb8e657cc7add7
3,816
py
Python
UnityPy/math/Vector3.py
hydrargyrum/UnityPy
d119f5a27fa56270630ff40d7762cdf9b4abbac3
[ "MIT" ]
null
null
null
UnityPy/math/Vector3.py
hydrargyrum/UnityPy
d119f5a27fa56270630ff40d7762cdf9b4abbac3
[ "MIT" ]
null
null
null
UnityPy/math/Vector3.py
hydrargyrum/UnityPy
d119f5a27fa56270630ff40d7762cdf9b4abbac3
[ "MIT" ]
null
null
null
class Vector3: def __init__(self, x : float, y : float, z : float): self.X = x self.Y = y self.Z = z """ using System; using System.Runtime.InteropServices; namespace AssetStudio { [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct Vector3 : IEquatable<Vector3> { public float X; ...
24.941176
108
0.446803
class Vector3: def __init__(self, x : float, y : float, z : float): self.X = x self.Y = y self.Z = z
true
true
1c2dfd57a1efc1a0c1debe4d4a7acaa87383ef5d
61
py
Python
auth_main/__init__.py
ajskrilla/PAS_pw_check
056b09e2975b7e1d00c81180d4bdd71bfac91b4d
[ "Apache-2.0" ]
null
null
null
auth_main/__init__.py
ajskrilla/PAS_pw_check
056b09e2975b7e1d00c81180d4bdd71bfac91b4d
[ "Apache-2.0" ]
null
null
null
auth_main/__init__.py
ajskrilla/PAS_pw_check
056b09e2975b7e1d00c81180d4bdd71bfac91b4d
[ "Apache-2.0" ]
null
null
null
#from auth import saveConfig #from auth_check import sec_test
30.5
32
0.852459
true
true
1c2dfe22798ba84d8d56669e7d65e0ff7e5d5fff
38,583
py
Python
graph_ZSL_w_argmin.py
kfirsalo/New-Graph-ZSL
76ccd15e65e915858dca9d9097ddf9252e4250d3
[ "MIT" ]
null
null
null
graph_ZSL_w_argmin.py
kfirsalo/New-Graph-ZSL
76ccd15e65e915858dca9d9097ddf9252e4250d3
[ "MIT" ]
null
null
null
graph_ZSL_w_argmin.py
kfirsalo/New-Graph-ZSL
76ccd15e65e915858dca9d9097ddf9252e4250d3
[ "MIT" ]
null
null
null
import json import multiprocessing from datetime import datetime from node2vec import Node2Vec import pandas as pd import numpy as np import networkx as nx import pickle import os import argparse from numpy import linalg as la from sklearn.metrics.pairwise import cosine_similarity from sklearn import model_selection a...
46.995128
165
0.61509
import json import multiprocessing from datetime import datetime from node2vec import Node2Vec import pandas as pd import numpy as np import networkx as nx import pickle import os import argparse from numpy import linalg as la from sklearn.metrics.pairwise import cosine_similarity from sklearn import model_selection a...
true
true
1c2dfe42c5f11130ad1de80135a4af445e0dabd3
927
py
Python
overwatch/database/zodbDatabaseFactory.py
ostr00000/OVERWATCH
ebf69402b9b1b9e3b92cb96f013692072c2c69f2
[ "BSD-3-Clause" ]
null
null
null
overwatch/database/zodbDatabaseFactory.py
ostr00000/OVERWATCH
ebf69402b9b1b9e3b92cb96f013692072c2c69f2
[ "BSD-3-Clause" ]
null
null
null
overwatch/database/zodbDatabaseFactory.py
ostr00000/OVERWATCH
ebf69402b9b1b9e3b92cb96f013692072c2c69f2
[ "BSD-3-Clause" ]
null
null
null
""" .. code-author: Mateusz Piwowarczyk <>, AGH University of Science and Technology """ import zodburi import ZODB from overwatch.database.databaseFactory import DatabaseFactory from overwatch.database.zodbDatabase import ZodbDatabase class ZodbDatabaseFactory(DatabaseFactory): def __init__(self, databaseLocati...
34.333333
88
0.713053
import zodburi import ZODB from overwatch.database.databaseFactory import DatabaseFactory from overwatch.database.zodbDatabase import ZodbDatabase class ZodbDatabaseFactory(DatabaseFactory): def __init__(self, databaseLocation): DatabaseFactory.__init__(self) self.databaseLocation = databaseLocat...
true
true
1c2dfee0ea5f54665c78d07cdd3c70525819729b
512
py
Python
src/appointments_has_payment/models.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
src/appointments_has_payment/models.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
src/appointments_has_payment/models.py
TheCleverlaure/sicco-web
8e734c9bfa9c99056b6abd5276b65b1e4bf21e23
[ "bzip2-1.0.6" ]
null
null
null
from django.db import models from appointments.models import Citas from payment.models import Pago class CitaTienePago(models.Model): cod_cita = models.ForeignKey(Citas, models.CASCADE, db_column='Cod_Cita', primary_key=True) # Field name made lowercase. cod_pago = models.ForeignKey(Pago, models.CASCADE, db_c...
39.384615
125
0.728516
from django.db import models from appointments.models import Citas from payment.models import Pago class CitaTienePago(models.Model): cod_cita = models.ForeignKey(Citas, models.CASCADE, db_column='Cod_Cita', primary_key=True) cod_pago = models.ForeignKey(Pago, models.CASCADE, db_column='Cod_Pago', unique=Tru...
true
true
1c2dfef350f1f5adf949de096b36c9f0f279a120
2,696
py
Python
addons/io_scene_swbf_msh/msh_model_triangle_strips.py
WHSnyder/SWBF-msh-Blender-Export
b56fa79a1967cdfc8c9b7928a2e5c2f7e940b289
[ "Apache-2.0" ]
7
2019-12-27T04:07:56.000Z
2021-11-14T22:04:32.000Z
addons/io_scene_swbf_msh/msh_model_triangle_strips.py
WHSnyder/SWBF-msh-Blender-Export
b56fa79a1967cdfc8c9b7928a2e5c2f7e940b289
[ "Apache-2.0" ]
null
null
null
addons/io_scene_swbf_msh/msh_model_triangle_strips.py
WHSnyder/SWBF-msh-Blender-Export
b56fa79a1967cdfc8c9b7928a2e5c2f7e940b289
[ "Apache-2.0" ]
3
2019-11-23T09:07:21.000Z
2020-10-06T16:22:49.000Z
""" Contains triangle strip generation functions for GeometrySegment. """ from typing import List, Tuple from copy import deepcopy from .msh_model import * def create_models_triangle_strips(models: List[Model]) -> List[Model]: """ Create the triangle strips for a list of models geometry. """ for model in mod...
32.878049
98
0.592359
from typing import List, Tuple from copy import deepcopy from .msh_model import * def create_models_triangle_strips(models: List[Model]) -> List[Model]: for model in models: if model.geometry is not None: for segment in model.geometry: segment.triangle_strips = create_triangle...
true
true
1c2e006454f1729f6cbb17222e43a1991f558056
852
py
Python
ore_combinators/combinators/string.py
kraglik/ore
fca49bb8cd46bcdf3a6c8cde65cf6aed9a0bd741
[ "MIT" ]
1
2021-06-09T13:45:47.000Z
2021-06-09T13:45:47.000Z
ore_combinators/combinators/string.py
kraglik/ore
fca49bb8cd46bcdf3a6c8cde65cf6aed9a0bd741
[ "MIT" ]
null
null
null
ore_combinators/combinators/string.py
kraglik/ore
fca49bb8cd46bcdf3a6c8cde65cf6aed9a0bd741
[ "MIT" ]
null
null
null
from typing import Tuple, Any from ore_combinators.combinator import combinator from ore_combinators.parser_state import ParserState from ore_combinators.result import Result from ore_combinators.error import ParserError, EndOfFileError class string(combinator): # noqa def __init__(self, s: str): self....
29.37931
70
0.647887
from typing import Tuple, Any from ore_combinators.combinator import combinator from ore_combinators.parser_state import ParserState from ore_combinators.result import Result from ore_combinators.error import ParserError, EndOfFileError class string(combinator): def __init__(self, s: str): self._strin...
true
true
1c2e015a72b7b341f0a82c3c4414419aa6b738bc
9,328
py
Python
healthyForce/MTLModels.py
HypnosPy/HypnosPy
28b17d07ee78f7714bbbbd66f6253764addf9d94
[ "MIT" ]
4
2022-01-02T18:40:57.000Z
2022-02-17T12:59:57.000Z
healthyForce/MTLModels.py
ippozuelo/HypnosPy
28b17d07ee78f7714bbbbd66f6253764addf9d94
[ "MIT" ]
2
2020-11-11T07:13:56.000Z
2020-11-11T07:38:54.000Z
healthyForce/MTLModels.py
ippozuelo/HypnosPy
28b17d07ee78f7714bbbbd66f6253764addf9d94
[ "MIT" ]
2
2020-11-24T22:46:31.000Z
2021-02-05T16:43:12.000Z
import torch import torch.nn as nn import torch.optim as optim import numpy as np class MTL: def __init__(self): pass def aggregate_losses(self, losses): pass def adjust_after_validation(self, losses, epoch): pass class MTLRandom(MTL): def __init__(self, ntasks, verbose=1): ...
35.603053
113
0.547491
import torch import torch.nn as nn import torch.optim as optim import numpy as np class MTL: def __init__(self): pass def aggregate_losses(self, losses): pass def adjust_after_validation(self, losses, epoch): pass class MTLRandom(MTL): def __init__(self, ntasks, verbose=1): ...
true
true
1c2e015f2562f36b943e25339f4dc74362fc5ebc
25,303
py
Python
source/code/handlers/execution_handler.py
awslabs/aws-ops-automator
362abd0717b48ecca7f20d8985ae7d76f045daf3
[ "Apache-2.0" ]
94
2017-08-01T05:28:45.000Z
2021-09-10T07:18:46.000Z
source/code/handlers/execution_handler.py
aws-solutions/aws-ops-automator
362abd0717b48ecca7f20d8985ae7d76f045daf3
[ "Apache-2.0" ]
27
2018-02-15T17:14:09.000Z
2021-04-27T11:28:42.000Z
source/code/handlers/execution_handler.py
awslabs/aws-ops-automator
362abd0717b48ecca7f20d8985ae7d76f045daf3
[ "Apache-2.0" ]
50
2017-08-01T05:29:04.000Z
2021-08-11T20:09:07.000Z
###################################################################################################################### # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
50.50499
130
0.588152
on_id=self.action_id, task=self.task, task_metrics=self.metrics, status=handlers.STATUS_WAIT_FOR_COMPLETION, status_data={ ...
true
true
1c2e01b39bd7c410b1525225e5bc812b3db81274
64,988
py
Python
ansible_runner/interface.py
AlanCoding/ansible-runner
4c6b7d0c15c62159f971522a23e4491487703472
[ "Apache-2.0" ]
1
2022-02-19T05:07:09.000Z
2022-02-19T05:07:09.000Z
ansible_runner/interface.py
aknochow/ansible-runner
996a00dd0cd449e129a693e53b73770a6de34e36
[ "Apache-2.0" ]
null
null
null
ansible_runner/interface.py
aknochow/ansible-runner
996a00dd0cd449e129a693e53b73770a6de34e36
[ "Apache-2.0" ]
1
2021-11-22T16:03:11.000Z
2021-11-22T16:03:11.000Z
# Copyright (c) 2016 Ansible by Red Hat, 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 Licen...
66.928939
159
0.719471
import os import json import sys import threading import logging from ansible_runner import output from ansible_runner.config.runner import RunnerConfig from ansible_runner.config.command import CommandConfig from ansible_runner.config.inventory import InventoryConfig from ansible_runner.config.ansi...
true
true
1c2e0224eddb941725f123b7e5a73c2869f807cd
1,911
py
Python
var/spack/repos/builtin/packages/libnotify/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/libnotify/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/libnotify/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Libnotify(MesonPackage): """libnotify is a library for sending desktop notificatio...
32.948276
95
0.632653
from spack.package import * class Libnotify(MesonPackage): homepage = "https://github.com/GNOME/libnotify" url = "https://github.com/GNOME/libnotify/archive/0.7.9.tar.gz" version('0.7.9', sha256='9bd4f5fa911d27567e7cc2d2d09d69356c16703c4e8d22c0b49a5c45651f3af0') ...
true
true
1c2e0332d2980ce4a16bec4961c875df673783a2
1,624
py
Python
HackerRank/Interview Preparation Kit/Dictionaries and Hashmaps/Hash Tables: Ransom Note/solution.py
ltdangkhoa/Computer-Science-Fundamental
b70ba714e1dd13fcb377125e047c5fc08d3a82b3
[ "MIT" ]
null
null
null
HackerRank/Interview Preparation Kit/Dictionaries and Hashmaps/Hash Tables: Ransom Note/solution.py
ltdangkhoa/Computer-Science-Fundamental
b70ba714e1dd13fcb377125e047c5fc08d3a82b3
[ "MIT" ]
null
null
null
HackerRank/Interview Preparation Kit/Dictionaries and Hashmaps/Hash Tables: Ransom Note/solution.py
ltdangkhoa/Computer-Science-Fundamental
b70ba714e1dd13fcb377125e047c5fc08d3a82b3
[ "MIT" ]
null
null
null
"""solution.py""" import math import os import random import re import sys import timeit # from collections import Counter def checkMagazine(magazine, note): """ O(nk) To be improved: build a hash function to store keywords as numeric Much more simpler with built-in Python: using collections Counter...
25.375
73
0.595443
import math import os import random import re import sys import timeit def checkMagazine(magazine, note): dict_magazine = {} for word in magazine: if not word in dict_magazine: dict_magazine[word] = 1 else: dict_magazine[word] += 1 can_repli...
true
true
1c2e054ce3389cb1f00d39e8b788777118c75d52
793
py
Python
test_data/files/paramatrized_test.py
aleksul/pytest-motor
20dd246fce777f0e21d1d03244e494e818a3dd52
[ "MIT" ]
4
2021-07-10T15:21:01.000Z
2021-07-17T12:11:06.000Z
test_data/files/paramatrized_test.py
aleksul/pytest-motor
20dd246fce777f0e21d1d03244e494e818a3dd52
[ "MIT" ]
47
2021-07-12T13:59:19.000Z
2022-01-31T20:49:03.000Z
test_data/files/paramatrized_test.py
aleksul/pytest-motor
20dd246fce777f0e21d1d03244e494e818a3dd52
[ "MIT" ]
4
2021-07-13T19:38:47.000Z
2021-07-17T13:14:46.000Z
"""A test file with a paramatrized test.""" from typing import Any, Dict import pytest from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection, AsyncIOMotorDatabase @pytest.mark.asyncio # yapf: disable @pytest.mark.parametrize('document', [ ({}), ({'foo': 'bar'}), ({'wibble': 'wobble'}...
31.72
99
0.64691
from typing import Any, Dict import pytest from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection, AsyncIOMotorDatabase @pytest.mark.asyncio @pytest.mark.parametrize('document', [ ({}), ({'foo': 'bar'}), ({'wibble': 'wobble'}), ]) async def test_with_parametrization(motor_client: As...
true
true
1c2e0552fb92d2d6b2fe226d4ae42a3dcd9204c9
2,563
py
Python
Chap 3/ElifWorkSheet.py
dwhickox/NCHS-Programming-1-Python-Programs
96eba3826585a81a015740f59329c7a06afc9db7
[ "MIT" ]
null
null
null
Chap 3/ElifWorkSheet.py
dwhickox/NCHS-Programming-1-Python-Programs
96eba3826585a81a015740f59329c7a06afc9db7
[ "MIT" ]
null
null
null
Chap 3/ElifWorkSheet.py
dwhickox/NCHS-Programming-1-Python-Programs
96eba3826585a81a015740f59329c7a06afc9db7
[ "MIT" ]
null
null
null
#David Hickox # Question 1 car = input("What kind of car do you drive?") if car.lower() == "toyota" or car.lower() == "honda": msg = "you drive a fuel efficient car!" else: msg = "you ruin the enviroment" print(msg) # Question 2 name = input("What is your name?") savings = float(input("What is your savi...
29.45977
120
0.65119
car = input("What kind of car do you drive?") if car.lower() == "toyota" or car.lower() == "honda": msg = "you drive a fuel efficient car!" else: msg = "you ruin the enviroment" print(msg) name = input("What is your name?") savings = float(input("What is your savings account balance?")) checking = fl...
true
true
1c2e059a45fc0fd56329ecec30a7e9b124c7c602
4,735
py
Python
awward/settings.py
ruthjomo/Awwardsapp
8e2a517e569f788f803219a143f2ae9e5dedab13
[ "Unlicense", "MIT" ]
null
null
null
awward/settings.py
ruthjomo/Awwardsapp
8e2a517e569f788f803219a143f2ae9e5dedab13
[ "Unlicense", "MIT" ]
null
null
null
awward/settings.py
ruthjomo/Awwardsapp
8e2a517e569f788f803219a143f2ae9e5dedab13
[ "Unlicense", "MIT" ]
null
null
null
""" Django settings for awward project. Generated by 'django-admin startproject' using Django 1.11.29. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ from path...
25.456989
91
0.690602
from pathlib import Path import os import django_heroku import dj_database_url from decouple import config,Csv EMAIL_USE_TLS = config('EMAIL_USE_TLS') EMAIL_HOST = config('EMAIL_HOST') EMAIL_PORT = config('EMAIL_PORT') EMAIL_HOST_USER = config('EMAIL_HOST_USER') EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD') M...
true
true
1c2e063141aeb825b131ec6f67df244c6f55158a
878
py
Python
openpyxl/chart/tests/test_updown_bars.py
nickpell/openpyxl
160c730c419f3796d2208b05c3b26a2b2fc10eb1
[ "MIT" ]
6
2018-05-15T05:08:52.000Z
2021-12-23T12:31:28.000Z
openpyxl/chart/tests/test_updown_bars.py
nickpell/openpyxl
160c730c419f3796d2208b05c3b26a2b2fc10eb1
[ "MIT" ]
1
2019-08-27T15:27:48.000Z
2019-08-27T15:27:48.000Z
openpyxl/chart/tests/test_updown_bars.py
nickpell/openpyxl
160c730c419f3796d2208b05c3b26a2b2fc10eb1
[ "MIT" ]
6
2020-03-23T15:59:14.000Z
2021-09-18T09:54:57.000Z
from __future__ import absolute_import # Copyright (c) 2010-2018 openpyxl import pytest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml @pytest.fixture def UpDownBars(): from ..updown_bars import UpDownBars return UpDownBars class TestUpDownBars: d...
23.105263
55
0.624146
from __future__ import absolute_import import pytest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml @pytest.fixture def UpDownBars(): from ..updown_bars import UpDownBars return UpDownBars class TestUpDownBars: def test_ctor(self, UpDownBars): ...
true
true
1c2e06e968e9443337111c075182e95447ba19e6
937
py
Python
BB/bbObjects/items/modules/bbJumpDriveModule.py
mwaitzman/GOF2BountyBot
b66026228b752b07ac4734ca74b60730dbd74995
[ "MIT" ]
null
null
null
BB/bbObjects/items/modules/bbJumpDriveModule.py
mwaitzman/GOF2BountyBot
b66026228b752b07ac4734ca74b60730dbd74995
[ "MIT" ]
null
null
null
BB/bbObjects/items/modules/bbJumpDriveModule.py
mwaitzman/GOF2BountyBot
b66026228b752b07ac4734ca74b60730dbd74995
[ "MIT" ]
null
null
null
from . import bbModule from ....bbConfig import bbData class bbJumpDriveModule(bbModule.bbModule): def __init__(self, name, aliases, value=0, wiki="", manufacturer="", icon="", emoji=""): super(bbJumpDriveModule, self).__init__(name, aliases, value=value, wiki=wiki, manufacturer=manufacturer, icon=icon, em...
52.055556
180
0.66809
from . import bbModule from ....bbConfig import bbData class bbJumpDriveModule(bbModule.bbModule): def __init__(self, name, aliases, value=0, wiki="", manufacturer="", icon="", emoji=""): super(bbJumpDriveModule, self).__init__(name, aliases, value=value, wiki=wiki, manufacturer=manufacturer, icon=icon, em...
true
true
1c2e06eb67387083caca4750c1afe4c37eb06687
3,053
py
Python
python/classes-dealing-with-complex-numbers.py
blog-a1/hackeRRank
72923ee08c8759bd5a10ba6c390b6755fe2bd2e2
[ "MIT" ]
1
2021-01-13T11:52:27.000Z
2021-01-13T11:52:27.000Z
python/classes-dealing-with-complex-numbers.py
blog-a1/hackeRRank
72923ee08c8759bd5a10ba6c390b6755fe2bd2e2
[ "MIT" ]
null
null
null
python/classes-dealing-with-complex-numbers.py
blog-a1/hackeRRank
72923ee08c8759bd5a10ba6c390b6755fe2bd2e2
[ "MIT" ]
null
null
null
from math import pow class Complex(object): def __init__(self, real, imaginary): self.real=real self.imaginary=imaginary def __add__(self, no): a=self.real+no.real b=self.imaginary+no.imaginary if a<0 and b<0: return ("-%.2f-%.2fi"%(abs(a),abs(b))) ...
34.303371
70
0.457255
from math import pow class Complex(object): def __init__(self, real, imaginary): self.real=real self.imaginary=imaginary def __add__(self, no): a=self.real+no.real b=self.imaginary+no.imaginary if a<0 and b<0: return ("-%.2f-%.2fi"%(abs(a),abs(b))) ...
true
true
1c2e089afd686ced49da2f85d95f318c20c156ee
2,283
py
Python
setup.py
powellc/hacklabs
c39f05cb9ea37e98260369c09a618e7870c61f3d
[ "BSD-3-Clause" ]
null
null
null
setup.py
powellc/hacklabs
c39f05cb9ea37e98260369c09a618e7870c61f3d
[ "BSD-3-Clause" ]
9
2018-02-23T13:32:33.000Z
2018-02-23T13:32:34.000Z
setup.py
powellc/hacklabs
c39f05cb9ea37e98260369c09a618e7870c61f3d
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys version = __import__('hacklabs').__version__ install_requires = [ 'setuptools', 'Django==1.6.5', 'django-configurations==0.8', 'dj-database-url==0.3.0', 'pylibmc==1.3.0', 'boto==2.9.5...
26.858824
59
0.599212
from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys version = __import__('hacklabs').__version__ install_requires = [ 'setuptools', 'Django==1.6.5', 'django-configurations==0.8', 'dj-database-url==0.3.0', 'pylibmc==1.3.0', 'boto==2.9.5...
true
true
1c2e09fc76e4f17fe7097352772c5c54fd08d6fd
5,351
py
Python
deepspeech/frontend/augmentor/spec_augment.py
iclementine/DeepSpeech
d0635c6592a2e787ca296e15241e7371a83ca55f
[ "Apache-2.0" ]
1
2021-05-14T23:27:13.000Z
2021-05-14T23:27:13.000Z
deepspeech/frontend/augmentor/spec_augment.py
xihuanafeng/DeepSpeech
2bdf4c946af66cc173d638c072ba6435cd18a286
[ "Apache-2.0" ]
null
null
null
deepspeech/frontend/augmentor/spec_augment.py
xihuanafeng/DeepSpeech
2bdf4c946af66cc173d638c072ba6435cd18a286
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle 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...
31.292398
87
0.58419
import numpy as np from deepspeech.frontend.augmentor.base import AugmentorBase from deepspeech.utils.log import Log logger = Log(__name__).getlog() class SpecAugmentor(AugmentorBase): def __init__(self, rng, F, T, n_freq_masks, ...
true
true
1c2e0a9cb74826110c9ce4eea4b5787e91935848
6,608
py
Python
test/functional/wallet_txn_clone.py
HZapperz/JahCoin
94f0e3f60a0846bc331f334ccab0642913b9b0bd
[ "MIT" ]
13
2019-01-23T04:36:05.000Z
2022-02-21T11:20:25.000Z
test/functional/wallet_txn_clone.py
songMW/bitcoin
5eb32d23841bbcd8eaf7ba49dc4ddfd822bd4773
[ "MIT" ]
null
null
null
test/functional/wallet_txn_clone.py
songMW/bitcoin
5eb32d23841bbcd8eaf7ba49dc4ddfd822bd4773
[ "MIT" ]
3
2019-01-24T07:48:15.000Z
2021-06-11T13:34:44.000Z
#!/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 the wallet accounts properly when there are cloned transactions with malleated scriptsigs.""" fro...
44.053333
160
0.641344
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, connect_nodes, disconnect_nodes, sync_blocks, ) class TxnMallTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 4 def skip_test_if_missing_module(sel...
true
true
1c2e0ad3f936ed49b51ecbdc1a3f4c027568e304
34
py
Python
services/users/app/api/utils/__init__.py
yuuta1999/microservice-with-flask
6ad64341edb42c7f145aabc1e38e2619df75d444
[ "MIT" ]
1
2019-07-12T07:38:16.000Z
2019-07-12T07:38:16.000Z
services/users/app/api/utils/__init__.py
yuuta1999/microservice-with-flask
6ad64341edb42c7f145aabc1e38e2619df75d444
[ "MIT" ]
4
2021-03-09T09:19:49.000Z
2022-02-26T12:14:12.000Z
services/users/app/api/utils/__init__.py
yuuta1999/microservice-with-flask
6ad64341edb42c7f145aabc1e38e2619df75d444
[ "MIT" ]
1
2020-03-31T17:36:11.000Z
2020-03-31T17:36:11.000Z
# users/app/api/utils/__init__.py
17
33
0.764706
true
true
1c2e0b07893a87a3f953d0af53e08c131465a2dd
25,200
py
Python
AICamera/app/src/main/cpp/caffe2/python/layer_model_helper.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
1
2020-01-10T02:56:03.000Z
2020-01-10T02:56:03.000Z
AICamera/app/src/main/cpp/caffe2/python/layer_model_helper.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
null
null
null
AICamera/app/src/main/cpp/caffe2/python/layer_model_helper.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
null
null
null
# @package layer_model_helper # Module caffe2.python.layer_model_helper from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, model_helper, schema, scope, utils, muji from caffe2.pytho...
38.124054
88
0.598849
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, model_helper, schema, scope, utils, muji from caffe2.python.modeling.parameter_info import ( ParameterInfo, ) from caffe2.p...
true
true
1c2e0b78f96a8e24dcf04517c311fe46e9e442c9
486
py
Python
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "MIT" ]
1
2022-02-18T01:17:27.000Z
2022-02-18T01:17:27.000Z
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "MIT" ]
null
null
null
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py
kazrael2119/azure-sdk-for-python
485dd7b1b5ac41c1a5b9991e402b4035b55f437a
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# 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 may ...
48.6
94
0.526749
VERSION = "2.2.1"
true
true
1c2e0bb59452ec4bfcecb5fd5e9c03320a4084ba
1,267
py
Python
anytask/groups/migrations/0001_initial.py
antselevich/anytask
b00ea8ad929f267ac4a37d1a0eaabce28c5b02cf
[ "MIT" ]
31
2015-03-24T21:11:44.000Z
2022-03-28T22:55:12.000Z
anytask/groups/migrations/0001_initial.py
antselevich/anytask
b00ea8ad929f267ac4a37d1a0eaabce28c5b02cf
[ "MIT" ]
286
2015-06-11T10:32:16.000Z
2022-03-28T12:01:04.000Z
anytask/groups/migrations/0001_initial.py
bcskda/anytask
5a359dcb669b689fc5a4f1705f2c88cd031ab37d
[ "MIT" ]
44
2015-05-23T21:30:51.000Z
2021-11-07T12:56:59.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('years', '000...
35.194444
114
0.604578
from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('years', '0001_initial'), ] ...
true
true
1c2e0e61dd9d9febbf9044acc472737cf3b71b63
2,004
py
Python
combine_alignments_all3codons_distinguish_exons_nexuspartition.py
SethMusker/HybPiper_phasing_phyloscripts_modified
bfa9e38d48c6105d660383fa1ea60fcb3e1998a4
[ "CC0-1.0" ]
null
null
null
combine_alignments_all3codons_distinguish_exons_nexuspartition.py
SethMusker/HybPiper_phasing_phyloscripts_modified
bfa9e38d48c6105d660383fa1ea60fcb3e1998a4
[ "CC0-1.0" ]
null
null
null
combine_alignments_all3codons_distinguish_exons_nexuspartition.py
SethMusker/HybPiper_phasing_phyloscripts_modified
bfa9e38d48c6105d660383fa1ea60fcb3e1998a4
[ "CC0-1.0" ]
null
null
null
#Script to combine exon and intron alignments for a gene and generate a NEXUS formatted partition file. # Seth's edit: specify all three codon positions as separate partitions (as recommended by PartitionFinder) # also: write to 'exons_only.fasta/partition' if no intron file exists # NB at present this script does not...
35.785714
108
0.667665
# also: write to 'exons_only.fasta/partition' if no intron file exists # NB at present this script does not work with python 3 import sys,os from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord if len(sys.argv) < 4: print("Usage: python combine_alignments.py exon.fasta intron.fasta...
true
true
1c2e0ec76ac723f9616df1e26e9f8568738a1846
3,049
py
Python
docs/conf.py
ClaraCDouglas/CarbonUptakeInWG
b435f51ab64e472cced0277ad3b932e2a9c9414b
[ "MIT" ]
2
2021-10-05T14:56:53.000Z
2022-01-30T18:27:53.000Z
docs/conf.py
ClaraCDouglas/CarbonUptakeInWG
b435f51ab64e472cced0277ad3b932e2a9c9414b
[ "MIT" ]
1
2021-07-14T10:34:29.000Z
2021-07-14T10:34:29.000Z
docs/conf.py
ClaraCDouglas/CarbonUptakeInWG
b435f51ab64e472cced0277ad3b932e2a9c9414b
[ "MIT" ]
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...
35.045977
79
0.679895
import os import pathlib import sys print("python exec:", sys.executable) print("sys.path:", sys.path) root = pathlib.Path(__file__).parent.parent.absolute() os.environ["PYTHONPATH"] = str(root) sys.path.insert(0, str(root)) import carbonuptakeinwg project = "carbonuptakeinwg" copyright = "2021, Cla...
true
true
1c2e0ed4c75c604321d2b67d71992aa45ce7be39
4,480
py
Python
examples/python/matrix_from_duration_data.py
raphaelchaves/transitionMatrix
6ac54c8c6ce15dc81aa5e894cfcfabb127634b33
[ "Apache-2.0" ]
null
null
null
examples/python/matrix_from_duration_data.py
raphaelchaves/transitionMatrix
6ac54c8c6ce15dc81aa5e894cfcfabb127634b33
[ "Apache-2.0" ]
2
2021-01-13T21:58:06.000Z
2021-02-07T12:20:00.000Z
examples/python/matrix_from_duration_data.py
raphaelchaves/transitionMatrix
6ac54c8c6ce15dc81aa5e894cfcfabb127634b33
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 # (c) 2017-2020 Open Risk, all rights reserved # # TransitionMatrix is licensed under the Apache 2.0 license a copy of which is included # in the source distribution of TransitionMatrix. This is notwithstanding any licenses of # third-party software included in this distribution. You may not use this...
41.481481
113
0.69933
import pandas as pd import transitionMatrix as tm from transitionMatrix import source_path from transitionMatrix.estimators import cohort_estimator as es dataset_path = source_path + "datasets/" example = 3 if example == 1: data = pd.read_csv(dataset_path + 'synthetic_data1.csv', dtyp...
true
true
1c2e0f739c71c9793927448ad4aeba67410ef221
13,713
py
Python
Train.py
karino2/Pytorch-Handwritten-Mathematical-Expression-Recognition
6c6139624c71fa68a0a386a94346cfab39d0f087
[ "MIT" ]
null
null
null
Train.py
karino2/Pytorch-Handwritten-Mathematical-Expression-Recognition
6c6139624c71fa68a0a386a94346cfab39d0f087
[ "MIT" ]
null
null
null
Train.py
karino2/Pytorch-Handwritten-Mathematical-Expression-Recognition
6c6139624c71fa68a0a386a94346cfab39d0f087
[ "MIT" ]
null
null
null
''' Python 3.6 Pytorch 0.4 Written by Hongyu Wang in Beihang university ''' import torch import math import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import numpy import torch.utils.data as data from data_iterator import dataIterator from Densenet_torchvision import densenet121...
37.263587
125
0.600379
import torch import math import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import numpy import torch.utils.data as data from data_iterator import dataIterator from Densenet_torchvision import densenet121 from Attention_RNN import AttnDecoderRNN import random def cmp_result(labe...
true
true
1c2e1066fb3d5b44d2588a5b81741d29c458ba76
2,496
py
Python
kratos_salome_plugin/gui/project_path_handler.py
armingeiser/KratosSalomePlugin
d402ca9edef8dff071ceabf0ebac0d858a6fbfcc
[ "BSD-3-Clause" ]
6
2020-01-23T20:54:17.000Z
2021-02-19T09:52:29.000Z
kratos_salome_plugin/gui/project_path_handler.py
armingeiser/KratosSalomePlugin
d402ca9edef8dff071ceabf0ebac0d858a6fbfcc
[ "BSD-3-Clause" ]
20
2020-01-25T16:05:43.000Z
2020-12-18T20:36:46.000Z
kratos_salome_plugin/gui/project_path_handler.py
armingeiser/KratosSalomePlugin
d402ca9edef8dff071ceabf0ebac0d858a6fbfcc
[ "BSD-3-Clause" ]
3
2020-05-27T13:31:08.000Z
2020-12-18T19:50:43.000Z
# _ __ _ ___ _ ___ _ _ # | |/ /_ _ __ _| |_ ___ __/ __| __ _| |___ _ __ ___| _ \ |_ _ __ _(_)_ _ # | ' <| '_/ _` | _/ _ (_-<__ \/ _` | / _ \ ' \/ -_) _/ | || / _` | | ' \ # |_|\_\_| \__,_|\__\___/__/___/\__,_|_\___/_|_|_\___|_| |_|\_,_\__, |_|_||_| # ...
29.364706
107
0.584936
from pathlib import Path import logging logger = logging.getLogger(__name__) from PyQt5.QtWidgets import QFileDialog from kratos_salome_plugin.exceptions import UserInputError class ProjectPathHandler: def __init__(self): self.last_path = Path.home() def GetOpenPath(self, par...
true
true
1c2e107c782982208a14f5963f086828266d73c3
1,277
py
Python
src/pre_process/ReadData.py
joaorura/k-NN_Iris_Classificator
e7d6eab400911587e4ced89fe4bb1b194e60527b
[ "MIT" ]
null
null
null
src/pre_process/ReadData.py
joaorura/k-NN_Iris_Classificator
e7d6eab400911587e4ced89fe4bb1b194e60527b
[ "MIT" ]
null
null
null
src/pre_process/ReadData.py
joaorura/k-NN_Iris_Classificator
e7d6eab400911587e4ced89fe4bb1b194e60527b
[ "MIT" ]
null
null
null
import csv from copy import deepcopy from utils.check_functions import check_type class ReadData: def _check_values(self): check_type(self._path, str, "O campo path deve ser uma string que contem o caminho para o csv com os dados.") def _execute(self): with open(self._path) as file: ...
27.76087
117
0.552858
import csv from copy import deepcopy from utils.check_functions import check_type class ReadData: def _check_values(self): check_type(self._path, str, "O campo path deve ser uma string que contem o caminho para o csv com os dados.") def _execute(self): with open(self._path) as file: ...
true
true
1c2e107c86e64abef11fe9830e61fc754660ecb1
16,139
py
Python
django_mfa/views.py
juwaini/django-mfa
910b0f544ae5bebc02434cc6b176f74b5040f3b7
[ "MIT" ]
null
null
null
django_mfa/views.py
juwaini/django-mfa
910b0f544ae5bebc02434cc6b176f74b5040f3b7
[ "MIT" ]
null
null
null
django_mfa/views.py
juwaini/django-mfa
910b0f544ae5bebc02434cc6b176f74b5040f3b7
[ "MIT" ]
null
null
null
import base64 import codecs import random import hashlib import re import string from django.http import HttpResponse, HttpResponseRedirect from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, resolve_url, get_object_or_404 from django...
37.707944
195
0.656546
import base64 import codecs import random import hashlib import re import string from django.http import HttpResponse, HttpResponseRedirect from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, resolve_url, get_object_or_404 from django...
true
true
1c2e117b00b2db71fc25635adafe1b717fcbdc66
664
py
Python
mod/data_process/__init__.py
Ulti-Dreisteine/data-information-measurement
9ef777c28534867d07d9ab1a1b95d69a385043f1
[ "MIT" ]
1
2021-12-17T13:51:11.000Z
2021-12-17T13:51:11.000Z
mod/data_process/__init__.py
Ulti-Dreisteine/data-information-measurement
9ef777c28534867d07d9ab1a1b95d69a385043f1
[ "MIT" ]
null
null
null
mod/data_process/__init__.py
Ulti-Dreisteine/data-information-measurement
9ef777c28534867d07d9ab1a1b95d69a385043f1
[ "MIT" ]
1
2021-12-12T12:38:36.000Z
2021-12-12T12:38:36.000Z
# -*- coding: utf-8 -*- """ Created on 2021/02/27 17:03:09 @File -> __init__.py @Author: luolei @Email: dreisteine262@163.com @Describe: 初始化 """ __all__ = ['search_nearest_neighbors_in_list'] import bisect def search_nearest_neighbors_in_list(lst, x): """ 寻找x在有序lst中的两侧(或单侧)邻点值. :param x: float :param lst: l...
17.945946
58
0.661145
__all__ = ['search_nearest_neighbors_in_list'] import bisect def search_nearest_neighbors_in_list(lst, x): if x in lst: return [x] else: if x <= lst[0]: neighbors = [lst[0]] elif x >= lst[-1]: neighbors = [lst[-1]] else: left_idx = bisect.bisect_left(lst, x) - 1 right_idx = left_idx + 1 ne...
true
true
1c2e1363d0cbbeedc29abaa18b06b0b3d68bc7b4
2,231
py
Python
carla_utils/agents/vehicle_model.py
IamWangYunKai/DG-TrajGen
0a8aab7e1c05111a5afe43d53801c55942e9ff56
[ "MIT" ]
31
2021-09-15T00:43:43.000Z
2022-03-27T22:57:21.000Z
carla_utils/agents/vehicle_model.py
zhangdongkun98/carla-utils
a370db53589841c8cffe95c8df43dfc036176431
[ "MIT" ]
1
2021-12-09T03:08:13.000Z
2021-12-15T07:08:31.000Z
carla_utils/agents/vehicle_model.py
zhangdongkun98/carla-utils
a370db53589841c8cffe95c8df43dfc036176431
[ "MIT" ]
2
2021-11-26T05:45:18.000Z
2022-01-19T12:46:41.000Z
import numpy as np import torch import torch.nn as nn from ..basic import pi2pi_numpy, pi2pi_tensor from ..augment import State class RealModel(object): def __call__(self, *args, **kwargs): return self.forward(*args, **kwargs) def forward(self, vehicle, control): vehicle.apply_control(contr...
28.602564
93
0.549978
import numpy as np import torch import torch.nn as nn from ..basic import pi2pi_numpy, pi2pi_tensor from ..augment import State class RealModel(object): def __call__(self, *args, **kwargs): return self.forward(*args, **kwargs) def forward(self, vehicle, control): vehicle.apply_control(contr...
true
true
1c2e139b9074398a0d52513986701c7d155a28ec
10
py
Python
test/orm/__init__.py
vollov/py-lab
0a1a3c93c5decaa5246fab981bcc2563cc42c6d0
[ "MIT" ]
null
null
null
test/orm/__init__.py
vollov/py-lab
0a1a3c93c5decaa5246fab981bcc2563cc42c6d0
[ "MIT" ]
null
null
null
test/orm/__init__.py
vollov/py-lab
0a1a3c93c5decaa5246fab981bcc2563cc42c6d0
[ "MIT" ]
null
null
null
import orm
10
10
0.9
import orm
true
true
1c2e14776c2596c0ba1de38b0ccc53066ea2ca9a
431
py
Python
python/testData/hierarchy/call/Static/Constructor/main.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/hierarchy/call/Static/Constructor/main.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/hierarchy/call/Static/Constructor/main.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class A(): def __init__(self): invoke1(self) invoke2(self) def method1(self): pass def method2(self): pass def invoke1(p): p.method1() def invoke2(p): p.method2() def invokeA(): a = A() a.method1() a.method2() def new_class_func(): clas...
13.46875
28
0.487239
class A(): def __init__(self): invoke1(self) invoke2(self) def method1(self): pass def method2(self): pass def invoke1(p): p.method1() def invoke2(p): p.method2() def invokeA(): a = A() a.method1() a.method2() def new_class_func(): clas...
true
true
1c2e157292b3ec5293e01f313fef45c0f7400d12
5,989
py
Python
tensorflow/python/distribute/cross_device_utils_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/cross_device_utils_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/cross_device_utils_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
41.881119
81
0.68008
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized from tensorflow.python.distribute import combinations from tensorflow.python.distribute import cross_device_utils from tensorflow.python.distribut...
true
true
1c2e15f2b3b1565a30f03c85e3501e602cd8a15e
113
py
Python
core/__init__.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/__init__.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/__init__.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
from .datasets import * from .layers import * from .models import * #from .trainers import * from .utils import *
22.6
24
0.734513
from .datasets import * from .layers import * from .models import * from .utils import *
true
true
1c2e1629fe3fa776921a9c5d7b007b9b903c32cf
761
py
Python
test/log/test_LogLevelConverter.py
pip-services-python/pip-services-components-python
428ec7a9f0f0bdfa4d39cecb2541e87b1e5d33e0
[ "MIT" ]
null
null
null
test/log/test_LogLevelConverter.py
pip-services-python/pip-services-components-python
428ec7a9f0f0bdfa4d39cecb2541e87b1e5d33e0
[ "MIT" ]
null
null
null
test/log/test_LogLevelConverter.py
pip-services-python/pip-services-components-python
428ec7a9f0f0bdfa4d39cecb2541e87b1e5d33e0
[ "MIT" ]
1
2020-03-11T21:46:42.000Z
2020-03-11T21:46:42.000Z
# -*- coding: utf-8 -*- """ tests.log.test_LogLevelConverter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) Conceptual Vision Consulting LLC 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ from pip_services3_components.log import LogLevel from pip_servi...
30.44
93
0.69251
from pip_services3_components.log import LogLevel from pip_services3_components.log import LogLevelConverter class TestLogLevel: def test_to_log_level(self): assert LogLevelConverter.to_log_level("1") == LogLevel.Fatal assert LogLevelConverter.to_log_level("fatal") == LogLevel.Fatal def te...
true
true
1c2e1675329e828da8d7efd98263b261a253de83
11,417
py
Python
one/util.py
OpenNebula/addon-linstor
71cc6d5d625929f0350cec866ff07e953fcebe12
[ "Apache-2.0" ]
11
2018-10-18T19:53:52.000Z
2021-11-08T11:42:56.000Z
one/util.py
OpenNebula/addon-linstor
71cc6d5d625929f0350cec866ff07e953fcebe12
[ "Apache-2.0" ]
13
2018-11-26T16:15:35.000Z
2021-08-02T18:24:14.000Z
one/util.py
OpenNebula/addon-linstor
71cc6d5d625929f0350cec866ff07e953fcebe12
[ "Apache-2.0" ]
7
2018-11-08T03:44:59.000Z
2021-05-16T20:47:19.000Z
# -*- coding: utf-8 -*- """ OpenNebula Driver for Linstor Copyright 2018 LINBIT USA 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...
29.57772
117
0.666287
from __future__ import print_function import sys import os import subprocess import syslog import traceback import json import re REMOTES_DIR = "/var/lib/one/remotes/" ONE_LOCATION = os.getenv("ONE_LOCATION") if ONE_LOCATION: REMOTES_DIR = os.path.join(ONE_LOCATION, "var/remotes") SCRIPTS_COMMON = REMOTES_DIR...
true
true
1c2e16a41b14402840f19096fafcac8f8c1402b8
6,926
py
Python
src/sardana/sardanabase.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
src/sardana/sardanabase.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
src/sardana/sardanabase.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
32.669811
85
0.618539
true
true
1c2e16a8640c5d8ca1be6a0c510284f122c75808
1,549
py
Python
local-tests/run_nodes.py
kumandra/kumandra-node
eceacafde002f8a14dedfdc2ab953b213b8fb699
[ "Apache-2.0" ]
null
null
null
local-tests/run_nodes.py
kumandra/kumandra-node
eceacafde002f8a14dedfdc2ab953b213b8fb699
[ "Apache-2.0" ]
8
2022-03-21T04:41:05.000Z
2022-03-21T06:36:19.000Z
local-tests/run_nodes.py
kumandra/kumandra-node
eceacafde002f8a14dedfdc2ab953b213b8fb699
[ "Apache-2.0" ]
null
null
null
#!/bin/env python # Short script demonstrating the basic usage of `chainrunner` package. # Reproduces (more or less) the behavior of `run_nodes.sh`. # For running local experiments it's much more convenient to manage the chain # using an interactive environment (Python console, Jupyter notebook etc.) from time import...
29.226415
99
0.647515
# using an interactive environment (Python console, Jupyter notebook etc.) from time import sleep from chainrunner import Chain, Seq, generate_keys, check_finalized nodes = 4 workdir = '.' binary = '../target/release/kumandra-node' port = 30334 ws_port = 9944 rpc_port = 9933 phrases = ['//Alice', '//Bob', '//C...
true
true
1c2e17c4bf587013e11f885311464167a66ecff8
23,032
py
Python
Server/Python/tests/dbsserver_t/utils/DBSDataProvider.py
vkuznet/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
8
2015-08-14T04:01:32.000Z
2021-06-03T00:56:42.000Z
Server/Python/tests/dbsserver_t/utils/DBSDataProvider.py
yuyiguo/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
162
2015-01-07T21:34:47.000Z
2021-10-13T09:42:41.000Z
Server/Python/tests/dbsserver_t/utils/DBSDataProvider.py
yuyiguo/DBS
14df8bbe8ee8f874fe423399b18afef911fe78c7
[ "Apache-2.0" ]
16
2015-01-22T15:27:29.000Z
2021-04-28T09:23:28.000Z
""" Class to provide data for unit- and integration tests """ from itertools import izip from collections import defaultdict import cPickle as pickle import getpass import os.path import uuid import time import os import random def create_dbs_data_provider(data_type='persistent',data_location=None): data_types = {...
39.986111
138
0.622308
from itertools import izip from collections import defaultdict import cPickle as pickle import getpass import os.path import uuid import time import os import random def create_dbs_data_provider(data_type='persistent',data_location=None): data_types = {'persistent' : DBSDataProvider(DBSPersistentData()), ...
true
true
1c2e18717f79affbbd5759b5c38a77e944e4f5e5
16,165
py
Python
sdk/python/pulumi_azure_nextgen/network/v20200401/subnet.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20200401/subnet.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20200401/subnet.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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 from ... import _utilities, _tables from...
54.063545
2,279
0.691432
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['Subnet'] class Subnet(pulumi.CustomResource): def __init__(__self__, ...
true
true
1c2e18e9cbd368c6827997206237fb7931ec5395
12,886
py
Python
nemo/collections/asr/parts/submodules/multi_head_attention.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
1
2022-03-08T02:48:44.000Z
2022-03-08T02:48:44.000Z
nemo/collections/asr/parts/submodules/multi_head_attention.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
1
2022-03-06T14:09:02.000Z
2022-03-06T14:09:02.000Z
nemo/collections/asr/parts/submodules/multi_head_attention.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. 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...
41.169329
118
0.621527
import math import torch import torch.nn as nn __all__ = [ 'RelPositionMultiHeadAttention', 'RelPositionalEncoding', 'PositionalEncoding', ] class MultiHeadAttention(nn.Module): def __init__(self, n_head, n_feat, dropout_rate): super(MultiHeadAttention, self)....
true
true
1c2e1cd8e3fac74e232aa6bb8af903e8e59a0397
7,768
py
Python
examples/mujoco/train_ppo_batch_gym.py
cnheider/chainerrl
018a29132d77e5af0f92161250c72aba10c6ce29
[ "MIT" ]
923
2017-06-01T08:27:42.000Z
2022-03-24T02:17:04.000Z
examples/mujoco/train_ppo_batch_gym.py
hardmaru/chainerrl
018a29132d77e5af0f92161250c72aba10c6ce29
[ "MIT" ]
374
2017-06-02T02:07:50.000Z
2021-06-29T22:05:38.000Z
examples/mujoco/train_ppo_batch_gym.py
hardmaru/chainerrl
018a29132d77e5af0f92161250c72aba10c6ce29
[ "MIT" ]
253
2017-06-04T10:31:50.000Z
2022-03-19T15:20:51.000Z
"""An example of training PPO against OpenAI Gym Envs. This script is an example of training a PPO agent against OpenAI Gym envs. Both discrete and continuous action spaces are supported. To solve CartPole-v0, run: python train_ppo_gym.py --env CartPole-v0 """ import argparse import functools import chainer from...
37.892683
91
0.644954
import argparse import functools import chainer from chainer import functions as F from chainer import links as L import gym import gym.spaces import numpy as np import chainerrl from chainerrl.agents import PPO from chainerrl import experiments from chainerrl import misc from chainerrl.optimizers.nonbias_weight_deca...
true
true
1c2e1d04399dd2ab41dcc73c61b9cb123cf6a55d
11,815
py
Python
hw0_release/.env/lib/python3.7/site-packages/skimage/data/__init__.py
Renhy/CS131_release
23b92d04c4cbb122da18dc929199d3d06fb0251f
[ "MIT" ]
1
2019-01-12T13:17:32.000Z
2019-01-12T13:17:32.000Z
rcnn/lib/python3.6/site-packages/skimage/data/__init__.py
dreamingweaver/making_passportImage
68f23411780ff82abe934dfae5fc04acb80f2c49
[ "MIT" ]
null
null
null
rcnn/lib/python3.6/site-packages/skimage/data/__init__.py
dreamingweaver/making_passportImage
68f23411780ff82abe934dfae5fc04acb80f2c49
[ "MIT" ]
null
null
null
# coding: utf-8 """Standard test images. For more images, see - http://sipi.usc.edu/database/database.php """ import os as _os import numpy as _np from .. import data_dir from ..io import imread, use_plugin from .._shared._warnings import expected_warnings, warn from .. import img_as_bool from ._binary_blobs im...
27.412993
104
0.65019
import os as _os import numpy as _np from .. import data_dir from ..io import imread, use_plugin from .._shared._warnings import expected_warnings, warn from .. import img_as_bool from ._binary_blobs import binary_blobs __all__ = ['load', 'astronaut', 'binary_blobs', 'camera', ...
true
true
1c2e1deaf306e0ed002b9293002fa360230bcd40
418
py
Python
exercise8.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
2
2022-01-13T15:55:58.000Z
2022-02-11T23:18:34.000Z
exercise8.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
null
null
null
exercise8.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
null
null
null
# -*- Coding: utf-8 -*- print("VERIFICADOR DE CONSUMO") print("-----------------------") d = float(input("Distância percorrida pelo carro em km: ")) v = float(input("Quantidade de gasolina consumida em l: ")) c = d/v if c < 8: print(f"Consumo de {c}km/l, VENDA O CARRO!") elif c > 8 and c < 14: p...
27.866667
60
0.574163
print("VERIFICADOR DE CONSUMO") print("-----------------------") d = float(input("Distância percorrida pelo carro em km: ")) v = float(input("Quantidade de gasolina consumida em l: ")) c = d/v if c < 8: print(f"Consumo de {c}km/l, VENDA O CARRO!") elif c > 8 and c < 14: print(f"Consumo de {c}km/l...
true
true
1c2e1e065a6bb1b61bcba4f5de7902153878b816
502
py
Python
app/auth/__init__.py
muli3203/blogting
9fc048b7cf42fa7751de34317dc186909a9fa8c9
[ "MIT" ]
null
null
null
app/auth/__init__.py
muli3203/blogting
9fc048b7cf42fa7751de34317dc186909a9fa8c9
[ "MIT" ]
null
null
null
app/auth/__init__.py
muli3203/blogting
9fc048b7cf42fa7751de34317dc186909a9fa8c9
[ "MIT" ]
1
2020-02-21T13:22:36.000Z
2020-02-21T13:22:36.000Z
# from flask_mail import Message # from flask import render_template # from . import mail # def mail_message(subject,template,to,**kwargs): # sender_email = "moringademo@gmail.com" # email = Message(subject, sender= sender_email, recipients=[to]) # email.body = render_template(template + ".txt",**kwar...
31.375
69
0.705179
from flask import Blueprint auth = Blueprint('auth', __name__) from . import views, forms
true
true
1c2e1ea426c69378e7820b30572031dd68c0043c
3,285
py
Python
iteration2/ZoomPollViewer/Poll.py
a-haruntokyer/Zoom-Poll-Data-Match
ac46cfadbb743f34411b530ce4f5bd464362e622
[ "MIT" ]
null
null
null
iteration2/ZoomPollViewer/Poll.py
a-haruntokyer/Zoom-Poll-Data-Match
ac46cfadbb743f34411b530ce4f5bd464362e622
[ "MIT" ]
null
null
null
iteration2/ZoomPollViewer/Poll.py
a-haruntokyer/Zoom-Poll-Data-Match
ac46cfadbb743f34411b530ce4f5bd464362e622
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ ZOOM POLL VIEWER v0.1 POLL CLASS 11 Function 3 Object """ from .Question import Question class Poll: def __init__(self, zpv, poll_name, poll_type="QUIZ"): self.zpv = zpv self._name = poll_name self._type = poll_type self._questions = [] self._...
29.863636
102
0.625266
from .Question import Question class Poll: def __init__(self, zpv, poll_name, poll_type="QUIZ"): self.zpv = zpv self._name = poll_name self._type = poll_type self._questions = [] self._number_of_questions = None self._session_grades = {} self._number_of_...
true
true
1c2e1ebe11f2d9f090f081f98954d52c29c6346a
13,914
py
Python
awacs/ec2.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
awacs/ec2.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
awacs/ec2.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon EC2 Spot Fleet' prefix = 'ec2' class Action(BaseAction): def __init__(self, action=None): sup = super(Act...
48.821053
73
0.840089
from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon EC2 Spot Fleet' prefix = 'ec2' class Action(BaseAction): def __init__(self, action=None): sup = super(Action, self) sup.__init__(prefix, action) class ARN(BaseARN): def __init__(self, resource='', regio...
true
true
1c2e217d058dd1b7ec6b25e09d68c49a4bf5dc41
24,975
py
Python
tests/__init__.py
korkeatw/pythainlp
6fc7c3434d5e58c8e8e2bf13470445cbab0866bd
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
korkeatw/pythainlp
6fc7c3434d5e58c8e8e2bf13470445cbab0866bd
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
korkeatw/pythainlp
6fc7c3434d5e58c8e8e2bf13470445cbab0866bd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Unit test """ import datetime import os import unittest from collections import Counter from nltk.corpus import wordnet as wn from pythainlp import word_vector from pythainlp.corpus import ( _CORPUS_PATH, conceptnet, countries, download, provinces, remove, thai_n...
38.364055
88
0.603524
import datetime import os import unittest from collections import Counter from nltk.corpus import wordnet as wn from pythainlp import word_vector from pythainlp.corpus import ( _CORPUS_PATH, conceptnet, countries, download, provinces, remove, thai_negations, thai_stopwords, thai_sy...
true
true
1c2e22a90ad2aaad5a60b61d2ee131476440569c
24,455
py
Python
pytorch_src/engagement_classifier.py
PlusLabNLP/PredictiveEngagement
214d3eb20901982d192b05b4d496420dfb273f8e
[ "MIT" ]
13
2020-08-16T10:19:35.000Z
2021-11-19T07:35:57.000Z
pytorch_src/engagement_classifier.py
PlusLabNLP/PredictiveEngagement
214d3eb20901982d192b05b4d496420dfb273f8e
[ "MIT" ]
null
null
null
pytorch_src/engagement_classifier.py
PlusLabNLP/PredictiveEngagement
214d3eb20901982d192b05b4d496420dfb273f8e
[ "MIT" ]
2
2020-01-04T02:35:07.000Z
2020-01-23T20:18:32.000Z
import random import numpy as np import torch import torch.optim as optim import matplotlib.pyplot as plt from sklearn.metrics import classification_report, roc_auc_score import pickle import torch.nn as nn import os import csv random.seed(1000) np.random.seed(1000) torch.manual_seed(1000) # torch.backends.cudnn.ben...
45.881801
217
0.604457
import random import numpy as np import torch import torch.optim as optim import matplotlib.pyplot as plt from sklearn.metrics import classification_report, roc_auc_score import pickle import torch.nn as nn import os import csv random.seed(1000) np.random.seed(1000) torch.manual_seed(1000) class Engagement_cls()...
true
true
1c2e22d242454048924dcdcb258ef19ca93433b3
7,544
py
Python
tests/rados/test_9929.py
hmaheswa/cephci
b75c1e58e1222865c81c0558ff98b3708dc4236a
[ "MIT" ]
null
null
null
tests/rados/test_9929.py
hmaheswa/cephci
b75c1e58e1222865c81c0558ff98b3708dc4236a
[ "MIT" ]
null
null
null
tests/rados/test_9929.py
hmaheswa/cephci
b75c1e58e1222865c81c0558ff98b3708dc4236a
[ "MIT" ]
null
null
null
import json import random import time import traceback from ceph.rados_utils import RadosHelper from utility.log import Log log = Log(__name__) def run(ceph_cluster, **kw): """ CEPH-9929-RADOS: Corrupt an object in ec pool followed by list-inconsistent-* commands 1. create a jerasure ec pool wit...
34.290909
86
0.615986
import json import random import time import traceback from ceph.rados_utils import RadosHelper from utility.log import Log log = Log(__name__) def run(ceph_cluster, **kw): log.info("Running CEPH-9929") log.info(run.__doc__) ceph_nodes = kw.get("ceph_nodes") config = kw.get("config") build = co...
true
true
1c2e22d8ae316b4a6d4048c96dab0849ac091011
182
py
Python
setup.py
Hekstra-Lab/napari-labeller
74913dce72c773df2ec94e1cb3798dd40fedf219
[ "BSD-3-Clause" ]
null
null
null
setup.py
Hekstra-Lab/napari-labeller
74913dce72c773df2ec94e1cb3798dd40fedf219
[ "BSD-3-Clause" ]
1
2021-12-03T21:26:27.000Z
2021-12-03T21:26:27.000Z
setup.py
Hekstra-Lab/napari-labeller
74913dce72c773df2ec94e1cb3798dd40fedf219
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup # https://github.com/pypa/setuptools_scm use_scm = {"write_to": "src/napari_labeller/_version.py"} setup(use_scm_version=use_scm)
26
57
0.78022
from setuptools import setup use_scm = {"write_to": "src/napari_labeller/_version.py"} setup(use_scm_version=use_scm)
true
true
1c2e2463dffc444c3ccdc2e39b33c19f6d840870
1,604
py
Python
official/nlp/mass/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/mass/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/mass/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
41.128205
88
0.698254
import os import mindspore.common.dtype as mstype from config import TransformerConfig from src.transformer import TransformerNetworkWithLoss, TransformerInferModel def get_config(config): config = TransformerConfig.from_json_file(config) config.compute_type = mstype.float16 config.dtype = ms...
true
true
1c2e251fe2c93f024f77f51ca40430d2ad2eb207
3,121
py
Python
spacebase/user/models.py
hugoantunes/spacebase
b33c53ec093ed1ff3c0fcb6161bffeda98cc8ba6
[ "MIT" ]
null
null
null
spacebase/user/models.py
hugoantunes/spacebase
b33c53ec093ed1ff3c0fcb6161bffeda98cc8ba6
[ "MIT" ]
6
2020-06-05T23:28:15.000Z
2022-02-10T12:45:02.000Z
spacebase/user/models.py
hugoantunes/spacebase
b33c53ec093ed1ff3c0fcb6161bffeda98cc8ba6
[ "MIT" ]
null
null
null
from django.db import models from django.db.models.signals import post_save class User(models.Model): first_name = models.CharField(max_length=30, blank=False) last_name = models.CharField(max_length=30, blank=False) iban = models.CharField(max_length=34, blank=False) class UserAddress(models.Model): ...
37.60241
99
0.622877
from django.db import models from django.db.models.signals import post_save class User(models.Model): first_name = models.CharField(max_length=30, blank=False) last_name = models.CharField(max_length=30, blank=False) iban = models.CharField(max_length=34, blank=False) class UserAddress(models.Model): ...
true
true
1c2e2699c29161f428e7a7edc801cf5bc77c1afb
3,008
py
Python
www/src/Lib/browser/indexed_db.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
5,926
2015-01-01T07:45:08.000Z
2022-03-31T12:34:38.000Z
www/src/Lib/browser/indexed_db.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
1,728
2015-01-01T01:09:12.000Z
2022-03-30T23:25:22.000Z
www/src/Lib/browser/indexed_db.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
574
2015-01-02T01:36:10.000Z
2022-03-26T10:18:48.000Z
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: raise NotImple...
28.11215
76
0.665891
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: raise NotImple...
true
true
1c2e26f6a8e0d4b0d26ae185c527fffe209c3a78
7,353
py
Python
examples/run_value_movielens.py
Ulian7/DeepCTR
d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5
[ "Apache-2.0" ]
null
null
null
examples/run_value_movielens.py
Ulian7/DeepCTR
d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5
[ "Apache-2.0" ]
null
null
null
examples/run_value_movielens.py
Ulian7/DeepCTR
d8f519a722a4d6a4f1fe18e04af54cfd1369c9a5
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import torch import pdb import sys sys.path.append('../') from sklearn.preprocessing import LabelEncoder from tensorflow.python.keras.preprocessing.sequence import pad_sequences from deepctr_torch.inputs import SparseFeat, VarLenSparseFeat, get_feature_names from deepctr_torch.mo...
41.542373
188
0.604107
import numpy as np import pandas as pd import torch import pdb import sys sys.path.append('../') from sklearn.preprocessing import LabelEncoder from tensorflow.python.keras.preprocessing.sequence import pad_sequences from deepctr_torch.inputs import SparseFeat, VarLenSparseFeat, get_feature_names from deepctr_torch.mo...
true
true
1c2e27b4c45588a8f4eb9e6c487a361c90839bab
1,597
py
Python
tatk/policy/rule/camrest/rule.py
keshuichonglx/tatk
7e8ad18ca98b105cb0168192bddf80b747067c1b
[ "Apache-2.0" ]
2
2020-09-05T13:12:44.000Z
2020-10-12T16:51:16.000Z
tatk/policy/rule/camrest/rule.py
keshuichonglx/tatk
7e8ad18ca98b105cb0168192bddf80b747067c1b
[ "Apache-2.0" ]
null
null
null
tatk/policy/rule/camrest/rule.py
keshuichonglx/tatk
7e8ad18ca98b105cb0168192bddf80b747067c1b
[ "Apache-2.0" ]
1
2019-11-25T15:34:33.000Z
2019-11-25T15:34:33.000Z
# -*- coding: utf-8 -*- import torch from tatk.policy.policy import Policy from tatk.policy.rule.camrest.rule_based_camrest_bot import RuleBasedCamrestBot from tatk.policy.rule.camrest.policy_agenda_camrest import UserPolicyAgendaCamrest DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") class Rule...
30.711538
111
0.620539
import torch from tatk.policy.policy import Policy from tatk.policy.rule.camrest.rule_based_camrest_bot import RuleBasedCamrestBot from tatk.policy.rule.camrest.policy_agenda_camrest import UserPolicyAgendaCamrest DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") class Rule(Policy): def ...
true
true
1c2e2827127ca09db1965ad1e596f372ea8f2ad7
2,056
py
Python
tests/infra/test_utils.py
Keendata/impala
b25e250d321f329b98e017c648df75d052497963
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/infra/test_utils.py
xwzbupt/impala
97dda2b27da99367f4d07699aa046b16cda16dd4
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/infra/test_utils.py
xwzbupt/impala
97dda2b27da99367f4d07699aa046b16cda16dd4
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
41.959184
87
0.708658
from tests.util.filesystem_utils import prepend_with_fs from tests.util.parse_util import get_bytes_summary_stats_counter def test_filesystem_utils(): path = "/fake-warehouse" assert prepend_with_fs("", path) == path fs = "fakeFs://bucket" path = "/fake-warehouse" assert prepend_wi...
true
true
1c2e2904a3aedd99529257cced819199ac3608c7
2,985
py
Python
linalg/lu_decomp.py
lpierezan/cp_playground
818d116391b762c1ca03be772a50bb997b7958a4
[ "Apache-2.0" ]
null
null
null
linalg/lu_decomp.py
lpierezan/cp_playground
818d116391b762c1ca03be772a50bb997b7958a4
[ "Apache-2.0" ]
null
null
null
linalg/lu_decomp.py
lpierezan/cp_playground
818d116391b762c1ca03be772a50bb997b7958a4
[ "Apache-2.0" ]
null
null
null
import numpy as np def lu_decomp(A): n = len(A) U = A.copy() L = np.eye(n) row_idx = list(range(n)) for col in range(n): # find best row best_row, best_elem = None, None for row in range(col,n): row_i = row_idx[row] elem = U[row_i][col] i...
23.139535
92
0.473032
import numpy as np def lu_decomp(A): n = len(A) U = A.copy() L = np.eye(n) row_idx = list(range(n)) for col in range(n): best_row, best_elem = None, None for row in range(col,n): row_i = row_idx[row] elem = U[row_i][col] if best_row is N...
true
true
1c2e29327dc4182eec73106e98a86215fcaad2e2
15,873
py
Python
pdm/pep517/metadata.py
danieleades/pdm-pep517
129697f841c0f635465caf83332c75f5e30b0c6f
[ "MIT" ]
null
null
null
pdm/pep517/metadata.py
danieleades/pdm-pep517
129697f841c0f635465caf83332c75f5e30b0c6f
[ "MIT" ]
null
null
null
pdm/pep517/metadata.py
danieleades/pdm-pep517
129697f841c0f635465caf83332c75f5e30b0c6f
[ "MIT" ]
null
null
null
import glob import os import re import warnings from pathlib import Path from typing import ( Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Type, TypeVar, Union, ) from pdm.pep517._vendor import toml from pdm.pep517._vendor.packaging.requirements import Re...
36.489655
88
0.564544
import glob import os import re import warnings from pathlib import Path from typing import ( Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Type, TypeVar, Union, ) from pdm.pep517._vendor import toml from pdm.pep517._vendor.packaging.requirements import Re...
true
true
1c2e296046eb40e47029a156980229e65ae057e3
23,662
py
Python
featuretools/computational_backends/pandas_backend.py
kunalvats/featuretools
25d8a36b7d636546161122095f5d6ca793a0b974
[ "BSD-3-Clause" ]
1
2019-06-06T15:16:26.000Z
2019-06-06T15:16:26.000Z
featuretools/computational_backends/pandas_backend.py
kunalvats/featuretools
25d8a36b7d636546161122095f5d6ca793a0b974
[ "BSD-3-Clause" ]
null
null
null
featuretools/computational_backends/pandas_backend.py
kunalvats/featuretools
25d8a36b7d636546161122095f5d6ca793a0b974
[ "BSD-3-Clause" ]
null
null
null
import cProfile import logging import os import pstats import sys import warnings from datetime import datetime import numpy as np import pandas as pd import pandas.api.types as pdtypes from future import standard_library from .base_backend import ComputationalBackend from .feature_tree import FeatureTree from featu...
44.645283
107
0.584946
import cProfile import logging import os import pstats import sys import warnings from datetime import datetime import numpy as np import pandas as pd import pandas.api.types as pdtypes from future import standard_library from .base_backend import ComputationalBackend from .feature_tree import FeatureTree from featu...
true
true
1c2e2aaab2e6d66ef8843c2a09921db66922ee45
6,758
py
Python
tests/cli/test_cli_parser.py
wegamekinglc/incubator-airflow
fc174635b0729253a86e8c877d6d8551a815a2cb
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
7
2018-11-19T12:05:13.000Z
2020-01-17T08:30:38.000Z
tests/cli/test_cli_parser.py
wegamekinglc/incubator-airflow
fc174635b0729253a86e8c877d6d8551a815a2cb
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
4
2021-06-28T20:57:42.000Z
2022-02-26T02:11:11.000Z
tests/cli/test_cli_parser.py
wegamekinglc/incubator-airflow
fc174635b0729253a86e8c877d6d8551a815a2cb
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-03-03T01:44:08.000Z
2021-03-03T01:44:08.000Z
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
39.988166
109
0.606244
import argparse import contextlib import io import re from collections import Counter from unittest import TestCase import pytest from airflow.cli import cli_parser ILLEGAL_LONG_OPTION_PATTERN = re.compile("^--[a-z]+_[a-z]+|^--.*[A-Z].*") LEGAL_SHORT_OPTION_PATTERN = re.compile("^-[a-zA-z]$") c...
true
true
1c2e2bf8cd12b512636be05fa4bca246f5094a61
325
py
Python
custom_components/react/enums.py
gertjanstulp/ha-mapper
9cc84a4856e5f3e45077fd7d2586188b199f83d8
[ "Apache-2.0" ]
null
null
null
custom_components/react/enums.py
gertjanstulp/ha-mapper
9cc84a4856e5f3e45077fd7d2586188b199f83d8
[ "Apache-2.0" ]
null
null
null
custom_components/react/enums.py
gertjanstulp/ha-mapper
9cc84a4856e5f3e45077fd7d2586188b199f83d8
[ "Apache-2.0" ]
null
null
null
from enum import Enum class ReactStage(str, Enum): SETUP = "setup" STARTUP = "startup" WAITING = "waiting" RUNNING = "running" BACKGROUND = "background" class ReactDisabledReason(str, Enum): REMOVED = "removed" LOAD_REACT = "load_react" RESTORE = "restore" CONSTRAINTS = "constrai...
19.117647
37
0.655385
from enum import Enum class ReactStage(str, Enum): SETUP = "setup" STARTUP = "startup" WAITING = "waiting" RUNNING = "running" BACKGROUND = "background" class ReactDisabledReason(str, Enum): REMOVED = "removed" LOAD_REACT = "load_react" RESTORE = "restore" CONSTRAINTS = "constrai...
true
true
1c2e2c3f297014f04fdf8b9a69ec8380ed2aa5c6
1,866
py
Python
airflow_concert/motif/bigquery_query_job.py
NiltonDuarte/AirflowConcert
a2503a981f24be32d1478a7bb07620568b5e277a
[ "MIT" ]
null
null
null
airflow_concert/motif/bigquery_query_job.py
NiltonDuarte/AirflowConcert
a2503a981f24be32d1478a7bb07620568b5e277a
[ "MIT" ]
null
null
null
airflow_concert/motif/bigquery_query_job.py
NiltonDuarte/AirflowConcert
a2503a981f24be32d1478a7bb07620568b5e277a
[ "MIT" ]
null
null
null
from typing import Optional from airflow_concert.motif.motif_base import MotifBase from airflow_concert.motif.mixins.bigquery_job import BigQueryJobMixin, BigQueryTimePartitioning from airflow_concert.phrase.protocols import PExecuteQueryMotif class BigQueryQueryJobMotif(MotifBase, BigQueryJobMixin, PExecuteQueryMoti...
43.395349
96
0.695606
from typing import Optional from airflow_concert.motif.motif_base import MotifBase from airflow_concert.motif.mixins.bigquery_job import BigQueryJobMixin, BigQueryTimePartitioning from airflow_concert.phrase.protocols import PExecuteQueryMotif class BigQueryQueryJobMotif(MotifBase, BigQueryJobMixin, PExecuteQueryMoti...
true
true
1c2e2cd1ed9af9f97446de32934f76fb590241e6
441
py
Python
githistorydata/filechanges.py
webedx-spark/git-history-data
14b60ab229b840c14be37d48aade28e462f29cb0
[ "BSD-2-Clause" ]
15
2015-12-30T03:01:59.000Z
2021-04-18T12:32:36.000Z
githistorydata/filechanges.py
webedx-spark/git-history-data
14b60ab229b840c14be37d48aade28e462f29cb0
[ "BSD-2-Clause" ]
2
2016-02-08T18:37:26.000Z
2020-01-28T09:51:58.000Z
githistorydata/filechanges.py
webedx-spark/git-history-data
14b60ab229b840c14be37d48aade28e462f29cb0
[ "BSD-2-Clause" ]
6
2016-01-09T02:57:33.000Z
2021-05-27T00:55:01.000Z
class FileChanges( object ): def __init__( self, added, removed, name ): self.added = added self.removed = removed self.name = name def __str__( self ): return "+%d -%d %s" % ( self.added, self.removed, self.name ) def __eq__( self, other ): return ( s...
24.5
69
0.537415
class FileChanges( object ): def __init__( self, added, removed, name ): self.added = added self.removed = removed self.name = name def __str__( self ): return "+%d -%d %s" % ( self.added, self.removed, self.name ) def __eq__( self, other ): return ( s...
true
true
1c2e2f46711fc360cb68a5335f3b09e7bd551c6b
3,763
py
Python
server/fullstackChallenge/settings.py
thiagobrez/newsWebsite
130f01d29dd776eaa096080982274bb27d19ad8f
[ "MIT" ]
null
null
null
server/fullstackChallenge/settings.py
thiagobrez/newsWebsite
130f01d29dd776eaa096080982274bb27d19ad8f
[ "MIT" ]
7
2020-09-07T18:44:00.000Z
2022-02-10T19:05:41.000Z
server/fullstackChallenge/settings.py
thiagobrez/newsWebsite
130f01d29dd776eaa096080982274bb27d19ad8f
[ "MIT" ]
null
null
null
""" Django settings for fullstackChallenge project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ i...
25.598639
91
0.688546
import os from decouple import config BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG', cast=bool) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': config('DB_NAME'), '...
true
true
1c2e310f57502b89e03733838eb5436fa364367d
3,051
py
Python
tests/test_tutorial/test_handling_errors/test_tutorial002.py
0x20bf-org/fastapi
46a1d68387b2bfb6513bfe956e84fc99767d737a
[ "MIT" ]
null
null
null
tests/test_tutorial/test_handling_errors/test_tutorial002.py
0x20bf-org/fastapi
46a1d68387b2bfb6513bfe956e84fc99767d737a
[ "MIT" ]
null
null
null
tests/test_tutorial/test_handling_errors/test_tutorial002.py
0x20bf-org/fastapi
46a1d68387b2bfb6513bfe956e84fc99767d737a
[ "MIT" ]
null
null
null
from docs_src.handling_errors.tutorial002 import app from fastapi.testclient import TestClient client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items-header/{item_id}": { "get": { "responses":...
33.9
86
0.405113
from docs_src.handling_errors.tutorial002 import app from fastapi.testclient import TestClient client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items-header/{item_id}": { "get": { "responses":...
true
true
1c2e318001a9ef9165216d8e65a780d5afcf3532
3,618
py
Python
pycritty/commands/run.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
pycritty/commands/run.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
pycritty/commands/run.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
null
null
null
from typing import Dict, Any, Union import sys from pathlib import Path from .. import PycrittyError from .command import Command from ..io import log, yio from ..resources import config_file, saves_dir from ..resources.resource import ConfigFile from rich import print, pretty, inspect from rich.console import Console ...
38.084211
89
0.571034
from typing import Dict, Any, Union import sys from pathlib import Path from .. import PycrittyError from .command import Command from ..io import log, yio from ..resources import config_file, saves_dir from ..resources.resource import ConfigFile from rich import print, pretty, inspect from rich.console import Console ...
true
true
1c2e31e4d91019f9a9d7ed49e73b96ac5eae1835
1,715
py
Python
my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716225144.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716225144.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716225144.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Decorator Parametors In the previous ideos we saw some built-in decorators that can handle some arguments: @wraps(fn) @lru_cache(maxsize=256) <\ def inner(): def factorial(n): \ ... ... \>function call This should loo...
27.66129
89
0.542857
from symbol import parameters from time import perf_counter from unittest import result def timed(fn): from time import perf_counter def inner(*arhs, **kwarrgs): total_elapse = 0 for i in range(10): nter() result = fn(*args, **kwargs) total_elapsed += (perf_cou...
true
true
1c2e3231607b33d5619c4351426be2731fa7fda7
1,272
py
Python
setup.py
aiven/aiven-db-migrate
e3751aadfc8ad9a011d64ba5dec96118e52c68b2
[ "Apache-2.0" ]
10
2020-08-03T17:45:18.000Z
2022-02-18T00:12:17.000Z
setup.py
aiven/aiven-db-migrate
e3751aadfc8ad9a011d64ba5dec96118e52c68b2
[ "Apache-2.0" ]
12
2020-08-27T15:15:54.000Z
2022-02-24T16:11:18.000Z
setup.py
aiven/aiven-db-migrate
e3751aadfc8ad9a011d64ba5dec96118e52c68b2
[ "Apache-2.0" ]
1
2022-01-07T12:00:17.000Z
2022-01-07T12:00:17.000Z
# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ from importlib.machinery import SourceFileLoader from setuptools import find_packages, setup import sys def get_version(): return SourceFileLoader("version", "aiven_db_migrate/migrate/version.py").load_module().__version__ setup( author="Aiv...
29.581395
103
0.636006
from importlib.machinery import SourceFileLoader from setuptools import find_packages, setup import sys def get_version(): return SourceFileLoader("version", "aiven_db_migrate/migrate/version.py").load_module().__version__ setup( author="Aiven", author_email="support@aiven.io", entry_points={ ...
true
true
1c2e3323d8a8bfa2b1d3b5d79d47be08567a9379
16,309
py
Python
heat/engine/parser.py
devcamcar/heat
0f1bd5d29102318e62b5a10281d809807bd3b163
[ "Apache-2.0" ]
1
2015-05-11T04:54:30.000Z
2015-05-11T04:54:30.000Z
heat/engine/parser.py
devcamcar/heat
0f1bd5d29102318e62b5a10281d809807bd3b163
[ "Apache-2.0" ]
null
null
null
heat/engine/parser.py
devcamcar/heat
0f1bd5d29102318e62b5a10281d809807bd3b163
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
36.981859
79
0.499785
import eventlet import json import logging import sys from heat.common import exception from heat.engine import resources from heat.engine import instance from heat.engine import volume from heat.engine import eip from heat.engine import security_group from heat.engine import wait_condition from heat.d...
true
true
1c2e33aae33d7676078b930aae7d76313c38fcbb
2,971
py
Python
main.py
YuhangSong/alley
c20111189d3e83b4a902140361089a7b1d11702a
[ "MIT" ]
null
null
null
main.py
YuhangSong/alley
c20111189d3e83b4a902140361089a7b1d11702a
[ "MIT" ]
null
null
null
main.py
YuhangSong/alley
c20111189d3e83b4a902140361089a7b1d11702a
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function """Simple example of using Multi-Agent and Hierarchical (https://ray.readthedocs.io/en/latest/rllib-env.html#multi-agent-and-hierarchical) from rllib to train an arena environment in ArenaRllibEnv. """ import a...
32.648352
96
0.685291
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import random import time import numpy as np import ray from ray import tune from ray.rllib.utils import try_import_tf from envs_layer import ArenaRllibEnv tf = try_import_tf() parser = arg...
true
true
1c2e33dd468219d592ebd684a35db138aaa243e7
1,078
py
Python
slow_processing_times/blueprints/processing.py
GeoffreyDlvl/SlowwwwwProcessingTimes
f0e37d11fef6d4922e6c9c8fc68766f29bd21bb4
[ "MIT" ]
null
null
null
slow_processing_times/blueprints/processing.py
GeoffreyDlvl/SlowwwwwProcessingTimes
f0e37d11fef6d4922e6c9c8fc68766f29bd21bb4
[ "MIT" ]
null
null
null
slow_processing_times/blueprints/processing.py
GeoffreyDlvl/SlowwwwwProcessingTimes
f0e37d11fef6d4922e6c9c8fc68766f29bd21bb4
[ "MIT" ]
null
null
null
import time from flask import ( Blueprint, request, current_app ) from .. import utils from ..enums.state_enum import State from ..blueprints.crack import archives bp = Blueprint('processing', __name__, url_prefix='/processing') def some_processing(): print('PROCESSING...') time.sleep(10) print('DONE...
28.368421
99
0.702226
import time from flask import ( Blueprint, request, current_app ) from .. import utils from ..enums.state_enum import State from ..blueprints.crack import archives bp = Blueprint('processing', __name__, url_prefix='/processing') def some_processing(): print('PROCESSING...') time.sleep(10) print('DONE...
true
true
1c2e34a3a089e4d5a4555dea0f99551b3b7517cc
942
py
Python
apiclient/request_formatters.py
Phonebooth/api-client
c2820fa4c4997aad8a07e408b80a52df4d6c9978
[ "MIT" ]
112
2019-02-18T15:07:50.000Z
2022-03-31T07:05:23.000Z
apiclient/request_formatters.py
Phonebooth/api-client
c2820fa4c4997aad8a07e408b80a52df4d6c9978
[ "MIT" ]
34
2019-02-20T13:32:47.000Z
2022-01-22T23:09:50.000Z
apiclient/request_formatters.py
Phonebooth/api-client
c2820fa4c4997aad8a07e408b80a52df4d6c9978
[ "MIT" ]
23
2019-03-15T10:50:03.000Z
2022-03-17T09:49:21.000Z
import json from apiclient.utils.typing import OptionalJsonType, OptionalStr class BaseRequestFormatter: """Format the outgoing data accordingly and set the content-type headers.""" content_type = None @classmethod def get_headers(cls) -> dict: if cls.content_type: return {"Cont...
23.55
80
0.680467
import json from apiclient.utils.typing import OptionalJsonType, OptionalStr class BaseRequestFormatter: content_type = None @classmethod def get_headers(cls) -> dict: if cls.content_type: return {"Content-type": cls.content_type} else: return {} @classmetho...
true
true
1c2e34b2c0fc0aca1bbc78728b67afbf95f4a6cd
6,714
py
Python
src/python/pants/backend/python/goals/run_pex_binary_integration_test.py
chebbyChefNEQ/pants
a53b9d29a160f36f9af1d1a2c43a693b6a55fa55
[ "Apache-2.0" ]
1
2016-04-27T15:35:42.000Z
2016-04-27T15:35:42.000Z
src/python/pants/backend/python/goals/run_pex_binary_integration_test.py
chebbyChefNEQ/pants
a53b9d29a160f36f9af1d1a2c43a693b6a55fa55
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/python/goals/run_pex_binary_integration_test.py
chebbyChefNEQ/pants
a53b9d29a160f36f9af1d1a2c43a693b6a55fa55
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import os from textwrap import dedent from typing import Optional import pytest from pants.backend.python.target_types import PexExecutionMode from pants.testutil.pants_integ...
32.434783
97
0.545576
import json import os from textwrap import dedent from typing import Optional import pytest from pants.backend.python.target_types import PexExecutionMode from pants.testutil.pants_integration_test import PantsResult, run_pants, setup_tmpdir @pytest.mark.parametrize( ("entry_point", "execution_mode", "includ...
true
true
1c2e350653f5047348cfa08e90c9d50892d88626
318
py
Python
Practice Problems/13-Decorators/Beginner/test_decorators_beginner.py
vishnu-rvn/PyPractice
521cf6582b49aabd9a4c1c0aef0dd3608c9ee63b
[ "MIT" ]
9
2018-07-13T16:29:41.000Z
2018-07-14T14:40:38.000Z
Practice Problems/13-Decorators/Beginner/test_decorators_beginner.py
vishnu-rvn/PyPractice
521cf6582b49aabd9a4c1c0aef0dd3608c9ee63b
[ "MIT" ]
11
2018-07-15T07:56:57.000Z
2018-07-21T17:41:13.000Z
Practice Problems/13-Decorators/Beginner/test_decorators_beginner.py
vishnu-rvn/PyPractice
521cf6582b49aabd9a4c1c0aef0dd3608c9ee63b
[ "MIT" ]
8
2018-07-13T02:37:53.000Z
2018-07-14T20:36:44.000Z
from unittest import TestCase, TestSuite, TextTestRunner, main class DecoratorsBeginnerTestCase(TestCase): pass def test_one(test_name): suite = TestSuite() suite.addTest(DecoratorsBeginnerTestCase(test_name)) runner = TextTestRunner() runner.run(suite) if __name__ == "__main__": main()
18.705882
62
0.732704
from unittest import TestCase, TestSuite, TextTestRunner, main class DecoratorsBeginnerTestCase(TestCase): pass def test_one(test_name): suite = TestSuite() suite.addTest(DecoratorsBeginnerTestCase(test_name)) runner = TextTestRunner() runner.run(suite) if __name__ == "__main__": main()
true
true
1c2e35b8dc64792855acbd02758e9d8d72ce1652
1,971
py
Python
test_project/test_project_py3/settings.py
yprez/django-useful
288aa46df6f40fb0323c3d0c0efcded887472538
[ "0BSD" ]
3
2015-09-30T09:26:31.000Z
2019-03-19T05:44:24.000Z
test_project/test_project_py3/settings.py
yprez/django-useful
288aa46df6f40fb0323c3d0c0efcded887472538
[ "0BSD" ]
3
2020-02-11T22:13:27.000Z
2021-06-10T17:40:52.000Z
test_project/test_project_py3/settings.py
yprez/django-useful
288aa46df6f40fb0323c3d0c0efcded887472538
[ "0BSD" ]
1
2016-08-08T14:35:02.000Z
2016-08-08T14:35:02.000Z
# Django settings for test_project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } TIME_ZONE = 'Etc/UTC' LANGUAGE_CODE = 'en-u...
24.333333
75
0.710299
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } TIME_ZONE = 'Etc/UTC' LANGUAGE_CODE = 'en-us' SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 't^4dt#fkxftpborp@%lg*#h2wj%vi...
true
true
1c2e35d4a10895371f644ea4da834848880fabab
13,265
py
Python
trove/tests/unittests/common/test_common_extensions.py
zh-f/trove
4998becb4da14547798cece21858282761409052
[ "Apache-2.0" ]
1
2017-11-24T10:28:48.000Z
2017-11-24T10:28:48.000Z
trove/tests/unittests/common/test_common_extensions.py
2020human/trove-new
012da9a334bc4e9c7711dc918eea3f011463ec82
[ "Apache-2.0" ]
null
null
null
trove/tests/unittests/common/test_common_extensions.py
2020human/trove-new
012da9a334bc4e9c7711dc918eea3f011463ec82
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
41.583072
79
0.671014
from mock import Mock from mock import patch from oslo_config.cfg import NoSuchOptError from trove.common import exception from trove.common import utils from trove.extensions.common import models from trove.extensions.common.service import ClusterRootController from trove.extensions.common.service imp...
true
true
1c2e370fce6aba1a51bb9131766055f18fc82eea
5,979
py
Python
config/defaults.py
Ehsan-Yaghoubi/my_reid_Pytorch_template
8b346ad8010084536a7c998107979fab2bff2ca3
[ "MIT" ]
null
null
null
config/defaults.py
Ehsan-Yaghoubi/my_reid_Pytorch_template
8b346ad8010084536a7c998107979fab2bff2ca3
[ "MIT" ]
null
null
null
config/defaults.py
Ehsan-Yaghoubi/my_reid_Pytorch_template
8b346ad8010084536a7c998107979fab2bff2ca3
[ "MIT" ]
null
null
null
from yacs.config import CfgNode as CN # ----------------------------------------------------------------------------- # The following configurations will be modified when they are set in the .yml files. # Therefore, if you want to your configurations, please create your_costumed.yml file, instead of changing this scri...
36.907407
176
0.628366
from yacs.config import CfgNode as CN _C = CN() _C.MODEL = CN() _C.MODEL.DEVICE = "cuda" _C.MODEL.DEVICE_ID = '0' _C.MODEL.NAME = 'resnet50' _C.MODEL.LAST_STRIDE = 1 _C.MODEL.PRETRAIN_PATH = "set/the/path/in/.yml/file" _C.MODEL.PRETRAIN_CHOICE = 'imagenet' _C.MODEL.NECK = 'no' _C.MODEL.IF_WITH_CENTER = ...
true
true
1c2e399c351804410c4ec2623c9930aad9d9a7f0
15,627
py
Python
tests/test_refpixel.py
uniomni/PyRate
f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf
[ "Apache-2.0" ]
1
2020-09-12T00:01:33.000Z
2020-09-12T00:01:33.000Z
tests/test_refpixel.py
uniomni/PyRate
f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf
[ "Apache-2.0" ]
null
null
null
tests/test_refpixel.py
uniomni/PyRate
f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf
[ "Apache-2.0" ]
null
null
null
# This Python module is part of the PyRate software package. # # Copyright 2020 Geoscience Australia # # 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/...
38.021898
112
0.6531
import copy import shutil from subprocess import check_call, run from pathlib import Path import pytest from numpy import nan, mean, std, isnan import pyrate.core.refpixel from pyrate.core import config as cf from pyrate.core.refpixel import ref_pixel, _step, RefPixelError from pyrate.core import shared...
true
true
1c2e39c02248ac535e7f4e4f4f871e156c50c176
2,070
py
Python
ops-tests/feature/test_switch.py
nshinde5486/ansible_2switchtopo
e49a883d385c36bea7b12ff9f38b2f2ac22431f6
[ "Apache-2.0" ]
null
null
null
ops-tests/feature/test_switch.py
nshinde5486/ansible_2switchtopo
e49a883d385c36bea7b12ff9f38b2f2ac22431f6
[ "Apache-2.0" ]
null
null
null
ops-tests/feature/test_switch.py
nshinde5486/ansible_2switchtopo
e49a883d385c36bea7b12ff9f38b2f2ac22431f6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2016 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
28.75
71
0.630435
import time TOPOLOGY = """ # # +-----------------+ +------------+ # | Ansible | eth0 eth0 | | # | control machine |-------------| OpenSwitch | # | (server) | | (switch) | # +-----------------+ +------------+ # # ...
true
true
1c2e3a596f63c8d59e25f4a3ad1f356d75d198af
280
py
Python
other/application/windowApp/test/showTestList.py
Ethan7102/FYP
c6560a0b95ad78d5e1a341ab2d93c063e10c6631
[ "MIT" ]
null
null
null
other/application/windowApp/test/showTestList.py
Ethan7102/FYP
c6560a0b95ad78d5e1a341ab2d93c063e10c6631
[ "MIT" ]
null
null
null
other/application/windowApp/test/showTestList.py
Ethan7102/FYP
c6560a0b95ad78d5e1a341ab2d93c063e10c6631
[ "MIT" ]
1
2021-01-23T07:59:57.000Z
2021-01-23T07:59:57.000Z
import sys import testList from PyQt5.QtWidgets import QApplication, QMainWindow if __name__ == '__main__': app = QApplication(sys.argv) MainWindow = QMainWindow() ui = testList.Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_())
28
53
0.721429
import sys import testList from PyQt5.QtWidgets import QApplication, QMainWindow if __name__ == '__main__': app = QApplication(sys.argv) MainWindow = QMainWindow() ui = testList.Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_())
true
true
1c2e3bb30191572e984a79039352c93ea0460f76
2,861
py
Python
LogAnalysis.py
ZeinaKittaneh/LogAnalysis_Udacity
860651042c0dd5376f23aa478bb37d04c3538641
[ "Unlicense", "MIT" ]
null
null
null
LogAnalysis.py
ZeinaKittaneh/LogAnalysis_Udacity
860651042c0dd5376f23aa478bb37d04c3538641
[ "Unlicense", "MIT" ]
null
null
null
LogAnalysis.py
ZeinaKittaneh/LogAnalysis_Udacity
860651042c0dd5376f23aa478bb37d04c3538641
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python import psycopg2 DBNAME = "news" question1 = "\nWhat are the most popular three articles of all time?\n" query1 = '''SELECT title, COUNT(substr(path, 10)) AS views FROM articles JOIN log ON slug = substr(path, 10) GROUP BY title ORDER BY vi...
24.042017
77
0.487941
import psycopg2 DBNAME = "news" question1 = "\nWhat are the most popular three articles of all time?\n" query1 = '''SELECT title, COUNT(substr(path, 10)) AS views FROM articles JOIN log ON slug = substr(path, 10) GROUP BY title ORDER BY views DESC LIMIT 3;''' ...
true
true
1c2e3c444ff71978eb57327f35fbb39ec72a91ea
9,081
py
Python
lib/fast_rcnn/config.py
svebk/py-faster-rcnn
1d0c40c42930f8e89634c057a0ed902aace395bd
[ "BSD-2-Clause" ]
null
null
null
lib/fast_rcnn/config.py
svebk/py-faster-rcnn
1d0c40c42930f8e89634c057a0ed902aace395bd
[ "BSD-2-Clause" ]
null
null
null
lib/fast_rcnn/config.py
svebk/py-faster-rcnn
1d0c40c42930f8e89634c057a0ed902aace395bd
[ "BSD-2-Clause" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Fast R-CNN config system. This file specifies default config option...
31.975352
91
0.689462
import os import os.path as osp import numpy as np from easydict import EasyDict as edict __C = edict() # Consumers can get config by: # from fast_rcnn_config import cfg cfg = __C # # Training options # __C.TRAIN = edict() # Scales to use during training (can list multiple scales) # Each scale is the pix...
true
true
1c2e3c9b914af797b1b040a129e2c66f74970371
1,833
py
Python
payment_gateway/api/external/sqs_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
5
2020-06-22T21:29:54.000Z
2021-11-01T20:12:04.000Z
payment_gateway/api/external/sqs_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
5
2021-03-30T13:38:15.000Z
2021-09-22T19:10:27.000Z
payment_gateway/api/external/sqs_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
null
null
null
import boto3 import logging from django.conf import settings class SQSConnection: def __init__(self): ''' Instanciação do cliente SQS utilizando boto3; Returns: --------- sqs : pyboto3.sqs Instância sqs. '''...
30.04918
108
0.623568
import boto3 import logging from django.conf import settings class SQSConnection: def __init__(self): self.sqs_client = boto3.client( 'sqs', aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY, region_name='us-...
true
true