hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790c007e94046e9aa923f280e03cd1d43702aa8c
7,613
py
Python
run_tracking.py
MMV-Lab/cell_movie_analysis
26ac844a79ee4978db26aea8fc1fc9bd6a19a2c0
[ "BSD-2-Clause" ]
null
null
null
run_tracking.py
MMV-Lab/cell_movie_analysis
26ac844a79ee4978db26aea8fc1fc9bd6a19a2c0
[ "BSD-2-Clause" ]
null
null
null
run_tracking.py
MMV-Lab/cell_movie_analysis
26ac844a79ee4978db26aea8fc1fc9bd6a19a2c0
[ "BSD-2-Clause" ]
null
null
null
import os import numpy as np from glob import glob from scipy import optimize, spatial, ndimage from tifffile import imread, imsave from skimage.segmentation import find_boundaries from skimage.morphology import remove_small_objects from skimage.draw import line from utils import random_colormap import pdb # define bi...
35.741784
105
0.574544
import os import numpy as np from glob import glob from scipy import optimize, spatial, ndimage from tifffile import imread, imsave from skimage.segmentation import find_boundaries from skimage.morphology import remove_small_objects from skimage.draw import line from utils import random_colormap import pdb def prepar...
true
true
790c0141eea3aed5871dd3f16d2098900fa6f222
1,556
py
Python
taller_estructuras_de_control/ejercicio12.py
JuanMPerezM/AlgoritmosyProgramacion_Talleres
849e9ff97a34ee3db32d52467d0de5e981d3b0ee
[ "MIT" ]
null
null
null
taller_estructuras_de_control/ejercicio12.py
JuanMPerezM/AlgoritmosyProgramacion_Talleres
849e9ff97a34ee3db32d52467d0de5e981d3b0ee
[ "MIT" ]
null
null
null
taller_estructuras_de_control/ejercicio12.py
JuanMPerezM/AlgoritmosyProgramacion_Talleres
849e9ff97a34ee3db32d52467d0de5e981d3b0ee
[ "MIT" ]
null
null
null
""" Entradas Monto de dinero -> int -> a """ a = int ( input ( "Ingrese monto de dinero en COP:" )) b = a billetes_de_100000 = ( b - b % 100000 ) / 100000 b = b % 100000 billetes_de_50000 = ( b - b % 50000 ) / 50000 b = b % 50000 billetes_de_20000 = ( b - b % 20000 ) / 20000 b = b % 20000 billetes_de_10000 = ( b - b % ...
39.897436
80
0.63946
a = int ( input ( "Ingrese monto de dinero en COP:" )) b = a billetes_de_100000 = ( b - b % 100000 ) / 100000 b = b % 100000 billetes_de_50000 = ( b - b % 50000 ) / 50000 b = b % 50000 billetes_de_20000 = ( b - b % 20000 ) / 20000 b = b % 20000 billetes_de_10000 = ( b - b % 10000 ) / 10000 b = b % 10000 billetes_de_500...
true
true
790c01f5b7dba5ebd1fd66d047862f37cc8aa7bc
23,641
py
Python
xadmin/views/dashboard.py
edwardvon/xadmin-django3
f9f3ed7c6b33896e48ddf59149e1f5bd2cfe780a
[ "BSD-3-Clause" ]
7
2020-02-25T08:46:07.000Z
2021-07-22T15:25:13.000Z
xadmin/views/dashboard.py
edwardvon/xadmin-django3
f9f3ed7c6b33896e48ddf59149e1f5bd2cfe780a
[ "BSD-3-Clause" ]
6
2020-02-25T08:36:17.000Z
2021-09-22T18:36:37.000Z
xadmin/views/dashboard.py
edwardvon/xadmin-django3
f9f3ed7c6b33896e48ddf59149e1f5bd2cfe780a
[ "BSD-3-Clause" ]
4
2020-02-24T06:58:59.000Z
2021-03-02T06:53:46.000Z
from django import forms from django.apps import apps from django.core.exceptions import PermissionDenied from django.urls import reverse, NoReverseMatch from django.template.context_processors import csrf from django.db.models.base import ModelBase from django.forms.forms import DeclarativeFieldsMetaclass from django....
35.285075
134
0.609069
from django import forms from django.apps import apps from django.core.exceptions import PermissionDenied from django.urls import reverse, NoReverseMatch from django.template.context_processors import csrf from django.db.models.base import ModelBase from django.forms.forms import DeclarativeFieldsMetaclass from django....
true
true
790c02034a0ad703f5ce9fa5ce3bd8f177051c9a
44,900
py
Python
platipy/dicom/io/crawl.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
26
2020-10-26T17:30:00.000Z
2022-03-07T01:21:37.000Z
platipy/dicom/io/crawl.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
20
2020-10-01T04:05:37.000Z
2022-03-29T23:27:11.000Z
platipy/dicom/io/crawl.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
5
2020-10-01T03:33:36.000Z
2021-02-20T09:58:30.000Z
# Copyright 2020 University of New South Wales, University of Sydney # 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 app...
39.28259
119
0.573898
import re import sys import pathlib import pydicom import numpy as np import SimpleITK as sitk from skimage.draw import polygon from loguru import logger from datetime import datetime def flatten(itr): if type(itr) in (str, bytes, sitk.Image): yield itr else: for x in itr: ...
true
true
790c024a0670060ed0c26e7ddfda4cb6652205e8
10,808
py
Python
xlnet-master/train_gpu.py
zouning68/nlp_transfer_learning
e5010c5022c6cb0944cdbaaee402fd6d918fad3f
[ "Apache-2.0" ]
6,293
2019-06-19T23:29:13.000Z
2022-03-31T13:07:52.000Z
xlnet-master/train_gpu.py
zouning68/nlp_transfer_learning
e5010c5022c6cb0944cdbaaee402fd6d918fad3f
[ "Apache-2.0" ]
267
2019-06-20T00:25:13.000Z
2022-02-06T14:09:02.000Z
xlnet-master/train_gpu.py
zouning68/nlp_transfer_learning
e5010c5022c6cb0944cdbaaee402fd6d918fad3f
[ "Apache-2.0" ]
1,256
2019-06-20T01:13:22.000Z
2022-03-28T07:18:24.000Z
"""Pretraining on GPUs.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, sys import math import json import time import numpy as np from absl import flags import absl.logging as _logging # pylint: disable=unused-import import tensorflow as tf...
32.851064
81
0.70383
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, sys import math import json import time import numpy as np from absl import flags import absl.logging as _logging import tensorflow as tf import data_utils import model_utils from gpu_utils impo...
true
true
790c0365b6a5328cccebb59c901eebb402383e63
2,608
py
Python
src/models/dnn_regressor.py
onurerkin/prohack
51665841de04de4a7d44a3aeacec8e9142110cea
[ "MIT" ]
null
null
null
src/models/dnn_regressor.py
onurerkin/prohack
51665841de04de4a7d44a3aeacec8e9142110cea
[ "MIT" ]
null
null
null
src/models/dnn_regressor.py
onurerkin/prohack
51665841de04de4a7d44a3aeacec8e9142110cea
[ "MIT" ]
null
null
null
from typing import Tuple, Union import numpy as np import pandas as pd import tensorflow as tf from src.models.dnn_regressor_funcs import ( _compile_model, _create_keras_model, _fit_model, _to_input_list, ) def predict(model: tf.keras.Model, X_test: pd.DataFrame, cate_cols: list) -> np.array: ""...
26.612245
112
0.662577
from typing import Tuple, Union import numpy as np import pandas as pd import tensorflow as tf from src.models.dnn_regressor_funcs import ( _compile_model, _create_keras_model, _fit_model, _to_input_list, ) def predict(model: tf.keras.Model, X_test: pd.DataFrame, cate_cols: list) -> np.array: X_...
true
true
790c0387f5c26bd279ccf1f3bf58e2fc4b20c3bf
924
py
Python
tests/pycmd.py
JeremyMarshall/pymake
29ca1ef4abb8138eb70e7d4da3c4d983b5b0ec00
[ "MIT" ]
2
2021-07-11T12:48:11.000Z
2022-01-10T13:56:33.000Z
tests/pycmd.py
fcostin/pymake
7f1ea154f7ae592f614225db486dd79cdbe40190
[ "MIT" ]
null
null
null
tests/pycmd.py
fcostin/pymake
7f1ea154f7ae592f614225db486dd79cdbe40190
[ "MIT" ]
3
2019-10-05T00:54:06.000Z
2021-03-15T05:09:11.000Z
import os, sys, subprocess def writetofile(args): with open(args[0], 'w') as f: f.write(' '.join(args[1:])) def writeenvtofile(args): with open(args[0], 'w') as f: f.write(os.environ[args[1]]) def writesubprocessenvtofile(args): with open(args[0], 'w') as f: p = subprocess.Popen([sys.executable, "-...
23.692308
74
0.627706
import os, sys, subprocess def writetofile(args): with open(args[0], 'w') as f: f.write(' '.join(args[1:])) def writeenvtofile(args): with open(args[0], 'w') as f: f.write(os.environ[args[1]]) def writesubprocessenvtofile(args): with open(args[0], 'w') as f: p = subprocess.Popen([sys.executable, "-...
true
true
790c047d0e094bd72415b297f8d9e7f95d092341
367
py
Python
webapp/graphite/events/admin.py
drax68/graphite-web
c4a26ebb60fda1b15b49f3a284fe9753c3af10dd
[ "Apache-2.0" ]
null
null
null
webapp/graphite/events/admin.py
drax68/graphite-web
c4a26ebb60fda1b15b49f3a284fe9753c3af10dd
[ "Apache-2.0" ]
null
null
null
webapp/graphite/events/admin.py
drax68/graphite-web
c4a26ebb60fda1b15b49f3a284fe9753c3af10dd
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from graphite.events.models import Event class EventsAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('when', 'what', 'data', 'tags',) }), ) list_display = ('when', 'what', 'data',) list_filter = ('what',) search_fields = ('tag...
22.9375
55
0.594005
from django.contrib import admin from graphite.events.models import Event class EventsAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'fields': ('when', 'what', 'data', 'tags',) }), ) list_display = ('when', 'what', 'data',) list_filter = ('what',) search_fields = ('tag...
true
true
790c05788ad1a1b173c818378c6d269007646d2d
4,213
py
Python
qmcpy/stopping_criterion/_cub_qmc_ld_g.py
QMCSoftware/QMCSoftware
dbd774d635eb269e77c48526b980f62c23214617
[ "Apache-2.0" ]
40
2019-09-15T03:31:17.000Z
2022-02-19T19:52:10.000Z
qmcpy/stopping_criterion/_cub_qmc_ld_g.py
QMCSoftware/QMCSoftware
dbd774d635eb269e77c48526b980f62c23214617
[ "Apache-2.0" ]
152
2019-10-06T17:26:02.000Z
2022-03-01T04:17:04.000Z
qmcpy/stopping_criterion/_cub_qmc_ld_g.py
QMCSoftware/QMCSoftware
dbd774d635eb269e77c48526b980f62c23214617
[ "Apache-2.0" ]
16
2019-09-17T23:33:48.000Z
2021-07-19T22:38:45.000Z
from ._stopping_criterion import StoppingCriterion from ..accumulate_data import LDTransformData from ..util import MaxSamplesWarning, ParameterError, ParameterWarning from numpy import * from time import time import warnings class CubQMCLDG(StoppingCriterion): """ Abstract class for CubQMC{LD}G where LD is a...
44.347368
124
0.618562
from ._stopping_criterion import StoppingCriterion from ..accumulate_data import LDTransformData from ..util import MaxSamplesWarning, ParameterError, ParameterWarning from numpy import * from time import time import warnings class CubQMCLDG(StoppingCriterion): def __init__(self, integrand, abs_tol, rel_tol, n_i...
true
true
790c064b3a857462c7d2f2561d92dc148405fbb6
3,445
py
Python
pipe-cli/src/api/user.py
NShaforostov/cloud-pipeline
8d25b2b5f4838be569d9c25a307b77df5b0e73fc
[ "Apache-2.0" ]
null
null
null
pipe-cli/src/api/user.py
NShaforostov/cloud-pipeline
8d25b2b5f4838be569d9c25a307b77df5b0e73fc
[ "Apache-2.0" ]
1
2019-03-25T10:32:44.000Z
2019-03-27T17:45:19.000Z
pipe-cli/src/api/user.py
NShaforostov/cloud-pipeline
8d25b2b5f4838be569d9c25a307b77df5b0e73fc
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/) # # 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...
40.529412
101
0.649057
from src.api.entity import Entity from .base import API import json from ..model.object_permission_model import ObjectPermissionModel class User(API): def __init__(self): super(User, self).__init__() @classmethod def get_permissions(cls, identifier, acl_class): entity = Entit...
true
true
790c08692041c9b9e4ee1ccd4b7d5c190c472cac
2,159
py
Python
app/core/models.py
shadow-smoke/recipe-app-api
b5a75be5eb2a541accc39772a23d542fac1d5a69
[ "MIT" ]
null
null
null
app/core/models.py
shadow-smoke/recipe-app-api
b5a75be5eb2a541accc39772a23d542fac1d5a69
[ "MIT" ]
null
null
null
app/core/models.py
shadow-smoke/recipe-app-api
b5a75be5eb2a541accc39772a23d542fac1d5a69
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.conf import settings # Create your models here. class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields...
28.786667
78
0.677165
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.conf import settings class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): if not email: ...
true
true
790c096958b7b2279aefcd8bf59cc4a8ff135be6
283
py
Python
serverless/flask-server/config.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
serverless/flask-server/config.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
serverless/flask-server/config.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
class Config: AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') ACL = 'public-read' FLASKS3_BUCKET_NAME = os.environ.get('FLASKS3_BUCKET_NAME') FLASKS3_REGION = os.environ.get('FLASKS3_REGION')
47.166667
67
0.756184
class Config: AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') ACL = 'public-read' FLASKS3_BUCKET_NAME = os.environ.get('FLASKS3_BUCKET_NAME') FLASKS3_REGION = os.environ.get('FLASKS3_REGION')
true
true
790c09a67cd70b4ba95bd72c8d02670852786701
10
py
Python
example_snippets/multimenus_snippets/Snippets/Python/Regular expressions/Compilation flags/Enable verbose REs, for cleaner and more organized code.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/Python/Regular expressions/Compilation flags/Enable verbose REs, for cleaner and more organized code.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/Python/Regular expressions/Compilation flags/Enable verbose REs, for cleaner and more organized code.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
re.VERBOSE
10
10
0.9
re.VERBOSE
true
true
790c0a12c970bdb08194aad4038039ba6fce2039
8,304
py
Python
rasa_core/interpreter.py
chumakovvchuma/rasa_core
fd4d310220ec76338ca90ca8c298ddbaa576849f
[ "Apache-2.0" ]
1
2019-06-08T00:26:56.000Z
2019-06-08T00:26:56.000Z
rasa_core/interpreter.py
chumakovvchuma/rasa_core
fd4d310220ec76338ca90ca8c298ddbaa576849f
[ "Apache-2.0" ]
null
null
null
rasa_core/interpreter.py
chumakovvchuma/rasa_core
fd4d310220ec76338ca90ca8c298ddbaa576849f
[ "Apache-2.0" ]
2
2018-08-02T11:28:10.000Z
2020-07-11T23:03:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import logging import re import os import requests from builtins import str from typing import Text, List, Dict, Any logger = logging.getLogger(__name__) I...
34.890756
108
0.53408
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import logging import re import os import requests from builtins import str from typing import Text, List, Dict, Any logger = logging.getLogger(__name__) I...
true
true
790c0ab6d4a5c8d645baf0732e9614934d07bce0
963
py
Python
rally/common/objects/__init__.py
varuntiwari27/rally
948fba0e8fe8214dd3716451d2a52e014a4115be
[ "Apache-2.0" ]
1
2021-09-29T02:16:09.000Z
2021-09-29T02:16:09.000Z
rally/common/objects/__init__.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-14T11:29:31.000Z
2020-07-14T11:29:31.000Z
rally/common/objects/__init__.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-02T01:33:48.000Z
2020-07-02T01:33:48.000Z
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
43.772727
78
0.751817
from rally.common.objects.credential import Credential from rally.common.objects.deploy import Deployment from rally.common.objects.endpoint import Endpoint from rally.common.objects.task import Task from rally.common.objects.verification import Verification
true
true
790c0bbb8b3c151ca984c6bbfd8ac6bf4ffb3861
3,747
py
Python
cohesity_management_sdk/models/protection_info.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-09-24T17:35:53.000Z
2022-03-25T08:08:47.000Z
cohesity_management_sdk/models/protection_info.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-03-29T19:32:29.000Z
2022-01-03T23:16:45.000Z
cohesity_management_sdk/models/protection_info.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
16
2019-02-27T06:54:12.000Z
2021-11-16T18:10:24.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class ProtectionInfo(object): """Implementation of the 'ProtectionInfo' model. dataLocation defines data location related information. Attributes: end_time_usecs (long|int): Specifies the end time for object retention. l...
36.028846
81
0.62957
class ProtectionInfo(object): _names = { "end_time_usecs":'endTimeUsecs', "location":'location', "policy_id":'policyId', "protection_job_id":'protectionJobId', "protection_job_name":'protectionJobName', "retention_period":'retentionPeriod', "start_t...
true
true
790c0c6d96d735e5f20cfba9cd8e5195649d5bbf
222,718
py
Python
mypy/semanal.py
timwraight/mypy
583b99e5096c979043a63dcf92bf3f0d5993d03a
[ "PSF-2.0" ]
null
null
null
mypy/semanal.py
timwraight/mypy
583b99e5096c979043a63dcf92bf3f0d5993d03a
[ "PSF-2.0" ]
null
null
null
mypy/semanal.py
timwraight/mypy
583b99e5096c979043a63dcf92bf3f0d5993d03a
[ "PSF-2.0" ]
null
null
null
"""The new semantic analyzer (work in progress). Bind names to definitions and do various other simple consistency checks. It also detects special forms such as NamedTuple and cast(). Multiple analysis iterations may be needed to analyze forward references and import cycles. Each iteration "fills in" additional bindin...
45.18523
99
0.590864
from contextlib import contextmanager from typing import ( List, Dict, Set, Tuple, cast, TypeVar, Union, Optional, Callable, Iterator, Iterable, ) from typing_extensions import Final from mypy.nodes import ( MypyFile, TypeInfo, Node, AssignmentStmt, FuncDef, OverloadedFuncDef, ClassDef, Var, GDEF, FuncIt...
true
true
790c0d2f6f5179f121fbf4b29a5fd0f930a25a99
2,958
py
Python
create_pictures.py
Vantoine2019/PCBS_experience_subitizing
55bdbfdce4d53f71572ad4afc3942f0e8f84dd66
[ "MIT" ]
null
null
null
create_pictures.py
Vantoine2019/PCBS_experience_subitizing
55bdbfdce4d53f71572ad4afc3942f0e8f84dd66
[ "MIT" ]
null
null
null
create_pictures.py
Vantoine2019/PCBS_experience_subitizing
55bdbfdce4d53f71572ad4afc3942f0e8f84dd66
[ "MIT" ]
null
null
null
""" Création des images pour la tâche de détermination numérique (pour évaluer l'impact de la configuration sur le subitizing) Victor ANTOINE - victor.antoine@ens.fr """ import pygame from random import sample from numpy import random, sort from os import path from itertools import product W, H = 960, 540 pygame...
32.505495
80
0.64165
import pygame from random import sample from numpy import random, sort from os import path from itertools import product W, H = 960, 540 pygame.init() screen = pygame.display.set_mode((W, H), pygame.DOUBLEBUF) screen.fill((0, 0, 0)) origin_x, origin_y = random.randint(50, 910), random.randint(50, 490) list_coord_...
true
true
790c0d3627cb91fcd7991bf3021f1ae1e5773ae4
1,716
py
Python
django_school/classroom/urls.py
mauriciovieira/django-schools
487a1533afb643b6b3c81353cbc080ba430a77e3
[ "MIT" ]
null
null
null
django_school/classroom/urls.py
mauriciovieira/django-schools
487a1533afb643b6b3c81353cbc080ba430a77e3
[ "MIT" ]
null
null
null
django_school/classroom/urls.py
mauriciovieira/django-schools
487a1533afb643b6b3c81353cbc080ba430a77e3
[ "MIT" ]
null
null
null
from django.urls import include, path from rest_framework import routers from .views import classroom, students, teachers, quizzes urlpatterns = [ path('', classroom.home, name='home'), path('quizzes/', quizzes.QuizViewSet.as_view({'get': 'list'}), name='quizzes_list'), path('students/', include(([ ...
57.2
133
0.68007
from django.urls import include, path from rest_framework import routers from .views import classroom, students, teachers, quizzes urlpatterns = [ path('', classroom.home, name='home'), path('quizzes/', quizzes.QuizViewSet.as_view({'get': 'list'}), name='quizzes_list'), path('students/', include(([ ...
true
true
790c0d61ff781be5b0ba77576bf031c256c978bf
575
py
Python
membership/migrations/0007_auto_20151011_2109.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
membership/migrations/0007_auto_20151011_2109.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
membership/migrations/0007_auto_20151011_2109.py
jlaunonen/turska
fc6ec4e0ae50a823e931152ce8835098b96f5966
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('membership', '0006_auto_20151011_2005'), ] operations = [ migrations.AlterField( model_name='membership', ...
27.380952
182
0.624348
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('membership', '0006_auto_20151011_2005'), ] operations = [ migrations.AlterField( model_name='membership', name='state', ...
true
true
790c0eb70d2a829a17249a8fc860cb888ab38b1c
2,911
py
Python
bigmart.py
MayurJ20/bigmart
be0aab9908f9f4f3701b57936bfc2fe91c10eaca
[ "MIT" ]
null
null
null
bigmart.py
MayurJ20/bigmart
be0aab9908f9f4f3701b57936bfc2fe91c10eaca
[ "MIT" ]
null
null
null
bigmart.py
MayurJ20/bigmart
be0aab9908f9f4f3701b57936bfc2fe91c10eaca
[ "MIT" ]
6
2020-11-29T17:21:25.000Z
2020-11-30T18:22:51.000Z
import pickle import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings('ignore') df = pd.read_csv('Train.csv') # check for categorical attributes cat_col = [] for x in df.dtypes.index: if df.dtypes[x] == 'object': ca...
38.302632
115
0.707317
import pickle import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings('ignore') df = pd.read_csv('Train.csv') cat_col = [] for x in df.dtypes.index: if df.dtypes[x] == 'object': cat_col.append(x) cat_col.remove('It...
true
true
790c0f2a585ba2c2c078955f4565812d71fde4e8
715
py
Python
dpnode/dpn/data/migrations/0003_auto_20141117_2011.py
APTrust/EarthDiver
b894d4f5b3781b34e650ba6162b402b1c477da30
[ "Apache-2.0" ]
null
null
null
dpnode/dpn/data/migrations/0003_auto_20141117_2011.py
APTrust/EarthDiver
b894d4f5b3781b34e650ba6162b402b1c477da30
[ "Apache-2.0" ]
null
null
null
dpnode/dpn/data/migrations/0003_auto_20141117_2011.py
APTrust/EarthDiver
b894d4f5b3781b34e650ba6162b402b1c477da30
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('data', '0002_auto_20141114_1935'), ] operations = [ migrations.RemoveField( model_name='registryentry', ...
23.064516
44
0.569231
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('data', '0002_auto_20141114_1935'), ] operations = [ migrations.RemoveField( model_name='registryentry', name='fixity_algori...
true
true
790c10f392bbf70b34f97632db87e63480e309d9
6,194
py
Python
rasa/data.py
wtoalabi/rasa
1106845b5628dc1f739a09f75270926b572af918
[ "Apache-2.0" ]
2
2021-10-31T01:06:08.000Z
2021-11-08T09:43:23.000Z
rasa/data.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
56
2020-06-09T00:16:14.000Z
2020-11-16T00:25:20.000Z
rasa/data.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
null
null
null
import logging import os import shutil import tempfile import uuid import re from typing import Tuple, List, Text, Set, Union, Optional, Iterable from rasa.nlu.training_data import loading from rasa.utils.io import DEFAULT_ENCODING logger = logging.getLogger(__name__) def get_core_directory(paths: Optional[Union[Tex...
28.809302
91
0.658541
import logging import os import shutil import tempfile import uuid import re from typing import Tuple, List, Text, Set, Union, Optional, Iterable from rasa.nlu.training_data import loading from rasa.utils.io import DEFAULT_ENCODING logger = logging.getLogger(__name__) def get_core_directory(paths: Optional[Union[Tex...
true
true
790c10f6ca40fb1e2cd380a5f521e54a031d3132
1,362
py
Python
submission_builder.py
TrpFrog/jellyfish-aquarium
52be3065a94a0b28696e6532983250725b372302
[ "MIT" ]
1
2021-08-22T16:21:35.000Z
2021-08-22T16:21:35.000Z
submission_builder.py
TrpFrog/jellyfish-aquarium
52be3065a94a0b28696e6532983250725b372302
[ "MIT" ]
null
null
null
submission_builder.py
TrpFrog/jellyfish-aquarium
52be3065a94a0b28696e6532983250725b372302
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import shutil def make_empty_folder(folder_path:str): if os.path.exists(folder_path): if os.path.isdir(folder_path): shutil.rmtree(folder_path) else: os.remove(folder_path) os.mkdir(folder_path) def copy_files(from_path:str, to_path:...
28.375
77
0.618943
import os import shutil def make_empty_folder(folder_path:str): if os.path.exists(folder_path): if os.path.isdir(folder_path): shutil.rmtree(folder_path) else: os.remove(folder_path) os.mkdir(folder_path) def copy_files(from_path:str, to_path:str, extension:str): ...
true
true
790c10f98771cbe0b5628f249e002c7b6d3624cd
25,367
py
Python
tools/mo/openvino/tools/mo/front/kaldi/loader/loader.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/openvino/tools/mo/front/kaldi/loader/loader.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/openvino/tools/mo/front/kaldi/loader/loader.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import logging as log from io import IOBase import networkx as nx import numpy as np from openvino.tools.mo.ops.elementwise import Mul from openvino.tools.mo.ops.split import AttributedVariadicSplit from openvino.tools.mo.front.common....
45.217469
156
0.643277
import logging as log from io import IOBase import networkx as nx import numpy as np from openvino.tools.mo.ops.elementwise import Mul from openvino.tools.mo.ops.split import AttributedVariadicSplit from openvino.tools.mo.front.common.partial_infer.utils import float_array, int64_array from openvino.tools.mo.front...
true
true
790c1130918c13ad40b2c0d03ce2b98cd1705e60
1,197
py
Python
app/__init__.py
YouKnowBagu/item-catalog
b7cf67da8141a8c865663083a7f62c9d28b433c0
[ "MIT" ]
null
null
null
app/__init__.py
YouKnowBagu/item-catalog
b7cf67da8141a8c865663083a7f62c9d28b433c0
[ "MIT" ]
null
null
null
app/__init__.py
YouKnowBagu/item-catalog
b7cf67da8141a8c865663083a7f62c9d28b433c0
[ "MIT" ]
null
null
null
"""App initialization file. Instantiates app, database, login_manager. Registers view blueprints. Defines user_loader callback for LoginManager.""" from flask import Flask from flask_login import LoginManager from flask_wtf.csrf import CSRFProtect from sqlalchemy import create_engine from sqlalchemy.ext.declarative...
25.468085
150
0.798663
"""App initialization file. Instantiates app, database, login_manager. Registers view blueprints. Defines user_loader callback for LoginManager.""" from flask import Flask from flask_login import LoginManager from flask_wtf.csrf import CSRFProtect from sqlalchemy import create_engine from sqlalchemy.ext.declarative...
false
true
790c11bc5387a3937e676d63c9e3046fa73af5eb
3,753
py
Python
lib/includes/utility.py
vutriancode/mfea_autoscaling
9672ce16c8a4353e8234d536e35e0eb8d1b72673
[ "MIT" ]
null
null
null
lib/includes/utility.py
vutriancode/mfea_autoscaling
9672ce16c8a4353e8234d536e35e0eb8d1b72673
[ "MIT" ]
null
null
null
lib/includes/utility.py
vutriancode/mfea_autoscaling
9672ce16c8a4353e8234d536e35e0eb8d1b72673
[ "MIT" ]
null
null
null
""" Author: thangbk2209 Project: Autoscaling Created: 3/15/19 16:48 Purpose: """ import random import os import matplotlib import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler, StandardScaler import tensorflow as tf from config import * def draw_time_series(data, title, x_label, ...
26.244755
80
0.656541
import random import os import matplotlib import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler, StandardScaler import tensorflow as tf from config import * def draw_time_series(data, title, x_label, y_label, file_name): plt.plot(data) plt.title(title) plt.ylabel(y_label) p...
true
true
790c11f71733998d3ddc7cbc0ff5addafb00e0cc
3,395
py
Python
commons.py
gmberton/CosPlace
0f03cc9fe25919c87627e92535f3693747617eae
[ "MIT" ]
null
null
null
commons.py
gmberton/CosPlace
0f03cc9fe25919c87627e92535f3693747617eae
[ "MIT" ]
null
null
null
commons.py
gmberton/CosPlace
0f03cc9fe25919c87627e92535f3693747617eae
[ "MIT" ]
null
null
null
import torch import random import numpy as np class InfiniteDataLoader(torch.utils.data.DataLoader): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.dataset_iterator = super().__iter__() def __iter__(self): return self def __next__(self): ...
38.146067
92
0.671281
import torch import random import numpy as np class InfiniteDataLoader(torch.utils.data.DataLoader): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.dataset_iterator = super().__iter__() def __iter__(self): return self def __next__(self): ...
true
true
790c12b118c8b5fc677223e0eae5421ec3a2edb3
9,694
py
Python
policies/policies_core.py
eventbrite/britetech-casper-tools
2dd2d647368d3dcb05eefeb6dca20c1c3c7bfd05
[ "Apache-2.0" ]
null
null
null
policies/policies_core.py
eventbrite/britetech-casper-tools
2dd2d647368d3dcb05eefeb6dca20c1c3c7bfd05
[ "Apache-2.0" ]
null
null
null
policies/policies_core.py
eventbrite/britetech-casper-tools
2dd2d647368d3dcb05eefeb6dca20c1c3c7bfd05
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append('..') from utilities import jamfconfig from utilities import apirequests from computergroups import computergroups import xml.etree.ElementTree as etree jss_api_base_url = jamfconfig.getJSS_API_URL() #print("JSS API Base URL: {}".format(jss_api_base_url)) def cleanupOutput(inputString): #...
28.345029
185
0.702909
import sys sys.path.append('..') from utilities import jamfconfig from utilities import apirequests from computergroups import computergroups import xml.etree.ElementTree as etree jss_api_base_url = jamfconfig.getJSS_API_URL() def cleanupOutput(inputString): return inputString.replace(u"\u2018", "'").replace(u"\...
false
true
790c138a3e179991434973e9c0575166d21d0d4c
202
py
Python
Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py
ttotoc/codebook
2085e2e29cad9510ba9017e0a760cd0d2d4a734e
[ "MIT" ]
null
null
null
Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py
ttotoc/codebook
2085e2e29cad9510ba9017e0a760cd0d2d4a734e
[ "MIT" ]
null
null
null
Programming Languages & Libraries/Python/Python Complete Bootcamp/__name__ and __main__/one.py
ttotoc/codebook
2085e2e29cad9510ba9017e0a760cd0d2d4a734e
[ "MIT" ]
null
null
null
#one.py print('hello') def func(): print("Func() in one.py") print("TOP LEVEL IN one.py") if __name__ == "__main__": print("one.py is being run directly!") else: print("one.py has been imported!")
16.833333
39
0.658416
print('hello') def func(): print("Func() in one.py") print("TOP LEVEL IN one.py") if __name__ == "__main__": print("one.py is being run directly!") else: print("one.py has been imported!")
true
true
790c13d0abc3672c73d694754c277c3acb883e8b
14,299
py
Python
corehq/apps/appstore/views.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/appstore/views.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
1
2022-03-12T01:03:25.000Z
2022-03-12T01:03:25.000Z
corehq/apps/appstore/views.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
null
null
null
import json from urllib import urlencode from corehq.apps.registration.utils import create_30_day_trial from dimagi.utils.couch import CriticalSection from dimagi.utils.couch.resource_conflict import retry_resource from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse f...
37.044041
114
0.628575
import json from urllib import urlencode from corehq.apps.registration.utils import create_30_day_trial from dimagi.utils.couch import CriticalSection from dimagi.utils.couch.resource_conflict import retry_resource from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse f...
true
true
790c15b2e9cbcc86c252142307b53d3b174d9891
892
py
Python
tests/test_elementwise_mul_op.py
winston-zillow/paddle2onnx
65b9b8a628f6dc65109c30106e58174fcaa5845b
[ "Apache-2.0" ]
null
null
null
tests/test_elementwise_mul_op.py
winston-zillow/paddle2onnx
65b9b8a628f6dc65109c30106e58174fcaa5845b
[ "Apache-2.0" ]
null
null
null
tests/test_elementwise_mul_op.py
winston-zillow/paddle2onnx
65b9b8a628f6dc65109c30106e58174fcaa5845b
[ "Apache-2.0" ]
2
2021-01-19T03:54:14.000Z
2021-11-17T00:36:05.000Z
# Copyright (c) 2018 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.857143
74
0.765695
import unittest import numpy as np from op_test import OpTest from test_elementwise_add_op import TestElementwiseAddOp class TestElementwiseMulOp(TestElementwiseAddOp): def init(self): self.op_type = 'elementwise_mul' if __name__ == '__main__': unittest.main()
true
true
790c172e93f822e27eb77e8e022b03ffccc87b9a
250,936
py
Python
gluon/tools.py
kvk3008/project
8da5808a6bc8dcab74ca25c3d80c7c3dcd935883
[ "BSD-3-Clause" ]
null
null
null
gluon/tools.py
kvk3008/project
8da5808a6bc8dcab74ca25c3d80c7c3dcd935883
[ "BSD-3-Clause" ]
null
null
null
gluon/tools.py
kvk3008/project
8da5808a6bc8dcab74ca25c3d80c7c3dcd935883
[ "BSD-3-Clause" ]
null
null
null
#!/bin/python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Auth, Mail, PluginManager and various utilities ------------------------------------------------ """ import ...
40.736364
178
0.531913
""" | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Auth, Mail, PluginManager and various utilities ------------------------------------------------ """ import base64 try: import cPickle as pi...
false
true
790c17c0e7dada81311cf78f892c1f870b0a57e2
2,139
py
Python
Bing Wallpaper/GetWallpaper.py
networkprogrammer/bing-wallpaper-for-mac
e0d840ae445bb17efc80f6cc3d7698c340992985
[ "MIT" ]
86
2015-04-02T21:21:05.000Z
2022-01-09T18:57:49.000Z
Bing Wallpaper/GetWallpaper.py
networkprogrammer/bing-wallpaper-for-mac
e0d840ae445bb17efc80f6cc3d7698c340992985
[ "MIT" ]
13
2015-04-10T11:11:00.000Z
2020-05-09T13:08:20.000Z
Bing Wallpaper/GetWallpaper.py
networkprogrammer/bing-wallpaper-for-mac
e0d840ae445bb17efc80f6cc3d7698c340992985
[ "MIT" ]
20
2015-04-02T20:08:39.000Z
2022-03-02T12:11:55.000Z
import json #Try with python3 try: from urllib.request import urlopen, urlretrieve from urllib.request import urlretrieve #Else try python2 except: from urllib2 import urlopen from urllib import urlretrieve from os import path #User home folder homeFolder = path.expanduser("~") #...
25.164706
103
0.624123
import json try: from urllib.request import urlopen, urlretrieve from urllib.request import urlretrieve except: from urllib2 import urlopen from urllib import urlretrieve from os import path homeFolder = path.expanduser("~") pictureLocation = homeFolder + "/Downloads/" def ...
true
true
790c17c3fa179607dfdd445da0e23d4b45f81a5e
2,721
py
Python
libcsce/bin/csce.py
strozfriedberg/cobaltstrike-config-extractor
a2c5ed16d0b6bcbf8967f1c4caa7797acb245d1c
[ "Apache-2.0" ]
74
2021-08-23T19:02:30.000Z
2022-02-10T23:04:02.000Z
libcsce/bin/csce.py
strozfriedberg/cobaltstrike-config-extractor
a2c5ed16d0b6bcbf8967f1c4caa7797acb245d1c
[ "Apache-2.0" ]
3
2021-08-24T19:14:32.000Z
2021-09-29T21:23:17.000Z
libcsce/bin/csce.py
strozfriedberg/cobaltstrike-config-extractor
a2c5ed16d0b6bcbf8967f1c4caa7797acb245d1c
[ "Apache-2.0" ]
6
2021-08-29T19:32:23.000Z
2022-01-24T08:09:00.000Z
#!/usr/bin/env python3 ## Copyright 2021 Aon plc ## ## 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 o...
29.576087
91
0.674752
s_version] else: version_list = list(CobaltStrikeConfigParser.SUPPORTED_VERSIONS) config: Dict[str, Any] = dict() for version in version_list: with CobaltStrikeConfigParser(args.source, version) as parser: try: config = parser.parse_config() brea...
true
true
790c17e6fde2cc016c39e0908d2ce033722ac1af
807
py
Python
app/topology/server.py
kukkalli/orchestrator
0b53e3f95c0a886a739cf08d611ea76c958bc691
[ "Apache-2.0" ]
1
2022-03-02T09:43:45.000Z
2022-03-02T09:43:45.000Z
app/topology/server.py
kukkalli/orchestrator
0b53e3f95c0a886a739cf08d611ea76c958bc691
[ "Apache-2.0" ]
null
null
null
app/topology/server.py
kukkalli/orchestrator
0b53e3f95c0a886a739cf08d611ea76c958bc691
[ "Apache-2.0" ]
null
null
null
import logging from openstack_internal.nova.hypervisor_details import OSHypervisor from topology.link import Link from topology.node import Node LOG = logging.getLogger(__name__) class Server(Node): def __init__(self, int_id: int, hypervisor: OSHypervisor): super().__init__(int_id=int_id, _id=hyperviso...
29.888889
109
0.705081
import logging from openstack_internal.nova.hypervisor_details import OSHypervisor from topology.link import Link from topology.node import Node LOG = logging.getLogger(__name__) class Server(Node): def __init__(self, int_id: int, hypervisor: OSHypervisor): super().__init__(int_id=int_id, _id=hyperviso...
true
true
790c1851446c0505db70f06ac267d91ce165893d
466
py
Python
tests/test_tidy_csv_to_sureal_json.py
PotasnikM/translator-to-suJSON
abb2001c78d431bd2087754666bc896ba0543dfd
[ "MIT" ]
null
null
null
tests/test_tidy_csv_to_sureal_json.py
PotasnikM/translator-to-suJSON
abb2001c78d431bd2087754666bc896ba0543dfd
[ "MIT" ]
null
null
null
tests/test_tidy_csv_to_sureal_json.py
PotasnikM/translator-to-suJSON
abb2001c78d431bd2087754666bc896ba0543dfd
[ "MIT" ]
null
null
null
from sujson.Csv2json import Csv2json import unittest import filecmp class ConvertCsvToJson(unittest.TestCase): def setUp(self): self.csv_to_json = Csv2json() def test_conversion(self): self.csv_to_json.load("files/Netflix.csv", delimiter=";") self.csv_to_json.convert("files/Netflix_jte...
27.411765
86
0.712446
from sujson.Csv2json import Csv2json import unittest import filecmp class ConvertCsvToJson(unittest.TestCase): def setUp(self): self.csv_to_json = Csv2json() def test_conversion(self): self.csv_to_json.load("files/Netflix.csv", delimiter=";") self.csv_to_json.convert("files/Netflix_jte...
true
true
790c1a97e465dbe15e1bde0bc0ddfafb5b1719ae
19,017
py
Python
resdk/tests/functional/data_upload/e2e_upload.py
tristanbrown/resolwe-bio-py
c911defde8a5e7e902ad1adf4f9e480f17002c18
[ "Apache-2.0" ]
null
null
null
resdk/tests/functional/data_upload/e2e_upload.py
tristanbrown/resolwe-bio-py
c911defde8a5e7e902ad1adf4f9e480f17002c18
[ "Apache-2.0" ]
null
null
null
resdk/tests/functional/data_upload/e2e_upload.py
tristanbrown/resolwe-bio-py
c911defde8a5e7e902ad1adf4f9e480f17002c18
[ "Apache-2.0" ]
null
null
null
# pylint: disable=missing-docstring # pylint: disable=unbalanced-tuple-unpacking import os from resdk.tests.functional.base import BaseResdkFunctionalTest class TestUpload(BaseResdkFunctionalTest): def get_samplesheet(self): """Return path of an annotation samplesheet.""" files_path = os.path.no...
38.418182
89
0.560288
import os from resdk.tests.functional.base import BaseResdkFunctionalTest class TestUpload(BaseResdkFunctionalTest): def get_samplesheet(self): files_path = os.path.normpath( os.path.join( os.path.dirname(os.path.abspath(__file__)), '..', '.....
true
true
790c1beff59b54ffeb4ba62b5a503efc5c1d2929
7,835
py
Python
py/server/tests/test_kafka_consumer.py
lbooker42/deephaven-core
2d04563f18ae914754b28041475c02770e57af15
[ "MIT" ]
null
null
null
py/server/tests/test_kafka_consumer.py
lbooker42/deephaven-core
2d04563f18ae914754b28041475c02770e57af15
[ "MIT" ]
null
null
null
py/server/tests/test_kafka_consumer.py
lbooker42/deephaven-core
2d04563f18ae914754b28041475c02770e57af15
[ "MIT" ]
null
null
null
# # Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending # import os import unittest from deephaven import kafka_consumer as ck from deephaven.stream.kafka.consumer import TableType, KeyValueSpec from tests.testbase import BaseTestCase from deephaven import dtypes class KafkaConsumerTestCase(BaseTestCase)...
36.105991
94
0.5515
import os import unittest from deephaven import kafka_consumer as ck from deephaven.stream.kafka.consumer import TableType, KeyValueSpec from tests.testbase import BaseTestCase from deephaven import dtypes class KafkaConsumerTestCase(BaseTestCase): def _assert_common_cols(self, cols): self.assertEqu...
true
true
790c1c72522e0be45defe059030eba030b43cba0
532
py
Python
diversity_filters/diversity_filter.py
marco-foscato/Lib-INVENT
fe6a65ab7165abd87b25752a6b4208c8703d11f7
[ "Apache-2.0" ]
26
2021-04-30T23:21:17.000Z
2022-03-10T06:33:11.000Z
diversity_filters/diversity_filter.py
marco-foscato/Lib-INVENT
fe6a65ab7165abd87b25752a6b4208c8703d11f7
[ "Apache-2.0" ]
6
2021-10-03T08:35:48.000Z
2022-03-24T09:57:39.000Z
diversity_filters/diversity_filter.py
marco-foscato/Lib-INVENT
fe6a65ab7165abd87b25752a6b4208c8703d11f7
[ "Apache-2.0" ]
10
2021-04-28T14:08:17.000Z
2022-03-04T04:18:13.000Z
from diversity_filters import NoFilter, NoFilterWithPenalty from diversity_filters.base_diversity_filter import BaseDiversityFilter from diversity_filters.diversity_filter_parameters import DiversityFilterParameters class DiversityFilter: def __new__(cls, parameters: DiversityFilterParameters) -> BaseDiversityFi...
40.923077
83
0.789474
from diversity_filters import NoFilter, NoFilterWithPenalty from diversity_filters.base_diversity_filter import BaseDiversityFilter from diversity_filters.diversity_filter_parameters import DiversityFilterParameters class DiversityFilter: def __new__(cls, parameters: DiversityFilterParameters) -> BaseDiversityFi...
true
true
790c1d9281014ad9759f80ce15899e74ddf496ab
179
py
Python
fixtures/python_output/post_form.py
martinsirbe/curlconverter
c5324e85d2ca24ef4743fb2bb36139d23367e293
[ "MIT" ]
4,955
2015-01-02T09:04:20.000Z
2021-10-06T03:54:43.000Z
fixtures/python_output/post_form.py
martinsirbe/curlconverter
c5324e85d2ca24ef4743fb2bb36139d23367e293
[ "MIT" ]
242
2015-03-27T05:59:11.000Z
2021-10-03T08:36:05.000Z
fixtures/python_output/post_form.py
martinsirbe/curlconverter
c5324e85d2ca24ef4743fb2bb36139d23367e293
[ "MIT" ]
504
2015-01-02T16:04:36.000Z
2021-10-01T03:43:55.000Z
import requests files = { 'username': (None, 'davidwalsh'), 'password': (None, 'something'), } response = requests.post('http://domain.tld/post-to-me.php', files=files)
19.888889
73
0.648045
import requests files = { 'username': (None, 'davidwalsh'), 'password': (None, 'something'), } response = requests.post('http://domain.tld/post-to-me.php', files=files)
true
true
790c1f2434082d6c5ac1eb1820572375dab6fa4e
768
py
Python
catalog/bindings/wfs/allowed_values.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/allowed_values.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/allowed_values.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import List from bindings.wfs.range import Range __NAMESPACE__ = "http://www.opengis.net/ows/1.1" @dataclass class AllowedValues: """List of all the valid values and/or ranges of values for this quantity. For numeric quantities, signed values should be or...
23.272727
78
0.598958
from dataclasses import dataclass, field from typing import List from bindings.wfs.range import Range __NAMESPACE__ = "http://www.opengis.net/ows/1.1" @dataclass class AllowedValues: class Meta: namespace = "http://www.opengis.net/ows/1.1" value: List[str] = field( default_factory=list, ...
true
true
790c1ffe5f8782708c5d0814db539647984e9c48
162
py
Python
fedrec/communications/messages.py
rharish101/RecoEdge
8e33da7e09cea6208ccea0887d575b9431d11c27
[ "Apache-2.0" ]
null
null
null
fedrec/communications/messages.py
rharish101/RecoEdge
8e33da7e09cea6208ccea0887d575b9431d11c27
[ "Apache-2.0" ]
null
null
null
fedrec/communications/messages.py
rharish101/RecoEdge
8e33da7e09cea6208ccea0887d575b9431d11c27
[ "Apache-2.0" ]
null
null
null
from enum import Enum class ProcMessage(Enum): SYNC_MODEL = 1 class JobCompletions(): SENDER_ID = 1 STATUS = True RESULTS = {} ERRORS = ""
13.5
24
0.623457
from enum import Enum class ProcMessage(Enum): SYNC_MODEL = 1 class JobCompletions(): SENDER_ID = 1 STATUS = True RESULTS = {} ERRORS = ""
true
true
790c2064fe63fa5e1f3040f85e72c22a184b36f6
463
py
Python
example/invoices/forms.py
pakondom/templated-docs
a52b87d55b26ed26773e3b4bfec634923c936480
[ "MIT" ]
100
2016-07-19T12:39:55.000Z
2022-03-08T16:42:21.000Z
example/invoices/forms.py
pakondom/templated-docs
a52b87d55b26ed26773e3b4bfec634923c936480
[ "MIT" ]
49
2018-09-05T06:56:22.000Z
2020-04-11T03:58:16.000Z
example/invoices/forms.py
pakondom/templated-docs
a52b87d55b26ed26773e3b4bfec634923c936480
[ "MIT" ]
69
2016-07-18T09:30:25.000Z
2022-03-08T16:42:27.000Z
#--coding: utf8-- from django import forms from invoices.models import Customer class InvoiceForm(forms.Form): FORMAT_CHOICES = ( ('pdf', 'PDF'), ('docx', 'MS Word'), ('html', 'HTML'), ) number = forms.CharField(label='Invoice #') customer = forms.ModelChoiceField(queryset=Cu...
24.368421
70
0.647948
from django import forms from invoices.models import Customer class InvoiceForm(forms.Form): FORMAT_CHOICES = ( ('pdf', 'PDF'), ('docx', 'MS Word'), ('html', 'HTML'), ) number = forms.CharField(label='Invoice #') customer = forms.ModelChoiceField(queryset=Customer.objects.al...
true
true
790c207725e1c54d9a32196cd02ceb7f9a4e7af7
18,376
py
Python
renderer/render_fmo.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
1
2022-03-14T12:46:38.000Z
2022-03-14T12:46:38.000Z
renderer/render_fmo.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
null
null
null
renderer/render_fmo.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
null
null
null
""" render_fmo.py renders obj file to rgb image with fmo model Aviable function: - clear_mash: delete all the mesh in the secene - scene_setting_init: set scene configurations - node_setting_init: set node configurations - render: render rgb image for one obj file and one viewpoint - render_obj: wrapper function for r...
39.181237
200
0.619286
import sys import os import random import pickle import bpy import glob import numpy as np from mathutils import Vector from mathutils import Euler import cv2 from PIL import Image from skimage.draw import line_aa from scipy import signal from skimage.measure import regionprops from array2gif import write_gif abs_pat...
true
true
790c221e22bedc50c594b18d652cc9bf37dae1c9
1,877
py
Python
train_more.py
We-Gold/Malaria
98c7fc66bcf2b9a29f88bfdab231a59fd1fc95f4
[ "MIT" ]
1
2019-12-23T20:57:12.000Z
2019-12-23T20:57:12.000Z
train_more.py
We-Gold/Malaria
98c7fc66bcf2b9a29f88bfdab231a59fd1fc95f4
[ "MIT" ]
null
null
null
train_more.py
We-Gold/Malaria
98c7fc66bcf2b9a29f88bfdab231a59fd1fc95f4
[ "MIT" ]
null
null
null
import keras from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing import image from keras.applications.mobilenet import preprocess_input from keras.preprocessing.image import ImageDataGenerator from keras.models import Model from keras.optimizers import Adam from keras.callbacks import Mode...
39.93617
86
0.546084
import keras from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing import image from keras.applications.mobilenet import preprocess_input from keras.preprocessing.image import ImageDataGenerator from keras.models import Model from keras.optimizers import Adam from keras.callbacks import Mode...
true
true
790c22e9c49c2fd46e5a28dd323b0125dd895d97
489
py
Python
src/staf/migrations/0009_dataset_process.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/staf/migrations/0009_dataset_process.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/staf/migrations/0009_dataset_process.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
# Generated by Django 2.1.3 on 2018-12-08 05:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('staf', '0008_auto_20181207_1525'), ] operations = [ migrations.AddField( model_name='dataset', ...
24.45
123
0.640082
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('staf', '0008_auto_20181207_1525'), ] operations = [ migrations.AddField( model_name='dataset', name='process', field=m...
true
true
790c23939ebcb20e71804e4c46bb53d90e1d32dc
12,931
py
Python
rdflib/plugins/serializers/rdfxml.py
jclerman/rdflib
75c545e0747032a700e0bfc68dd044b86c275d03
[ "BSD-3-Clause" ]
1
2021-05-25T12:32:26.000Z
2021-05-25T12:32:26.000Z
rdflib/plugins/serializers/rdfxml.py
jclerman/rdflib
75c545e0747032a700e0bfc68dd044b86c275d03
[ "BSD-3-Clause" ]
19
2021-06-28T06:17:30.000Z
2021-11-29T06:14:43.000Z
rdflib/plugins/serializers/rdfxml.py
ajnelson-nist/rdflib
2011a6dd85518642e0800b2ee010a5565e16e5cc
[ "BSD-3-Clause" ]
1
2021-05-16T08:08:56.000Z
2021-05-16T08:08:56.000Z
from typing import IO, Dict, Optional, Set from rdflib.plugins.serializers.xmlwriter import XMLWriter from rdflib.namespace import Namespace, RDF, RDFS # , split_uri from rdflib.plugins.parsers.RDFVOC import RDFVOC from rdflib.graph import Graph from rdflib.term import Identifier, URIRef, Literal, BNode from rdflib....
34.760753
90
0.551079
from typing import IO, Dict, Optional, Set from rdflib.plugins.serializers.xmlwriter import XMLWriter from rdflib.namespace import Namespace, RDF, RDFS from rdflib.plugins.parsers.RDFVOC import RDFVOC from rdflib.graph import Graph from rdflib.term import Identifier, URIRef, Literal, BNode from rdflib.util import f...
true
true
790c2497814d48278330cf0b6b21cb81bcfa4193
13,916
py
Python
tests/storage_test.py
phanirajl/cassandra-medusa
04315068365fc372b6a26d8b0ed6d2b135db1d98
[ "Apache-2.0" ]
null
null
null
tests/storage_test.py
phanirajl/cassandra-medusa
04315068365fc372b6a26d8b0ed6d2b135db1d98
[ "Apache-2.0" ]
null
null
null
tests/storage_test.py
phanirajl/cassandra-medusa
04315068365fc372b6a26d8b0ed6d2b135db1d98
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019 Spotify AB. 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...
45.035599
119
0.69359
import base64 import configparser import datetime import hashlib import os import shutil import tempfile import unittest import medusa.storage.abstract_storage from medusa.backup import generate_md5_hash from medusa.config import MedusaConfig, StorageConfig, _namedtuple_from_dict, CassandraConfig from ...
true
true
790c25789e022e8cde45afd367a9a0a195f53846
401
py
Python
src/stronghold/rosalind_qrt.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/stronghold/rosalind_qrt.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/stronghold/rosalind_qrt.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import files import phylogeny def main(argv): lines = files.read_lines(argv[0]) taxa = lines[0].split() table = lines[1:] print '\n'.join('{%s, %s} {%s, %s}' % (a1, a2, b1, b2) for ((a1, a2), (b1, b2)) in phyl...
21.105263
119
0.610973
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import files import phylogeny def main(argv): lines = files.read_lines(argv[0]) taxa = lines[0].split() table = lines[1:] print '\n'.join('{%s, %s} {%s, %s}' % (a1, a2, b1, b2) for ((a1, a2), (b1, b2)) in phyl...
false
true
790c259407daddb30593df39ad91cf4f0684b38d
4,131
py
Python
saleor/checkout/core.py
spartonia/saleor
88c54f58f9318e1bc3de3ab13a0fcf479cb533bb
[ "BSD-3-Clause" ]
null
null
null
saleor/checkout/core.py
spartonia/saleor
88c54f58f9318e1bc3de3ab13a0fcf479cb533bb
[ "BSD-3-Clause" ]
null
null
null
saleor/checkout/core.py
spartonia/saleor
88c54f58f9318e1bc3de3ab13a0fcf479cb533bb
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from django.conf import settings from prices import Price from satchless.process import ProcessManager from .steps import ShippingAddressStep, ShippingMethodStep, SummaryStep, DetailsStep from ..cart import Cart from ..core import analytics from ..order.models import Order STORAGE...
35.307692
84
0.635924
from collections import defaultdict from django.conf import settings from prices import Price from satchless.process import ProcessManager from .steps import ShippingAddressStep, ShippingMethodStep, SummaryStep, DetailsStep from ..cart import Cart from ..core import analytics from ..order.models import Order STORAGE...
true
true
790c2691f57b39297379cb70543eb72f9152d12e
7,923
py
Python
lists_of_terms/shodule_for_lists_of_terms.py
ShawnJSavoie2/ToBeRedone
be1981969deb5ebb083e7ef2592e331746af757a
[ "MIT" ]
null
null
null
lists_of_terms/shodule_for_lists_of_terms.py
ShawnJSavoie2/ToBeRedone
be1981969deb5ebb083e7ef2592e331746af757a
[ "MIT" ]
null
null
null
lists_of_terms/shodule_for_lists_of_terms.py
ShawnJSavoie2/ToBeRedone
be1981969deb5ebb083e7ef2592e331746af757a
[ "MIT" ]
null
null
null
# IDLE (Python 3.8.0) # module_for_lists_of_terms def termal_generator(lict): length_of_termal_generator = 16 padding = length_of_termal_generator - len(lict) count = padding while count != 0: lict.append(['']) count = count - 1 termal_lict = [] for first_inner in lict[0]: ...
35.370536
124
0.47015
def termal_generator(lict): length_of_termal_generator = 16 padding = length_of_termal_generator - len(lict) count = padding while count != 0: lict.append(['']) count = count - 1 termal_lict = [] for first_inner in lict[0]: for second_inner in lict[1]: fo...
true
true
790c2779c0128cf69b56a25da075f3e3f2db55a4
61,949
py
Python
venv/lib/python2.7/site-packages/ansible/modules/packaging/os/yum.py
aburan28/ansible-devops-pipeline
50aa801632ca0828c16faac55732f1e79085f932
[ "Apache-2.0" ]
1
2019-04-16T21:23:15.000Z
2019-04-16T21:23:15.000Z
venv/lib/python2.7/site-packages/ansible/modules/packaging/os/yum.py
aburan28/ansible-devops-pipeline
50aa801632ca0828c16faac55732f1e79085f932
[ "Apache-2.0" ]
5
2020-02-26T20:10:50.000Z
2021-09-23T23:23:18.000Z
venv/lib/python2.7/site-packages/ansible/modules/packaging/os/yum.py
aburan28/ansible-devops-pipeline
50aa801632ca0828c16faac55732f1e79085f932
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # Copyright: (c) 2014, Epic Games, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, p...
39.533504
160
0.557216
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'core'} DOCUMENTATION = ''' --- module: yum version_added: historical short_description: ...
true
true
790c27a56ffea18d938238326b7e66906fce3238
4,686
py
Python
experiments/steven/online-vae/pick_and_place/state_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/steven/online-vae/pick_and_place/state_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/steven/online-vae/pick_and_place/state_exp.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
import rlkit.misc.hyperparameter as hyp from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1 from multiworld.envs.mujoco.cameras import sawyer_pick_and_place_camera from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.grill.launcher import grill_her_td3_full_experiment import rlkit.torc...
35.5
80
0.568289
import rlkit.misc.hyperparameter as hyp from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1 from multiworld.envs.mujoco.cameras import sawyer_pick_and_place_camera from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.grill.launcher import grill_her_td3_full_experiment import rlkit.torc...
true
true
790c27e45987e197ed450469d6e3791ee48c8be2
11,074
py
Python
uboot/tools/microcode-tool.py
bingchunjin/1806_SDK
d5ed0258fc22f60e00ec025b802d175f33da6e41
[ "MIT" ]
31
2018-01-16T17:11:44.000Z
2022-03-16T13:51:24.000Z
uboot/tools/microcode-tool.py
bingchunjin/1806_SDK
d5ed0258fc22f60e00ec025b802d175f33da6e41
[ "MIT" ]
4
2016-08-30T11:30:25.000Z
2020-12-27T09:58:07.000Z
uboot/tools/microcode-tool.py
bingchunjin/1806_SDK
d5ed0258fc22f60e00ec025b802d175f33da6e41
[ "MIT" ]
30
2018-05-02T08:43:27.000Z
2022-01-23T03:25:54.000Z
#!/usr/bin/env python # # Copyright (c) 2014 Google, Inc # # SPDX-License-Identifier: GPL-2.0+ # # Intel microcode update tool from optparse import OptionParser import os import re import struct import sys MICROCODE_DIR = 'arch/x86/dts/microcode' class Microcode: """Holds information about the microcode for...
34.823899
90
0.564475
from optparse import OptionParser import os import re import struct import sys MICROCODE_DIR = 'arch/x86/dts/microcode' class Microcode: """Holds information about the microcode for a particular model of CPU. Attributes: name: Name of the CPU this microcode is for, including any version ...
false
true
790c28156c1f9e13379b6d5b4cc63496002c2adc
39,088
py
Python
skbuild/setuptools_wrap.py
vyasr/scikit-build
5a821eb137d253e0380b4e76a2a692fba27d16dc
[ "MIT" ]
null
null
null
skbuild/setuptools_wrap.py
vyasr/scikit-build
5a821eb137d253e0380b4e76a2a692fba27d16dc
[ "MIT" ]
null
null
null
skbuild/setuptools_wrap.py
vyasr/scikit-build
5a821eb137d253e0380b4e76a2a692fba27d16dc
[ "MIT" ]
null
null
null
"""This module provides functionality for wrapping key infrastructure components from distutils and setuptools. """ from __future__ import print_function import argparse import copy import json import os import os.path import platform import stat import sys import warnings from contextlib import contextmanager # pyl...
38.586377
124
0.656698
from __future__ import print_function import argparse import copy import json import os import os.path import platform import stat import sys import warnings from contextlib import contextmanager from distutils.errors import DistutilsArgError, DistutilsError, DistutilsGetoptError from glob import glob from shutil i...
true
true
790c283a5a74d9bcd5fc3079c028df79210d6a0c
187
py
Python
Course/functions/example_12.py
zevgenia/Python_shultais
e51c31de221c5e7f36ede857a960138009ec8a05
[ "Apache-2.0" ]
null
null
null
Course/functions/example_12.py
zevgenia/Python_shultais
e51c31de221c5e7f36ede857a960138009ec8a05
[ "Apache-2.0" ]
null
null
null
Course/functions/example_12.py
zevgenia/Python_shultais
e51c31de221c5e7f36ede857a960138009ec8a05
[ "Apache-2.0" ]
null
null
null
#sum = 10 def func1(): #sum = 20 print('Local1:', sum) def func2(): #sum = 30 print('Local 2:', sum) func2() func1() print("Global:", sum([1, 2, 3]))
11.6875
32
0.459893
def func1(): print('Local1:', sum) def func2(): print('Local 2:', sum) func2() func1() print("Global:", sum([1, 2, 3]))
true
true
790c28763c9989b994ede509dbfb72af89e2c404
16,381
py
Python
chainer/training/updaters/multiprocess_parallel_updater.py
hikjik/chainer
324a1bc1ea3edd63d225e4a87ed0a36af7fd712f
[ "MIT" ]
1
2019-03-09T07:39:07.000Z
2019-03-09T07:39:07.000Z
chainer/training/updaters/multiprocess_parallel_updater.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
null
null
null
chainer/training/updaters/multiprocess_parallel_updater.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
null
null
null
import multiprocessing import warnings import six from chainer.backends import cuda from chainer.dataset import convert from chainer import reporter from chainer.training.updaters import standard_updater try: from cupy.cuda import nccl _available = True except Exception: _available = False import numpy...
33.567623
79
0.561687
import multiprocessing import warnings import six from chainer.backends import cuda from chainer.dataset import convert from chainer import reporter from chainer.training.updaters import standard_updater try: from cupy.cuda import nccl _available = True except Exception: _available = False import numpy...
true
true
790c28b55d314170ea807611560eda7af16dbf0b
13,628
py
Python
deutscheflash.py
n-Holmes/deutscheflash
1f974a3fffe771c0e552fa40123b27fa3f24674f
[ "MIT" ]
null
null
null
deutscheflash.py
n-Holmes/deutscheflash
1f974a3fffe771c0e552fa40123b27fa3f24674f
[ "MIT" ]
null
null
null
deutscheflash.py
n-Holmes/deutscheflash
1f974a3fffe771c0e552fa40123b27fa3f24674f
[ "MIT" ]
null
null
null
"""A simple CLI app to practice grammatical genders of German nouns.""" import argparse import json import pathlib import pandas as pd class WordList: """Data structure to store a pandas dataframe and some structural details. Args: path (pathlib.Path or None): The path (without suffix) to a wor...
32.370546
91
0.587981
import argparse import json import pathlib import pandas as pd class WordList: def __init__(self, path=None): self.words = None self.structure = {} if path is not None: self.load(path) def load(self, path: pathlib.Path): try: self.words = pd.read_cs...
true
true
790c29059bb91b3194999732eef18e0f92d55ef4
151
py
Python
figaro/__init__.py
rylans/figaro
99c4eb31d402d30dcb266e3da123edf698e979f5
[ "Apache-2.0" ]
null
null
null
figaro/__init__.py
rylans/figaro
99c4eb31d402d30dcb266e3da123edf698e979f5
[ "Apache-2.0" ]
null
null
null
figaro/__init__.py
rylans/figaro
99c4eb31d402d30dcb266e3da123edf698e979f5
[ "Apache-2.0" ]
null
null
null
from .agent import Figaro from .handlers.arithmetichandler import ArithmeticHandler from .handlers.elizastatementhandler import ElizaStatementHandler
30.2
65
0.880795
from .agent import Figaro from .handlers.arithmetichandler import ArithmeticHandler from .handlers.elizastatementhandler import ElizaStatementHandler
true
true
790c2921c88db0e67e8f59a8ac4aaa322b1c55f7
32,147
py
Python
platipy/imaging/projects/cardiac/run.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
null
null
null
platipy/imaging/projects/cardiac/run.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
null
null
null
platipy/imaging/projects/cardiac/run.py
RadiotherapyAI/platipy
53294789a3805ea088c9953027f4ab09a614f052
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 University of New South Wales, University of Sydney, Ingham Institute # 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 # Unle...
35.918436
103
0.613339
import os import SimpleITK as sitk import numpy as np from loguru import logger from platipy.imaging.registration.utils import apply_transform, convert_mask_to_reg_structure from platipy.imaging.registration.linear import ( linear_registration, ) from platipy.imaging.registration.deformable impor...
true
true
790c2a82d1a2ff91fe456d51a9406506669ddb6e
3,540
py
Python
econotw.py
ppnasser/econotw
ccc3d7fefebdc70b2abfc3e75ba387c22e937f86
[ "MIT" ]
null
null
null
econotw.py
ppnasser/econotw
ccc3d7fefebdc70b2abfc3e75ba387c22e937f86
[ "MIT" ]
null
null
null
econotw.py
ppnasser/econotw
ccc3d7fefebdc70b2abfc3e75ba387c22e937f86
[ "MIT" ]
null
null
null
import tweepy from time import sleep from datetime import datetime from keys import * from tqdm import tqdm def play(test=True,i_pages=3, i_hashtag=20, like_pages=False, like_hashtag=False): while True == True: try: econotwbot(test, i_pages, i_hashtag) except Exception a...
34.038462
101
0.54096
import tweepy from time import sleep from datetime import datetime from keys import * from tqdm import tqdm def play(test=True,i_pages=3, i_hashtag=20, like_pages=False, like_hashtag=False): while True == True: try: econotwbot(test, i_pages, i_hashtag) except Exception a...
true
true
790c2ba52deb93b8627cb1893fd19f1d018492af
41,852
py
Python
scripts/gen_vimdoc.py
MDeiml/neovim
502f03fc064d1eb427d214521d5cb9f5425a15b4
[ "Vim" ]
null
null
null
scripts/gen_vimdoc.py
MDeiml/neovim
502f03fc064d1eb427d214521d5cb9f5425a15b4
[ "Vim" ]
null
null
null
scripts/gen_vimdoc.py
MDeiml/neovim
502f03fc064d1eb427d214521d5cb9f5425a15b4
[ "Vim" ]
null
null
null
#!/usr/bin/env python3 """Generates Nvim :help docs from C/Lua docstrings, using Doxygen. Also generates *.mpack files. To inspect the *.mpack structure: :new | put=v:lua.vim.inspect(msgpackparse(readfile('runtime/doc/api.mpack'))) Flow: main extract_from_xml fmt_node_as_vimhelp \ ...
34.474465
87
0.533547
import argparse import os import re import sys import shutil import textwrap import subprocess import collections import msgpack import logging from xml.dom import minidom MIN_PYTHON_VERSION = (3, 6) MIN_DOXYGEN_VERSION = (1, 9, 0) if sys.version_info < MIN_PYTHON_VERSION: print("requires Python {}.{}+".format(...
true
true
790c2c3229b665e0ef3409a0e34586e0d60b9d38
2,637
py
Python
2.1 Weather/opscentretools/plotting.py
met-office-lab/example-notebooks
11bda2174f2c8f5060bb3cb630f99f2629c07346
[ "BSD-3-Clause" ]
1
2020-07-31T21:07:44.000Z
2020-07-31T21:07:44.000Z
2.1 Weather/opscentretools/plotting.py
met-office-lab/example-notebooks
11bda2174f2c8f5060bb3cb630f99f2629c07346
[ "BSD-3-Clause" ]
2
2016-09-12T11:11:17.000Z
2016-10-14T16:23:48.000Z
2.1 Weather/opscentretools/plotting.py
met-office-lab/example-notebooks
11bda2174f2c8f5060bb3cb630f99f2629c07346
[ "BSD-3-Clause" ]
1
2016-09-08T13:53:47.000Z
2016-09-08T13:53:47.000Z
import holoviews as hv import geoviews as gv import cartopy.crs as ccrs import cartopy.feature as cf from holoviews.operation.datashader import regrid from holoviews.streams import FreehandDraw import panel as pn pn.extension() hv.extension('bokeh', logo=False) import sys # Suppress warnings if not sys.warnoptions: ...
35.16
189
0.662874
import holoviews as hv import geoviews as gv import cartopy.crs as ccrs import cartopy.feature as cf from holoviews.operation.datashader import regrid from holoviews.streams import FreehandDraw import panel as pn pn.extension() hv.extension('bokeh', logo=False) import sys if not sys.warnoptions: import warnings ...
true
true
790c2cce405f1d6385db0505044b1080ad3ad2b1
88,542
py
Python
python/avi/migrationtools/netscaler_converter/ns_util.py
thisisshi/sdk
99c52caffeebbfd41f43931fea2b5b1323841892
[ "Apache-2.0" ]
37
2016-03-14T22:27:17.000Z
2022-03-03T05:18:39.000Z
python/avi/migrationtools/netscaler_converter/ns_util.py
thisisshi/sdk
99c52caffeebbfd41f43931fea2b5b1323841892
[ "Apache-2.0" ]
195
2016-03-14T23:47:55.000Z
2021-05-12T11:28:56.000Z
python/avi/migrationtools/netscaler_converter/ns_util.py
thisisshi/sdk
99c52caffeebbfd41f43931fea2b5b1323841892
[ "Apache-2.0" ]
50
2016-03-14T05:52:14.000Z
2022-01-06T06:12:00.000Z
import csv import logging import os import copy import re import random from functools import reduce import ast import pandas import pexpect import avi.migrationtools.netscaler_converter.ns_constants as ns_constants from pkg_resources import parse_version from xlsxwriter import Workbook from openpyxl import load_workb...
45.734504
85
0.509453
import csv import logging import os import copy import re import random from functools import reduce import ast import pandas import pexpect import avi.migrationtools.netscaler_converter.ns_constants as ns_constants from pkg_resources import parse_version from xlsxwriter import Workbook from openpyxl import load_workb...
true
true
790c2dbc7cb02a3723270d55d4a995e8aef41d25
26,211
py
Python
tiled/server/core.py
martindurant/tiled
79eef6fb60964a726c0b43a280c6343b94097640
[ "BSD-3-Clause" ]
null
null
null
tiled/server/core.py
martindurant/tiled
79eef6fb60964a726c0b43a280c6343b94097640
[ "BSD-3-Clause" ]
null
null
null
tiled/server/core.py
martindurant/tiled
79eef6fb60964a726c0b43a280c6343b94097640
[ "BSD-3-Clause" ]
null
null
null
import abc import collections.abc import contextlib import dataclasses import itertools import math import operator import re import sys import time from collections import defaultdict from datetime import datetime, timedelta from functools import lru_cache from hashlib import md5 from typing import Any, Optional impo...
36.556485
132
0.602877
import abc import collections.abc import contextlib import dataclasses import itertools import math import operator import re import sys import time from collections import defaultdict from datetime import datetime, timedelta from functools import lru_cache from hashlib import md5 from typing import Any, Optional impo...
true
true
790c2fa177c9b097d62a35b7ab947d349f89641a
19
py
Python
app/PoziConnect/version.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
app/PoziConnect/version.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
app/PoziConnect/version.py
pozi/PoziConnect
375ca0f5ab3a44cc898b85a12ba54ab1cf0f4f61
[ "MIT" ]
null
null
null
version = '2.9.0'
9.5
18
0.526316
version = '2.9.0'
true
true
790c2ff2c2b998e32008151289a2b5c36e39c393
16,292
py
Python
tutorials/autotvm/tune_relay_mobile_gpu.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
90
2019-01-26T00:38:49.000Z
2022-03-11T23:12:34.000Z
tutorials/autotvm/tune_relay_mobile_gpu.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
91
2019-02-27T00:17:01.000Z
2022-02-21T18:08:21.000Z
tutorials/autotvm/tune_relay_mobile_gpu.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
41
2019-01-28T14:37:03.000Z
2022-03-31T03:58:57.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...
38.790476
100
0.631169
true
true
790c306b71032e576a44a0537655d890cf85245c
397
py
Python
terrascript/data/mrcrilly/awx.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/data/mrcrilly/awx.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/data/mrcrilly/awx.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/data/mrcrilly/awx.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:12:44 UTC) import terrascript class awx_credential(terrascript.Data): pass class awx_credential_azure_key_vault(terrascript.Data): pass class awx_credentials(terrascript.Data): pass __all__ = [ "awx...
17.26087
73
0.753149
import terrascript class awx_credential(terrascript.Data): pass class awx_credential_azure_key_vault(terrascript.Data): pass class awx_credentials(terrascript.Data): pass __all__ = [ "awx_credential", "awx_credential_azure_key_vault", "awx_credentials", ]
true
true
790c31e8227a70c49df392a93c36d1ee7b23e14c
2,632
py
Python
spimdisasm/common/FileSectionType.py
Decompollaborate/py-mips-disasm
1301340130f8cca539d12c486deff3a1037a8787
[ "MIT" ]
6
2021-11-17T21:21:25.000Z
2022-01-28T13:37:44.000Z
spimdisasm/common/FileSectionType.py
Decompollaborate/py-mips-disasm
1301340130f8cca539d12c486deff3a1037a8787
[ "MIT" ]
null
null
null
spimdisasm/common/FileSectionType.py
Decompollaborate/py-mips-disasm
1301340130f8cca539d12c486deff3a1037a8787
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # SPDX-FileCopyrightText: © 2022 Decompollaborate # SPDX-License-Identifier: MIT from __future__ import annotations import enum @enum.unique class FileSectionType(enum.Enum): Unknown = -2 Invalid = -1 Text = 1 Data = 2 Rodata = 3 Bss = 4 Reloc = 5 ...
28.923077
135
0.582067
from __future__ import annotations import enum @enum.unique class FileSectionType(enum.Enum): Unknown = -2 Invalid = -1 Text = 1 Data = 2 Rodata = 3 Bss = 4 Reloc = 5 @staticmethod def fromId(sectionId: int) -> FileSectionType: if sectionId == 1: ...
true
true
790c32855a158da0112d5869bb7c58352e860b86
2,141
py
Python
examples/lift-sub.py
LaPetiteSouris/python-liftbridge
e97f795ae1be8ea871ac032d61464fb91a45973e
[ "Apache-2.0" ]
11
2019-08-20T22:46:26.000Z
2021-05-25T18:41:10.000Z
examples/lift-sub.py
LaPetiteSouris/python-liftbridge
e97f795ae1be8ea871ac032d61464fb91a45973e
[ "Apache-2.0" ]
6
2019-09-07T08:53:33.000Z
2020-07-05T12:27:36.000Z
examples/lift-sub.py
LaPetiteSouris/python-liftbridge
e97f795ae1be8ea871ac032d61464fb91a45973e
[ "Apache-2.0" ]
4
2019-09-01T02:18:31.000Z
2020-07-03T17:05:46.000Z
import argparse import logging from datetime import datetime from python_liftbridge import ErrNoSuchStream from python_liftbridge import ErrStreamExists from python_liftbridge import Lift from python_liftbridge import Stream def parse_arguments(): '''Argument parsing for the script''' parser = argparse.Argum...
23.788889
93
0.554414
import argparse import logging from datetime import datetime from python_liftbridge import ErrNoSuchStream from python_liftbridge import ErrStreamExists from python_liftbridge import Lift from python_liftbridge import Stream def parse_arguments(): parser = argparse.ArgumentParser( description='Liftbridge...
true
true
790c3393108cd9898b7e0ad17e69308a6cc855fd
1,108
py
Python
builder/builder.py
bdastur/builder
e05c013d01c4e82340879289940b3029fc6de266
[ "Apache-2.0" ]
null
null
null
builder/builder.py
bdastur/builder
e05c013d01c4e82340879289940b3029fc6de266
[ "Apache-2.0" ]
null
null
null
builder/builder.py
bdastur/builder
e05c013d01c4e82340879289940b3029fc6de266
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import builderutils.parser as parser import builderutils.renderer as renderer import builderutils.dom as dom @click.group() def cli(): pass @click.command() @click.option("--configfile", type=click.Path(), help="Builder config", required=True) def crea...
25.181818
86
0.723827
import click import builderutils.parser as parser import builderutils.renderer as renderer import builderutils.dom as dom @click.group() def cli(): pass @click.command() @click.option("--configfile", type=click.Path(), help="Builder config", required=True) def create(configfile): print("create command!")...
true
true
790c34315189b20923ce14ee5580100c099a4091
9,984
py
Python
sdk/python/pulumi_okta/group_memberships.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
5
2019-10-29T21:59:22.000Z
2021-11-08T12:00:24.000Z
sdk/python/pulumi_okta/group_memberships.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
109
2020-01-06T10:28:09.000Z
2022-03-25T19:52:40.000Z
sdk/python/pulumi_okta/group_memberships.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-11T16:31:04.000Z
2020-11-24T12:23:17.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
42.485106
441
0.644531
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['GroupMembershipsArgs', 'GroupMemberships'] @pulumi.input_type class GroupMembershipsArgs: def __init__(__self__, *, group_id: pulumi.In...
true
true
790c34351d8a5722887cf5d4aa217305f90b0303
2,915
py
Python
scripts/channel_map.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
1
2020-04-15T01:29:12.000Z
2020-04-15T01:29:12.000Z
scripts/channel_map.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
null
null
null
scripts/channel_map.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
null
null
null
from argparse import ArgumentParser class ChannelMap(): channel_map = { 'master': { 'tfm': 'netcoreapp5.0', 'branch': 'master' }, 'release/3.1.2xx': { 'tfm': 'netcoreapp3.1', 'branch': 'release/3.1.2xx' }, 'release/3.1.1xx': { ...
34.702381
150
0.575643
from argparse import ArgumentParser class ChannelMap(): channel_map = { 'master': { 'tfm': 'netcoreapp5.0', 'branch': 'master' }, 'release/3.1.2xx': { 'tfm': 'netcoreapp3.1', 'branch': 'release/3.1.2xx' }, 'release/3.1.1xx': { ...
true
true
790c351e85dfe8de80f45ed9b33eee6eb2111f60
213
py
Python
setup.py
foundling/filekit
211ae8e99efe35a5a984c78349f85cfa7f42506a
[ "MIT" ]
null
null
null
setup.py
foundling/filekit
211ae8e99efe35a5a984c78349f85cfa7f42506a
[ "MIT" ]
null
null
null
setup.py
foundling/filekit
211ae8e99efe35a5a984c78349f85cfa7f42506a
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='filekit', version='0.1', packages=['filekit'], license='MIT', long_description=open('README.md').read(), long_description_content_type='md' )
19.363636
46
0.661972
from distutils.core import setup setup( name='filekit', version='0.1', packages=['filekit'], license='MIT', long_description=open('README.md').read(), long_description_content_type='md' )
true
true
790c38aa18526ff3a77826fd4a9ebe3cd5a1334c
1,179
py
Python
data_driven_acquisition/migrations/0005_auto_20191029_1531.py
adam-grandt-tts/data-driven-acquisition
2f970a2815f90f591203c02c9099642e4cbd24d8
[ "CC0-1.0" ]
1
2020-02-14T17:36:27.000Z
2020-02-14T17:36:27.000Z
data_driven_acquisition/migrations/0005_auto_20191029_1531.py
adam-grandt-tts/data-driven-acquisition
2f970a2815f90f591203c02c9099642e4cbd24d8
[ "CC0-1.0" ]
20
2020-01-21T15:04:16.000Z
2021-08-05T16:18:06.000Z
data_driven_acquisition/migrations/0005_auto_20191029_1531.py
adam-grandt-tts/data-driven-acquisition
2f970a2815f90f591203c02c9099642e4cbd24d8
[ "CC0-1.0" ]
2
2020-05-10T18:29:54.000Z
2021-03-15T18:12:07.000Z
# Generated by Django 2.2.6 on 2019-10-29 15:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data_driven_acquisition', '0004_acl'), ] operations = [ migrations.AlterModelOptions( name='file', options={'get_lat...
36.84375
257
0.616624
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data_driven_acquisition', '0004_acl'), ] operations = [ migrations.AlterModelOptions( name='file', options={'get_latest_by': 'created_at', 'permissions': (('can_ed...
true
true
790c38ab19cd66c0bd88351a146c434418246fb5
570
py
Python
model/group.py
Docent321/python_traning
eb4b9f6ba9821f6e32dce954c83754d40b8f66c5
[ "Apache-2.0" ]
null
null
null
model/group.py
Docent321/python_traning
eb4b9f6ba9821f6e32dce954c83754d40b8f66c5
[ "Apache-2.0" ]
null
null
null
model/group.py
Docent321/python_traning
eb4b9f6ba9821f6e32dce954c83754d40b8f66c5
[ "Apache-2.0" ]
null
null
null
from sys import maxsize class Group: def __init__(self, name=None, header=None, footer=None, id=None): self.name = name self.header = header self.footer = footer self.id = id def __repr__(self): return"%s:%s:%s:%s" % (self.id, self.name, self.header, self.footer) ...
23.75
103
0.582456
from sys import maxsize class Group: def __init__(self, name=None, header=None, footer=None, id=None): self.name = name self.header = header self.footer = footer self.id = id def __repr__(self): return"%s:%s:%s:%s" % (self.id, self.name, self.header, self.footer) ...
true
true
790c38c261dbd3597bbec5dac7ffcb4c4d124539
2,419
py
Python
examples/python/helloworld/greeter_client.py
DMCDavi/grpc-stateful-less
d46da0352db3b83287b09d94b354b3a80571371b
[ "BSD-3-Clause" ]
null
null
null
examples/python/helloworld/greeter_client.py
DMCDavi/grpc-stateful-less
d46da0352db3b83287b09d94b354b3a80571371b
[ "BSD-3-Clause" ]
null
null
null
examples/python/helloworld/greeter_client.py
DMCDavi/grpc-stateful-less
d46da0352db3b83287b09d94b354b3a80571371b
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
35.057971
98
0.678379
from __future__ import print_function import logging from urllib import response from vinte_um import Jogador, VinteUm import grpc import helloworld_pb2 import helloworld_pb2_grpc import time import redis def createLoginForm(stub): username = input("Digite seu login: ") password = input(...
true
true
790c391f9976088578bd7d0802480606dc8141ea
14,998
py
Python
lib/third_party/dns/rdata.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
lib/third_party/dns/rdata.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/third_party/dns/rdata.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
32.675381
78
0.62295
from io import BytesIO import base64 import binascii import dns.exception import dns.name import dns.rdataclass import dns.rdatatype import dns.tokenizer import dns.wiredata from ._compat import xrange, string_types, text_type _hex_chunksize = 32 def _hexify(data, chunksize=_hex_chunksize): lin...
true
true
790c3966592b8849b5534e7e6be124a71cf4958c
1,558
py
Python
benchmark/benchmark_struct.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
491
2018-09-26T14:04:25.000Z
2022-03-31T10:34:43.000Z
benchmark/benchmark_struct.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
167
2018-09-26T15:56:53.000Z
2022-03-29T10:16:47.000Z
benchmark/benchmark_struct.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
82
2018-09-26T12:32:44.000Z
2022-03-09T08:57:20.000Z
import time import thriftpy2 from thriftpy2.utils import serialize, deserialize from thriftpy2.protocol import TBinaryProtocolFactory, TCyBinaryProtocolFactory addressbook = thriftpy2.load("addressbook.thrift") def make_addressbook(): phone1 = addressbook.PhoneNumber() phone1.type = addressbook.PhoneType.MO...
25.966667
79
0.689345
import time import thriftpy2 from thriftpy2.utils import serialize, deserialize from thriftpy2.protocol import TBinaryProtocolFactory, TCyBinaryProtocolFactory addressbook = thriftpy2.load("addressbook.thrift") def make_addressbook(): phone1 = addressbook.PhoneNumber() phone1.type = addressbook.PhoneType.MO...
true
true
790c3a2d91e74039c115f557f9aa9936d7ff5e74
2,623
py
Python
dct_image_transform/reflection.py
kanpurin/dctimagetransform
b5950945922e4eafc17bb88fd28dfe5167ca3529
[ "MIT" ]
null
null
null
dct_image_transform/reflection.py
kanpurin/dctimagetransform
b5950945922e4eafc17bb88fd28dfe5167ca3529
[ "MIT" ]
null
null
null
dct_image_transform/reflection.py
kanpurin/dctimagetransform
b5950945922e4eafc17bb88fd28dfe5167ca3529
[ "MIT" ]
null
null
null
import numpy as np from dct_image_transform.dct import dct2 def reflection(image,axis=0): ''' 8x8のブロックごとに離散コサイン変換された画像(以下DCT画像)を鏡像変換する. Parameters ---------- image:幅と高さが8の倍数である画像を表す2次元配列. 8の倍数でない場合の動作は未定義. axis:変換する軸. defalutは`axis=0` Returns ------- `image`を鏡像変換したDCT画像を表す2次元...
40.984375
111
0.544034
import numpy as np from dct_image_transform.dct import dct2 def reflection(image,axis=0): R = np.zeros((8,8),dtype=np.float) for i in range(8): R[i,7-i] = 1 R = dct2(R) if axis == 0: return np.vstack(list(map(lambda m:np.dot(R,m),np.flip(np.vsplit(image,range(8,image.shape[1],8)),0)))) ...
true
true
790c3ae8e8bf27683b6097baed91201afc4e0e47
2,324
py
Python
libs/bahan_ajar/bahan_ajar.py
hexatester/ut-telegram-bot
20f6f063726913cb6d21e42538103e3498b929a7
[ "MIT" ]
3
2020-09-15T23:10:32.000Z
2021-01-23T18:17:34.000Z
libs/bahan_ajar/bahan_ajar.py
hexatester/ut-telegram-bot
20f6f063726913cb6d21e42538103e3498b929a7
[ "MIT" ]
null
null
null
libs/bahan_ajar/bahan_ajar.py
hexatester/ut-telegram-bot
20f6f063726913cb6d21e42538103e3498b929a7
[ "MIT" ]
1
2020-08-26T16:02:03.000Z
2020-08-26T16:02:03.000Z
import requests from logging import getLogger from bs4 import BeautifulSoup from requests import Session from typing import List from urllib.parse import quote_plus from .book import Book from ..base import HEADERS class BahanAjar: def __init__(self, email: str, password: str, login: bool = True): self.se...
35.212121
98
0.609725
import requests from logging import getLogger from bs4 import BeautifulSoup from requests import Session from typing import List from urllib.parse import quote_plus from .book import Book from ..base import HEADERS class BahanAjar: def __init__(self, email: str, password: str, login: bool = True): self.se...
true
true
790c3b46e34aae8a0d1f2c0f61445f788fda2fe1
405
py
Python
mysite/ViralScreener/migrations/0009_auto_20200326_0339.py
memtech3/Viral-Screener
1940a7e097a9f5b7eb78f001c0a9623b398c020e
[ "MIT" ]
1
2020-03-25T22:23:35.000Z
2020-03-25T22:23:35.000Z
mysite/ViralScreener/migrations/0009_auto_20200326_0339.py
memtech3/Viral-Screener
1940a7e097a9f5b7eb78f001c0a9623b398c020e
[ "MIT" ]
7
2020-03-23T04:51:55.000Z
2020-03-25T22:23:14.000Z
mysite/ViralScreener/migrations/0009_auto_20200326_0339.py
memtech3/Viral-Screener
1940a7e097a9f5b7eb78f001c0a9623b398c020e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-03-26 03:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ViralScreener', '0008_auto_20200326_0338'), ] operations = [ migrations.AlterField( model_name='employeescreeningresponses', ...
21.315789
53
0.619753
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ViralScreener', '0008_auto_20200326_0338'), ] operations = [ migrations.AlterField( model_name='employeescreeningresponses', name='DateTime', field=mod...
true
true
790c3ba506bf01e517ab768e5a2f46125b512fb2
3,384
py
Python
utils/plot.py
donghwijung/LoRCoN-LO
37d4f97d2ae01a2dca1d086579ca3efaab77553b
[ "MIT" ]
3
2022-03-14T07:21:41.000Z
2022-03-25T11:21:23.000Z
utils/plot.py
donghwijung/LoRCoN-LO
37d4f97d2ae01a2dca1d086579ca3efaab77553b
[ "MIT" ]
null
null
null
utils/plot.py
donghwijung/LoRCoN-LO
37d4f97d2ae01a2dca1d086579ca3efaab77553b
[ "MIT" ]
1
2022-03-31T05:34:25.000Z
2022-03-31T05:34:25.000Z
import os import numpy as np import matplotlib.pyplot as plt # import sys, os # sys.path.append(os.path.join(os.path.dirname(__file__), 'utils')) import process_data import common def plot_gt(Y_origin_data, pose_folder, preprocessed_folder, data_seqs, seq_sizes, dim="2d", save_graph=True, dataset="KITTI"): star...
44.526316
134
0.618794
import os import numpy as np import matplotlib.pyplot as plt import process_data import common def plot_gt(Y_origin_data, pose_folder, preprocessed_folder, data_seqs, seq_sizes, dim="2d", save_graph=True, dataset="KITTI"): start_idx = 0 end_idx = 0 additional_row = np.array([0, 0, 0, 1], dtype=np.floa...
true
true
790c3c6a22d26170d1307906c5f02c3b1ad1d748
4,145
py
Python
src/build_tools/change_reference_mac.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
null
null
null
src/build_tools/change_reference_mac.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2021-06-30T14:59:51.000Z
2021-06-30T15:31:56.000Z
src/build_tools/change_reference_mac.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2022-03-25T09:01:39.000Z
2022-03-25T09:01:39.000Z
# -*- coding: utf-8 -*- # Copyright 2010-2020, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
35.732759
79
0.723281
__author__ = "horo" import optparse import os from util import PrintErrorAndExit from util import RunOrDie def ParseOption(): parser = optparse.OptionParser() parser.add_option('--qtdir', dest='qtdir') parser.add_option('--target', dest='target') (opts, _) = parser.parse_args...
true
true
790c3d645e7c8342081080e3315a5ea07ed93f83
543
py
Python
homie/node/property/property_enum.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
4
2019-06-10T01:18:06.000Z
2021-12-28T03:00:48.000Z
homie/node/property/property_enum.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
9
2019-05-02T20:03:42.000Z
2020-01-15T03:41:38.000Z
homie/node/property/property_enum.py
dresber/HomieV3
05115f59f4e78230d09ca4e9bd7a12589a638a81
[ "MIT" ]
7
2019-05-05T15:37:49.000Z
2020-04-02T10:33:50.000Z
import logging from .property_base import Property_Base logger = logging.getLogger(__name__) class Property_Enum(Property_Base): def __init__(self, node, id, name, settable=True, retained=True, qos=1, unit=None, data_type='enum', data_format=None, value=None, set_value=None): assert(data_format) ...
31.941176
151
0.734807
import logging from .property_base import Property_Base logger = logging.getLogger(__name__) class Property_Enum(Property_Base): def __init__(self, node, id, name, settable=True, retained=True, qos=1, unit=None, data_type='enum', data_format=None, value=None, set_value=None): assert(data_format) ...
true
true
790c3da2c595f5dff7ef6735b4ea35b53ba4e72a
13,629
py
Python
rcnn/symbol/symbol_resnet_modify.py
angelfish91/Faster-RCNN-MXnet011
211a8f03647935b9680800a92009c7d966a60b72
[ "Apache-2.0" ]
4
2018-02-08T21:22:11.000Z
2020-06-23T02:51:59.000Z
rcnn/symbol/symbol_resnet_modify.py
angelfish91/Faster-RCNN-MXnet011
211a8f03647935b9680800a92009c7d966a60b72
[ "Apache-2.0" ]
null
null
null
rcnn/symbol/symbol_resnet_modify.py
angelfish91/Faster-RCNN-MXnet011
211a8f03647935b9680800a92009c7d966a60b72
[ "Apache-2.0" ]
2
2018-02-02T10:34:00.000Z
2019-12-19T02:44:05.000Z
import mxnet as mx import proposal import proposal_target from rcnn.config import config import focal_loss eps = 2e-5 use_global_stats = True workspace = 512 res_deps = {'50': (3, 4, 6, 3), '101': (3, 4, 23, 3), '152': (3, 8, 36, 3), '200': (3, 24, 36, 3)} units = res_deps['101'] filter_list = [256, 512, 1024, 2048] ...
59
133
0.696163
import mxnet as mx import proposal import proposal_target from rcnn.config import config import focal_loss eps = 2e-5 use_global_stats = True workspace = 512 res_deps = {'50': (3, 4, 6, 3), '101': (3, 4, 23, 3), '152': (3, 8, 36, 3), '200': (3, 24, 36, 3)} units = res_deps['101'] filter_list = [256, 512, 1024, 2048] ...
true
true
790c3ee492fc6d12bb41d69658d0f8e53245b9a4
6,930
py
Python
cryomem/cmtools/lib/old/sql_svjj_old2.py
bebaek/cryomem
088fba2568d10451adda51a068c15c8c2a73d9ce
[ "MIT" ]
1
2018-09-16T12:29:04.000Z
2018-09-16T12:29:04.000Z
cryomem/cmtools/lib/old/sql_svjj_old2.py
bebaek/cryomem
088fba2568d10451adda51a068c15c8c2a73d9ce
[ "MIT" ]
null
null
null
cryomem/cmtools/lib/old/sql_svjj_old2.py
bebaek/cryomem
088fba2568d10451adda51a068c15c8c2a73d9ce
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 """ Manage database of SV JJ device fab/measurement parameters File format: SQLite Tables: barrier (dep structure), shape, josephson (measured params), trend (fitted Jc, RnA, IcRn) BB, 2015 """ print('hello') import sqlite3 # Restrict t...
33.970588
80
0.540404
print('hello') import sqlite3 def scrub(table_name): return ''.join( chr for chr in table_name if chr.isalnum() or chr=='_' ) def assignform(collist): s = ' ' for col in collist: s += col + '=?,' return s.rstrip(',') class SVJJDB(): def __init__(self, filename='svjj.db'): ...
true
true
790c3f5ad6dc4ed22ca30ff6fbd0ee4526b37abe
2,796
py
Python
tests/st/ops/ascend/vector/test_expm1_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/st/ops/ascend/vector/test_expm1_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/st/ops/ascend/vector/test_expm1_001.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2019 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 a...
32.511628
89
0.546853
import os import pytest from tests.common.base import TestBase from tests.common.test_run.ascend.expm1_run import expm1_run
true
true
790c3fa145d078876a1db5d5bd7a2995aba1c169
1,527
py
Python
GLADalertTRASE/update_data/functions.py
scpyork/GladAlert
6b8622ee9ff5d53186e2d7225b856a8855fe1da8
[ "0BSD" ]
null
null
null
GLADalertTRASE/update_data/functions.py
scpyork/GladAlert
6b8622ee9ff5d53186e2d7225b856a8855fe1da8
[ "0BSD" ]
2
2021-01-28T20:05:32.000Z
2022-03-25T18:51:24.000Z
GLADalertTRASE/update_data/functions.py
scpyork/GladAlert
6b8622ee9ff5d53186e2d7225b856a8855fe1da8
[ "0BSD" ]
null
null
null
from new_alerts import * from PIL import Image # $ pip install pillow from scipy import sparse import numpy as np import re Image.MAX_IMAGE_PIXELS = None def download(keep,tempdir): #print keep #class rt:pass name = keep.split('/')[-1] area = re.findall(r'_(\d+[NESW\b])',name) # current file posi...
29.941176
120
0.607728
from new_alerts import * from PIL import Image from scipy import sparse import numpy as np import re Image.MAX_IMAGE_PIXELS = None def download(keep,tempdir): name = keep.split('/')[-1] area = re.findall(r'_(\d+[NESW\b])',name) position = map(direction, area) group = '|'.join((st...
true
true
790c40c901cad2eed429ebb86f5df573ea107ba3
8,916
py
Python
city_scrapers/spiders/chi_school_community_action_council.py
jim/documenters-aggregator
c619b5cb3c6eb093f60662749cd76717b182c40c
[ "MIT" ]
null
null
null
city_scrapers/spiders/chi_school_community_action_council.py
jim/documenters-aggregator
c619b5cb3c6eb093f60662749cd76717b182c40c
[ "MIT" ]
null
null
null
city_scrapers/spiders/chi_school_community_action_council.py
jim/documenters-aggregator
c619b5cb3c6eb093f60662749cd76717b182c40c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import scrapy from city_scrapers.spider import Spider from datetime import datetime, timedelta from dateutil.parser import parse as dateparse import re class Chi_school_community_action_councilSpider(Spider): name = 'chi_school_community_action_council' long_name = 'Chicago Public Schoo...
41.277778
120
0.549237
import scrapy from city_scrapers.spider import Spider from datetime import datetime, timedelta from dateutil.parser import parse as dateparse import re class Chi_school_community_action_councilSpider(Spider): name = 'chi_school_community_action_council' long_name = 'Chicago Public Schools Community Action Cou...
true
true
790c4119de50c7acd948ff5ea64262bcdd31709e
742
py
Python
Lab01/lab01_03.py
micu01/ProgAlgo
fae21f563656c0d2b9d378db67e22f907486170f
[ "MIT" ]
3
2020-01-02T10:31:42.000Z
2020-01-16T10:49:36.000Z
Lab01/lab01_03.py
micu01/ProgAlgo
fae21f563656c0d2b9d378db67e22f907486170f
[ "MIT" ]
null
null
null
Lab01/lab01_03.py
micu01/ProgAlgo
fae21f563656c0d2b9d378db67e22f907486170f
[ "MIT" ]
null
null
null
# Un meșter trebuie să paveze întreaga pardoseală a unei bucătării cu formă # dreptunghiulară de dimensiune L_1×L_2 centimetri, cu plăci de gresie # pătrate, toate cu aceeași dimensiune. Știind că meșterul nu vrea să taie nici o # placă de gresie și vrea să folosească un număr minim de plăci, să se # determine dimensiu...
32.26087
81
0.708895
L_1 = int(input('L_1: ')) L_2 = int(input('L_2: ')) aria = L_1*L_2 while L_1 != L_2: if L_1 > L_2: L_1 -= L_2 else: L_2 -= L_1 dim = L_1 nr = aria/dim**2 print(dim, nr)
true
true
790c423038cefcdab34e20895a1e697946a8c00c
47,403
py
Python
python/words.py
flapperleenie/thevocals
8f7f38c1dd1b39a4b811c26d5487fe4d6430cd28
[ "MIT" ]
null
null
null
python/words.py
flapperleenie/thevocals
8f7f38c1dd1b39a4b811c26d5487fe4d6430cd28
[ "MIT" ]
null
null
null
python/words.py
flapperleenie/thevocals
8f7f38c1dd1b39a4b811c26d5487fe4d6430cd28
[ "MIT" ]
null
null
null
parts = ["aardvark", "abacus", "abbey", "abdomen", "ability", "abolishment", "abroad", "accelerant", "accelerator", "accident", "accompanist", "accordion", "account", "accountant", "achieve", "achiever", "acid", "acknowledgment", "acoustic", "acoustics", "acrylic", "act", "action", "active", "activity", "actor", "actre...
15,801
47,391
0.625973
parts = ["aardvark", "abacus", "abbey", "abdomen", "ability", "abolishment", "abroad", "accelerant", "accelerator", "accident", "accompanist", "accordion", "account", "accountant", "achieve", "achiever", "acid", "acknowledgment", "acoustic", "acoustics", "acrylic", "act", "action", "active", "activity", "actor", "actre...
true
true
790c42a7e25133236c3a70d8809f641e2b627c54
4,973
py
Python
eljur.py
yakuri354/EljurCLI
3ebf47c28b4c81a324f15d59bf5a6c49bc259dd6
[ "MIT" ]
null
null
null
eljur.py
yakuri354/EljurCLI
3ebf47c28b4c81a324f15d59bf5a6c49bc259dd6
[ "MIT" ]
null
null
null
eljur.py
yakuri354/EljurCLI
3ebf47c28b4c81a324f15d59bf5a6c49bc259dd6
[ "MIT" ]
null
null
null
from colored import fg, stylize, attr import requests as rq from yaspin import yaspin version = "0.4beta" greeting = stylize(""" ╭────────────────────────────────────────────────────────────────╮ │ Добро пожаловать в │ │ _____ _ _ ____ _...
32.503268
103
0.48703
from colored import fg, stylize, attr import requests as rq from yaspin import yaspin version = "0.4beta" greeting = stylize(""" ╭────────────────────────────────────────────────────────────────╮ │ Добро пожаловать в │ │ _____ _ _ ____ _...
true
true
790c43a7702a86adff91d0b3810f3c9d5a0a635d
3,313
py
Python
ga4stpg/edgeset/mutate.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
null
null
null
ga4stpg/edgeset/mutate.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
5
2021-01-26T17:28:32.000Z
2021-03-14T13:46:48.000Z
ga4stpg/edgeset/mutate.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
1
2021-01-25T16:35:59.000Z
2021-01-25T16:35:59.000Z
from random import choice, randint, sample, shuffle from ga4stpg import graph from ga4stpg.edgeset import EdgeSet from ga4stpg.graph import UGraph from ga4stpg.graph.disjointsets import DisjointSets from ga4stpg.graph.priorityqueue import PriorityQueue class MutatitionReplaceByLowerEdge: def __init__(s...
32.480392
115
0.55086
from random import choice, randint, sample, shuffle from ga4stpg import graph from ga4stpg.edgeset import EdgeSet from ga4stpg.graph import UGraph from ga4stpg.graph.disjointsets import DisjointSets from ga4stpg.graph.priorityqueue import PriorityQueue class MutatitionReplaceByLowerEdge: def __init__(s...
true
true
790c457d923615e78d6f99e149e0ed18ab4b0fed
1,782
py
Python
setup.py
scotthavens/pysnobal
9cff1e6cb2f1da4240132af4e1d2f5740092d2ef
[ "CC0-1.0" ]
1
2022-01-26T16:47:44.000Z
2022-01-26T16:47:44.000Z
setup.py
scotthavens/pysnobal
9cff1e6cb2f1da4240132af4e1d2f5740092d2ef
[ "CC0-1.0" ]
null
null
null
setup.py
scotthavens/pysnobal
9cff1e6cb2f1da4240132af4e1d2f5740092d2ef
[ "CC0-1.0" ]
1
2022-02-08T22:31:27.000Z
2022-02-08T22:31:27.000Z
#!/usr/bin/env python """The setup script.""" from setuptools import find_packages, setup with open('README.md') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() with open('requirements.txt') as requirements_file: requirements = require...
28.741935
74
0.645903
from setuptools import find_packages, setup with open('README.md') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() with open('requirements.txt') as requirements_file: requirements = requirements_file.read() setup_requirements = ['set...
true
true
790c464155b4c53e05e220db0e61d7c6e7d07ff6
1,081
py
Python
08-def-type-hints/charindex.py
hdcpereira/example-code-2e
ade7558007f149e5ab7465dd9618d432f169eb9f
[ "MIT" ]
null
null
null
08-def-type-hints/charindex.py
hdcpereira/example-code-2e
ade7558007f149e5ab7465dd9618d432f169eb9f
[ "MIT" ]
null
null
null
08-def-type-hints/charindex.py
hdcpereira/example-code-2e
ade7558007f149e5ab7465dd9618d432f169eb9f
[ "MIT" ]
null
null
null
""" ``name_index`` builds an inverted index mapping words to sets of Unicode characters which contain that word in their names. For example:: >>> index = name_index(32, 65) >>> sorted(index['SIGN']) ['#', '$', '%', '+', '<', '=', '>'] >>> sorted(index['DIGIT']) ['0', '1', '2', '3', '4', '5', '6', '...
30.027778
77
0.572618
import sys import re import unicodedata from typing import Dict, Set, Iterator RE_WORD = re.compile('\w+') STOP_CODE = sys.maxunicode + 1 def tokenize(text: str) -> Iterator[str]: for match in RE_WORD.finditer(text): yield match.group().upper() def name_index(start: int = 32, end: int = STOP_CODE) ->...
true
true
790c49e7e2bd1c9c458bd29b205c837703810620
89
py
Python
mini-scripts/Python_Datetime_day_number_of_year.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
5
2021-06-02T23:44:25.000Z
2021-12-27T16:21:57.000Z
mini-scripts/Python_Datetime_day_number_of_year.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
22
2021-05-31T01:33:25.000Z
2021-10-18T18:32:39.000Z
mini-scripts/Python_Datetime_day_number_of_year.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
3
2021-06-19T03:37:47.000Z
2021-08-31T00:49:51.000Z
import datetime x = datetime.datetime.now() print(x.strftime("%j")) # Author: Bryan G
12.714286
27
0.685393
import datetime x = datetime.datetime.now() print(x.strftime("%j"))
true
true
790c4a2dd6f4a1b8d8a6ad5c61ac80eebeaab8a8
63
py
Python
wunderkafka/producers/__init__.py
severstal-digital/wunderkafka
8c56fa4559a8576af7f005fd916bf97127576278
[ "Apache-2.0" ]
null
null
null
wunderkafka/producers/__init__.py
severstal-digital/wunderkafka
8c56fa4559a8576af7f005fd916bf97127576278
[ "Apache-2.0" ]
null
null
null
wunderkafka/producers/__init__.py
severstal-digital/wunderkafka
8c56fa4559a8576af7f005fd916bf97127576278
[ "Apache-2.0" ]
null
null
null
"""This module contains wunderkafka producer's boilerplate."""
31.5
62
0.777778
true
true
790c4c9fb5edb13bf70de321a0f4fc05978d80e0
13,229
py
Python
test/test_process.py
rockyplum/vampy-host
a410d680be2c15d76e31488db789ed30e6f34910
[ "BSD-4-Clause-UC" ]
16
2016-11-19T07:24:54.000Z
2021-07-09T23:30:48.000Z
test/test_process.py
rockyplum/vampy-host
a410d680be2c15d76e31488db789ed30e6f34910
[ "BSD-4-Clause-UC" ]
6
2017-04-05T12:00:38.000Z
2022-01-13T17:51:34.000Z
test/test_process.py
rockyplum/vampy-host
a410d680be2c15d76e31488db789ed30e6f34910
[ "BSD-4-Clause-UC" ]
1
2017-04-03T16:33:51.000Z
2017-04-03T16:33:51.000Z
import vamp import numpy as np import vamp.frames as fr plugin_key = "vamp-test-plugin:vamp-test-plugin" plugin_key_freq = "vamp-test-plugin:vamp-test-plugin-freq" rate = 44100 # Throughout this file we have the assumption that the plugin gets run with a # blocksize of 1024, and with a step of 1024 for the time-dom...
43.516447
147
0.642452
import vamp import numpy as np import vamp.frames as fr plugin_key = "vamp-test-plugin:vamp-test-plugin" plugin_key_freq = "vamp-test-plugin:vamp-test-plugin-freq" rate = 44100 blocksize = 1024 def input_data(n): return np.arange(n) + 1 def test_process_n(): buf = input_data(blocksize) ...
true
true