hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f5fdac215b33b8a5db3fb8bc7707fafa9ad5d6
4,483
py
Python
chatroom/chatroom/settings.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
null
null
null
chatroom/chatroom/settings.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
14
2020-02-12T00:13:15.000Z
2022-03-11T23:18:02.000Z
chatroom/chatroom/settings.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
null
null
null
""" Django settings for chatroom project. Generated by 'django-admin startproject' using Django 2.0. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os imp...
24.497268
91
0.691055
import os import datetime import dj_database_url BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'he(=143j@%y%_e_s!z*-^4q526-^n&5dzqn2ofkx#ian_a@i5@' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contr...
true
true
08f5ff2d66ef0bb7901988b6f1d1402edd37fe82
343
py
Python
stubs/micropython-esp8266-1_10/struct.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
38
2020-10-18T21:59:44.000Z
2022-03-17T03:03:28.000Z
stubs/micropython-esp8266-1_10/struct.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
176
2020-10-18T14:31:03.000Z
2022-03-30T23:22:39.000Z
stubs/micropython-esp8266-1_10/struct.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
6
2020-12-28T21:11:12.000Z
2022-02-06T04:07:50.000Z
""" Module: 'struct' on esp8266 v1.10 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.10-8-g8b7039d7d on 2019-01-26', machine='ESP module with ESP8266') # Stubber: 1.1.0 def calcsize(): pass def pack(): pass def pack_into(): pass def unpack(): pass def un...
16.333333
155
0.638484
def calcsize(): pass def pack(): pass def pack_into(): pass def unpack(): pass def unpack_from(): pass
true
true
08f5ffb3e8a5ef6c040d6e32c32a7c4449738eee
10,140
py
Python
userbot/modules/afk.py
ahmadmaulanaaa/XBot-Remix
d8ae9abc6945fe3e201ab9836507b6ee140e5cf5
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/afk.py
ahmadmaulanaaa/XBot-Remix
d8ae9abc6945fe3e201ab9836507b6ee140e5cf5
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/afk.py
ahmadmaulanaaa/XBot-Remix
d8ae9abc6945fe3e201ab9836507b6ee140e5cf5
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
""" Userbot module which contains afk-related commands """ from datetime import datetime import time from random import choice, randint from telethon.events import StopPropagation from telethon.tl.functions.account import UpdateProfileRequest from userbot import ( # noqa pylint: disable=unused-import isort:skip ...
37.279412
116
0.550986
from datetime import datetime import time from random import choice, randint from telethon.events import StopPropagation from telethon.tl.functions.account import UpdateProfileRequest from userbot import ( AFKREASON, BOTLOG, BOTLOG_CHATID, CMD_HELP, COUNT_MSG, ISAFK, PM_AUTO_BAN, USE...
true
true
08f5ffb48fe478da426c6499acd9c48e7b682047
10,437
py
Python
psm/algorithms/psm.py
etpr/sequential-manifold-planning
a5f05d04c9ab954f39f0e8eecb3e90781564ffaa
[ "MIT" ]
9
2021-02-01T16:53:05.000Z
2022-03-21T12:59:48.000Z
psm/algorithms/psm.py
etpr/sequential-manifold-planning
a5f05d04c9ab954f39f0e8eecb3e90781564ffaa
[ "MIT" ]
2
2021-02-01T16:58:15.000Z
2021-09-03T01:22:27.000Z
psm/algorithms/psm.py
etpr/sequential-manifold-planning
a5f05d04c9ab954f39f0e8eecb3e90781564ffaa
[ "MIT" ]
2
2022-01-23T01:10:57.000Z
2022-03-23T07:27:14.000Z
import numpy as np from scipy.linalg import null_space from math import ceil import tqdm from psm.tasks import Task from psm.tree import Tree from psm.util import unit_ball_measure, is_on_manifold, get_volume, Projection from psm.manifolds import ManifoldStack, Manifold class PSM: def __init__(self, ...
40.453488
129
0.565871
import numpy as np from scipy.linalg import null_space from math import ceil import tqdm from psm.tasks import Task from psm.tree import Tree from psm.util import unit_ball_measure, is_on_manifold, get_volume, Projection from psm.manifolds import ManifoldStack, Manifold class PSM: def __init__(self, ...
true
true
08f5ffd85e94a858073d07fd3c252b4e4371cc71
7,779
py
Python
documentor.py
bmhenry/gracefuldocs
4f13bfcc2d8827eca1f152a3a1b02e6eb2873dd9
[ "MIT" ]
null
null
null
documentor.py
bmhenry/gracefuldocs
4f13bfcc2d8827eca1f152a3a1b02e6eb2873dd9
[ "MIT" ]
null
null
null
documentor.py
bmhenry/gracefuldocs
4f13bfcc2d8827eca1f152a3a1b02e6eb2873dd9
[ "MIT" ]
null
null
null
""" Documents a module given the module name as an input. Utilizes the Inspector function to get the documentation for the module, then produces a static HTML site. """ import code import logging import os import re import shutil import sys import webbrowser import inspector import ghtml # TODO: # copyright notice ...
27.010417
147
0.689806
import code import logging import os import re import shutil import sys import webbrowser import inspector import ghtml class Generator: def __init__(self, mainpath): mod_info = inspector.Inspector(mainpath) data = mod_info.module_info pages = None self.log = logging.getLogger("GracefulDocs") if d...
true
true
08f601c27d779bf278619ca0f7201ff13eeff5c1
14,080
py
Python
Experimentations/exp_astardjikstra.py
kaustavmu/r2auto_nav
20a1a819e03827c3c9645dcacf2253527e301978
[ "Apache-2.0" ]
2
2021-12-07T05:21:25.000Z
2021-12-07T05:22:01.000Z
Experimentations/exp_astardjikstra.py
kaustavmu/r2auto_nav
20a1a819e03827c3c9645dcacf2253527e301978
[ "Apache-2.0" ]
null
null
null
Experimentations/exp_astardjikstra.py
kaustavmu/r2auto_nav
20a1a819e03827c3c9645dcacf2253527e301978
[ "Apache-2.0" ]
null
null
null
import heapq class Lily: def __init__(self, parent=None, position=None): self.parent = parent self.position = position self.g = 0 self.h = 0 self.f = 0 def __eq__(self, other): return self.position == other.position def __repr__(self): return f...
31.569507
148
0.543537
import heapq class Lily: def __init__(self, parent=None, position=None): self.parent = parent self.position = position self.g = 0 self.h = 0 self.f = 0 def __eq__(self, other): return self.position == other.position def __repr__(self): return f...
true
true
08f60218465e83fed2240063891cd77c13d71703
102,913
py
Python
tuf/client/updater.py
Acidburn0zzz/tuf
844348e4901684d3af437030b132b2cd96178426
[ "Apache-2.0", "MIT" ]
1
2017-10-31T21:57:58.000Z
2017-10-31T21:57:58.000Z
tuf/client/updater.py
Acidburn0zzz/tuf
844348e4901684d3af437030b132b2cd96178426
[ "Apache-2.0", "MIT" ]
null
null
null
tuf/client/updater.py
Acidburn0zzz/tuf
844348e4901684d3af437030b132b2cd96178426
[ "Apache-2.0", "MIT" ]
null
null
null
""" <Program Name> updater.py <Author> Geremy Condra Vladimir Diaz <vladimir.v.diaz@gmail.com> <Started> July 2012. Based on a previous version of this module. (VLAD) <Copyright> See LICENSE for licensing information. <Purpose> 'updater.py' is intended to be the only TUF module that software update s...
37.477422
99
0.689641
from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import errno import logging import os import shutil import time import random import fnmatch import tuf import tuf.download import tuf.formats import tuf.settings impor...
true
true
08f60420387cd1b70db58ec2fbc362ff53c5393a
2,733
py
Python
tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Get Status API for Events data model. Copyright (c) 2019 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, in...
32.535714
78
0.592755
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from dnacentersdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorF9Bd99C74Bba8832(object): def __init__(self): super(JSONSchemaV...
true
true
08f6059f425f22ad38dc82b095c37fcda8ccc330
3,327
py
Python
dl.py
onoira/instawow-installer
a12e95963935e8f7a3754517aeb39bb0f238586b
[ "MIT" ]
null
null
null
dl.py
onoira/instawow-installer
a12e95963935e8f7a3754517aeb39bb0f238586b
[ "MIT" ]
null
null
null
dl.py
onoira/instawow-installer
a12e95963935e8f7a3754517aeb39bb0f238586b
[ "MIT" ]
null
null
null
from __future__ import annotations import json import os import os.path as path import re import shutil import zipfile from configparser import ConfigParser from glob import glob import requests _RE_NAME_GUI = re.compile( r'\b\binstawow-desktop.+\.exe\b', flags=re.IGNORECASE ) _RE_NAME_CLI =...
25.592308
87
0.593928
from __future__ import annotations import json import os import os.path as path import re import shutil import zipfile from configparser import ConfigParser from glob import glob import requests _RE_NAME_GUI = re.compile( r'\b\binstawow-desktop.+\.exe\b', flags=re.IGNORECASE ) _RE_NAME_CLI =...
true
true
08f606677edbb15834b40b769579f118f02b0979
6,807
py
Python
selfdrive/car/car_helpers.py
agegold/OPKR080Hoya
17434ef0c2a2dd8463afbc2ac38bc7b4b66dcfe6
[ "MIT" ]
null
null
null
selfdrive/car/car_helpers.py
agegold/OPKR080Hoya
17434ef0c2a2dd8463afbc2ac38bc7b4b66dcfe6
[ "MIT" ]
null
null
null
selfdrive/car/car_helpers.py
agegold/OPKR080Hoya
17434ef0c2a2dd8463afbc2ac38bc7b4b66dcfe6
[ "MIT" ]
null
null
null
import os from common.params import Params from common.basedir import BASEDIR from selfdrive.version import comma_remote, tested_branch from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars from selfdrive.car.vin import get_vin, VIN_UNKNOWN from selfdrive.car.fw_versions import get_fw_versi...
36.015873
136
0.712796
import os from common.params import Params from common.basedir import BASEDIR from selfdrive.version import comma_remote, tested_branch from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars from selfdrive.car.vin import get_vin, VIN_UNKNOWN from selfdrive.car.fw_versions import get_fw_versi...
true
true
08f609d580bee769fc7a6405ccdc4397c0c037e5
5,037
py
Python
gammapy/data/pointing.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
gammapy/data/pointing.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
gammapy/data/pointing.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from scipy.interpolate import interp1d from astropy.version import version as astropy_version from astropy.utils import lazyproperty from astropy.units import Quantity from astropy.table import Table from astropy.coordinates import SkyCoord, AltAz, Cartesi...
33.58
88
0.60671
from scipy.interpolate import interp1d from astropy.version import version as astropy_version from astropy.utils import lazyproperty from astropy.units import Quantity from astropy.table import Table from astropy.coordinates import SkyCoord, AltAz, CartesianRepresentation from ..utils.scripts import make_path from ..ut...
true
true
08f60a335700ffd5e05da8769d23649729e6de46
1,286
py
Python
backend_app/migrations/0034_change_property_to_textfield.py
deephealthproject/backend
4bf6899c1308cbd42231ff9e29fe68b3ccb881e5
[ "MIT" ]
2
2021-09-21T19:04:26.000Z
2021-12-31T05:21:16.000Z
backend_app/migrations/0034_change_property_to_textfield.py
deephealthproject/backend
4bf6899c1308cbd42231ff9e29fe68b3ccb881e5
[ "MIT" ]
null
null
null
backend_app/migrations/0034_change_property_to_textfield.py
deephealthproject/backend
4bf6899c1308cbd42231ff9e29fe68b3ccb881e5
[ "MIT" ]
2
2020-03-20T14:05:48.000Z
2020-06-16T16:15:47.000Z
# Generated by Django 3.1.7 on 2021-04-13 15:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backend_app', '0033_add_layer_to_remove_weight'), ] operations = [ migrations.AlterModelOptions( name='allowedproperty', ...
30.619048
98
0.575428
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backend_app', '0033_add_layer_to_remove_weight'), ] operations = [ migrations.AlterModelOptions( name='allowedproperty', options={'ordering': ['model_id', 'id'], 'v...
true
true
08f60a784df41da75bd323dc2dff6eca780620eb
2,559
py
Python
cerate_metada.py
MaryZolfaghar/NetflixRecommendationSystem
a11c13127057da8e3261e057958aafd66a4ff4b2
[ "Apache-2.0" ]
null
null
null
cerate_metada.py
MaryZolfaghar/NetflixRecommendationSystem
a11c13127057da8e3261e057958aafd66a4ff4b2
[ "Apache-2.0" ]
null
null
null
cerate_metada.py
MaryZolfaghar/NetflixRecommendationSystem
a11c13127057da8e3261e057958aafd66a4ff4b2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Apr 20 03:47:45 2020 @author: Maryam """ import numpy as np import argparse import pickle import time from sklearn.cluster import KMeans from utils.read_preprocss_data import read_preprocss_data from utils.calc_eig import calc_eig from utils.calc_lapl...
32.807692
88
0.591637
import numpy as np import argparse import pickle import time from sklearn.cluster import KMeans from utils.read_preprocss_data import read_preprocss_data from utils.calc_eig import calc_eig from utils.calc_laplacian import calc_laplacian from utils.gen_similarity import gen_similarity parser = argparse.ArgumentPars...
true
true
08f60a9ef512f806502726cd66802fa9498c4163
751
py
Python
save_media.py
nricklin/arlobackup
277f484b4626ae4039c1996cb3ac047a2e7ffa00
[ "MIT" ]
null
null
null
save_media.py
nricklin/arlobackup
277f484b4626ae4039c1996cb3ac047a2e7ffa00
[ "MIT" ]
null
null
null
save_media.py
nricklin/arlobackup
277f484b4626ae4039c1996cb3ac047a2e7ffa00
[ "MIT" ]
null
null
null
import json, boto3 import requests s3 = boto3.client('s3') def handler(event, context): print event print context message = json.loads( event['Records'][0]['body'] ) bucket = message['metadata']['s3bucket'] contentURL = message['media']['presignedContentUrl'] content_key = message['metadata']...
26.821429
56
0.679095
import json, boto3 import requests s3 = boto3.client('s3') def handler(event, context): print event print context message = json.loads( event['Records'][0]['body'] ) bucket = message['metadata']['s3bucket'] contentURL = message['media']['presignedContentUrl'] content_key = message['metadata']...
false
true
08f60acf42e52e078ed45b841abc323268496e87
7,880
py
Python
lib/python/treadmill_aws/rest/api/cloud.py
bothejjms/treadmill-aws
18d650be09d1054386066fb6993de3af6ec6a42e
[ "Apache-2.0" ]
null
null
null
lib/python/treadmill_aws/rest/api/cloud.py
bothejjms/treadmill-aws
18d650be09d1054386066fb6993de3af6ec6a42e
[ "Apache-2.0" ]
null
null
null
lib/python/treadmill_aws/rest/api/cloud.py
bothejjms/treadmill-aws
18d650be09d1054386066fb6993de3af6ec6a42e
[ "Apache-2.0" ]
null
null
null
"""Treadmill Cloud REST api. """ import flask import flask_restplus as restplus from flask_restplus import fields # Disable E0611: No 'name' in module from treadmill import webutils # pylint: disable=E0611 def handle_api_error(func): """Handle API error.""" def wrapper(*args, **kwargs): """Functio...
31.774194
77
0.541751
import flask import flask_restplus as restplus from flask_restplus import fields from treadmill import webutils def handle_api_error(func): def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except Exception as err: return flask.abort( flas...
true
true
08f60ada9dbafe05ff25aba5f5f6c4a3c4cca465
227
py
Python
runTests.py
ajrichards/hts-integrate
a343aff9b833979b4f5d4ba6d16fc2b65d8ccfc1
[ "BSD-3-Clause" ]
13
2015-09-24T09:42:23.000Z
2022-03-29T05:11:50.000Z
runTests.py
ajrichards/htsint
a343aff9b833979b4f5d4ba6d16fc2b65d8ccfc1
[ "BSD-3-Clause" ]
1
2015-03-16T09:31:55.000Z
2015-03-16T09:31:55.000Z
runTests.py
ajrichards/hts-integrate
a343aff9b833979b4f5d4ba6d16fc2b65d8ccfc1
[ "BSD-3-Clause" ]
6
2015-12-03T13:19:53.000Z
2018-05-09T01:07:23.000Z
#!/usr/bin/python import unittest,sys,os,getopt from htsint import __basedir__ sys.path.append(__basedir__) import matplotlib as mpl if mpl.get_backend() != 'agg': mpl.use('agg') from unittests import * unittest.main()
17.461538
30
0.740088
import unittest,sys,os,getopt from htsint import __basedir__ sys.path.append(__basedir__) import matplotlib as mpl if mpl.get_backend() != 'agg': mpl.use('agg') from unittests import * unittest.main()
true
true
08f60b5675fda43bd5428e27af6a2ebe67fd38bf
7,282
py
Python
tests/gpflow/likelihoods/test_multiclass.py
yiwei-prowler/GPflow
de08879228e4077f4476279d208fd23634508a8b
[ "Apache-2.0" ]
1
2020-05-07T12:25:40.000Z
2020-05-07T12:25:40.000Z
tests/gpflow/likelihoods/test_multiclass.py
yiwei-prowler/GPflow
de08879228e4077f4476279d208fd23634508a8b
[ "Apache-2.0" ]
null
null
null
tests/gpflow/likelihoods/test_multiclass.py
yiwei-prowler/GPflow
de08879228e4077f4476279d208fd23634508a8b
[ "Apache-2.0" ]
1
2020-12-07T11:13:56.000Z
2020-12-07T11:13:56.000Z
# Copyright 2017-2020 the GPflow 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 ...
37.153061
99
0.702417
import numpy as np import pytest import tensorflow as tf from numpy.testing import assert_allclose import gpflow from gpflow.likelihoods import ( Bernoulli, MultiClass, RobustMax, Softmax, ) from gpflow.config import default_float, default_int from gpflow.utilities import to_default_float, to_default_...
true
true
08f60cd4ae344d53a9876a2070dd83d3fda7a1e7
41,175
py
Python
SNorm_tf_keras.py
GrayXu/SpectralNormalization-TF-Keras
ed2c23ac5b6a98eb0f5eec9cec51dfe3f9128793
[ "MIT" ]
1
2021-12-12T05:06:49.000Z
2021-12-12T05:06:49.000Z
SNorm_tf_keras.py
GrayXu/SpectralNormalization-TF-Keras
ed2c23ac5b6a98eb0f5eec9cec51dfe3f9128793
[ "MIT" ]
null
null
null
SNorm_tf_keras.py
GrayXu/SpectralNormalization-TF-Keras
ed2c23ac5b6a98eb0f5eec9cec51dfe3f9128793
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.keras import backend as K from tensorflow.keras.engine import * # from tensorflow.keras.legacy import interfaces from tensorflow.keras import activations from tensorflow.keras import initializer...
38.661972
93
0.559466
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.keras import backend as K from tensorflow.keras.engine import * from tensorflow.keras import activations from tensorflow.keras import initializers from tensorflow.keras import regularizers from ...
true
true
08f60cda6500cd144431c5fce1c5d9e59ebe4359
935
py
Python
etabotsite/etabotapp/tests/test_djangoindexhtml_mod.py
koykub333/pmp
b92d81da5f572cba868ebe7fe36b277138467bfc
[ "Apache-2.0" ]
2
2018-04-15T19:43:44.000Z
2019-12-19T04:20:52.000Z
etabotsite/etabotapp/tests/test_djangoindexhtml_mod.py
koykub333/pmp
b92d81da5f572cba868ebe7fe36b277138467bfc
[ "Apache-2.0" ]
53
2018-06-04T06:09:23.000Z
2020-06-05T18:25:39.000Z
etabotsite/etabotapp/tests/test_djangoindexhtml_mod.py
koykub333/pmp
b92d81da5f572cba868ebe7fe36b277138467bfc
[ "Apache-2.0" ]
9
2018-04-15T19:42:35.000Z
2021-03-08T02:51:47.000Z
"""Purpose: tests django_indexhtml_mod.py. Uses reference django template Author: Alex Radnaev date created: 2018-05-27 Copyright (C) 2018 Alex Radnaev """ import unittest import logging import os import sys sys.path.append("..") import misc_utils.django_indexhtml_mod as djhtml_mod import misc_utils.unittest_exten...
23.974359
74
0.728342
import unittest import logging import os import sys sys.path.append("..") import misc_utils.django_indexhtml_mod as djhtml_mod import misc_utils.unittest_extend as ute logger = logging.getLogger() logger.setLevel(logging.DEBUG) class TestDjangoIndexHTMLmod(unittest.TestCase): work_dir = 'resources/' def te...
true
true
08f60e21c67636ca6fa3e5d64447835848f6840c
853
py
Python
regexlib/PoCs/Python/3.7/1.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/PoCs/Python/3.7/1.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/PoCs/Python/3.7/1.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
#vuln pattern: SLQ #vuln degree: POL #mul vuln: N #vuln location: [\d\w\-.]+ import re from time import perf_counter regex = '([\d\w\-.]+?\.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikr...
853
853
0.669402
true
true
08f60e538a4af444d206cc0173f6fef55b9ec6c9
4,471
py
Python
tests/integration/test_keeper_snapshots/test.py
chalice19/ClickHouse
2f38e7bc5c2113935ab86260439bb543a1737291
[ "Apache-2.0" ]
8,629
2016-06-14T21:03:01.000Z
2019-09-23T07:46:38.000Z
tests/integration/test_keeper_snapshots/test.py
chalice19/ClickHouse
2f38e7bc5c2113935ab86260439bb543a1737291
[ "Apache-2.0" ]
4,335
2016-06-15T12:58:31.000Z
2019-09-23T11:18:43.000Z
tests/integration/test_keeper_snapshots/test.py
chalice19/ClickHouse
2f38e7bc5c2113935ab86260439bb543a1737291
[ "Apache-2.0" ]
1,700
2016-06-15T09:25:11.000Z
2019-09-23T11:16:38.000Z
#!/usr/bin/env python3 #!/usr/bin/env python3 import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from kazoo.client import KazooClient, KazooState cluster = ClickHouseCluster(__file__) # clickhouse itself will use external zookeeper node = cluster.add_instan...
28.660256
88
0.574815
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from kazoo.client import KazooClient, KazooState cluster = ClickHouseCluster(__file__) node = cluster.add_instance( "node", main_configs=["configs/enable_keeper.xml"], stay_alive=True, with_...
true
true
08f60ff1aa1f18030a6b1141888c26ee338e02e8
2,040
py
Python
cswor/runner.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
1
2021-05-16T18:39:51.000Z
2021-05-16T18:39:51.000Z
cswor/runner.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
null
null
null
cswor/runner.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
null
null
null
from mod_copeland import sample_complexity args = {} # args['heuristic'] = 'random' args['heuristic'] = 'greedy' args['n_voters'] = 1000 args['alpha'] = 0.05 # args['probs'] = [0.4, 0.45, 0.5, 0.7, 0.8] # args['probs'] = [0.1, 0.2, 0.3, 0.4, 0.5] args['probs'] = [0.1 + 0.05*i for i in range(10)] print("ppp", args['pr...
27.567568
206
0.613725
from mod_copeland import sample_complexity args = {} args['heuristic'] = 'greedy' args['n_voters'] = 1000 args['alpha'] = 0.05 args['probs'] = [0.1 + 0.05*i for i in range(10)] print("ppp", args['probs']) args['seed'] = 42 args['ques_limit'] = 5 gammas = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] greedy_itrs = [] random_itrs = [...
true
true
08f610b49c057b530fa299670787a0d25ff700f4
3,237
py
Python
STATICFILES/MODULES_DEBUG/PostPowershellPowerViewUserHunter.py
evi1hack/viperpython
04bf8e31e21385edb58ea9d25296df062197df39
[ "BSD-3-Clause" ]
42
2021-01-20T15:30:33.000Z
2022-03-31T07:51:11.000Z
STATICFILES/MODULES_DEBUG/PostPowershellPowerViewUserHunter.py
hellorubbish/viperpython
42d9ea572fb914059039656b176daca7d7fd5a77
[ "BSD-3-Clause" ]
2
2021-08-17T00:16:33.000Z
2022-02-21T11:37:45.000Z
STATICFILES/MODULES_DEBUG/PostPowershellPowerViewUserHunter.py
hellorubbish/viperpython
42d9ea572fb914059039656b176daca7d7fd5a77
[ "BSD-3-Clause" ]
28
2021-01-22T05:06:39.000Z
2022-03-31T03:27:42.000Z
# -*- coding: utf-8 -*- # @File : SimplePostPowershellModule.py # @Date : 2019/1/12 # @Desc : # # from PostModule.lib.ModuleTemplate import PostMSFPowershellFunctionModule, TAG2CH from PostModule.lib.OptionAndResult import Option, register_options from PostModule.lib.Session import Session class PostModule(PostM...
37.206897
124
0.552672
from PostModule.lib.ModuleTemplate import PostMSFPowershellFunctionModule, TAG2CH from PostModule.lib.OptionAndResult import Option, register_options from PostModule.lib.Session import Session class PostModule(PostMSFPowershellFunctionModule): NAME = "定位域管理员登录主机" DESC = "模块通过遍历域内所有主机,查找域管理员正在登录的主机,指导下一步攻击目标...
true
true
08f610bf3887a91f5eecdc2cc13f14f4ca962ae1
329
py
Python
sentry/utils/charts.py
optimal-outsource/django-sentry
1b55011f1474cde8707a9febaf0c64c8142496d2
[ "BSD-3-Clause" ]
1
2015-07-15T19:04:48.000Z
2015-07-15T19:04:48.000Z
sentry/utils/charts.py
m0sth8/django-sentry
1fd836d7029331aa17e2560a3be94996287ad9d3
[ "BSD-3-Clause" ]
null
null
null
sentry/utils/charts.py
m0sth8/django-sentry
1fd836d7029331aa17e2560a3be94996287ad9d3
[ "BSD-3-Clause" ]
null
null
null
""" sentry.utils.charts ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from sentry.utils import get_db_engine def has_charts(db): engine = get_db_engine(db) if engine.startswith('sqlite'): return False re...
21.933333
70
0.665653
from sentry.utils import get_db_engine def has_charts(db): engine = get_db_engine(db) if engine.startswith('sqlite'): return False return True
true
true
08f610e23a3303ff4dd419b1293ffbfd113ddc52
456
py
Python
rhw/admin.py
misli/rhw
928c9d5ba5649c987c255cf8370d92fcee88031c
[ "BSD-3-Clause" ]
null
null
null
rhw/admin.py
misli/rhw
928c9d5ba5649c987c255cf8370d92fcee88031c
[ "BSD-3-Clause" ]
null
null
null
rhw/admin.py
misli/rhw
928c9d5ba5649c987c255cf8370d92fcee88031c
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from .models import * class RedHackWeekAdmin(admin.ModelAdmin): list_display = ['title', 'status', 'start', 'end'] prepopulated_fields = {'slug': ('title',)} class IdeaAdmin(admin.ModelAdmin): list_display = ['title'] prepopulated_fields = {'slug': ('title',)...
20.727273
57
0.682018
from django.contrib import admin from .models import * class RedHackWeekAdmin(admin.ModelAdmin): list_display = ['title', 'status', 'start', 'end'] prepopulated_fields = {'slug': ('title',)} class IdeaAdmin(admin.ModelAdmin): list_display = ['title'] prepopulated_fields = {'slug': ('title',)...
true
true
08f610f937c8cd98b15da3319b60f1a392ee66a9
7,712
py
Python
tests/test_security_oauth2.py
sebastianschramm/fastapi
e2fadcbc90fcffadfb4384396cfbd3b121053948
[ "MIT" ]
1
2020-01-10T23:22:21.000Z
2020-01-10T23:22:21.000Z
tests/test_security_oauth2.py
sebastianschramm/fastapi
e2fadcbc90fcffadfb4384396cfbd3b121053948
[ "MIT" ]
null
null
null
tests/test_security_oauth2.py
sebastianschramm/fastapi
e2fadcbc90fcffadfb4384396cfbd3b121053948
[ "MIT" ]
null
null
null
import pytest from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2 from fastapi.security.oauth2 import OAuth2PasswordRequestFormStrict from pydantic import BaseModel from starlette.testclient import TestClient app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { ...
31.096774
87
0.439575
import pytest from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2 from fastapi.security.oauth2 import OAuth2PasswordRequestFormStrict from pydantic import BaseModel from starlette.testclient import TestClient app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { ...
true
true
08f61182c113423dc6b2df3dec0c5d53d8d94ce3
1,602
py
Python
checkin/models.py
ophilli/makerAuth
d3ad055814e981571ac1119e79d3a7c719c1a72c
[ "MIT" ]
null
null
null
checkin/models.py
ophilli/makerAuth
d3ad055814e981571ac1119e79d3a7c719c1a72c
[ "MIT" ]
null
null
null
checkin/models.py
ophilli/makerAuth
d3ad055814e981571ac1119e79d3a7c719c1a72c
[ "MIT" ]
null
null
null
from django.db import models class Certification(models.Model): name = models.CharField(max_length=30) # Expiration datetime # Prerequisite def __str__(self): return self.name class User(models.Model): username = models.CharField(max_length=30, unique=True) # Used for emails cuid = mo...
32.693878
125
0.681024
from django.db import models class Certification(models.Model): name = models.CharField(max_length=30) def __str__(self): return self.name class User(models.Model): username = models.CharField(max_length=30, unique=True) cuid = models.CharField(max_length=9, primary_key=True) rfid...
true
true
08f611858e9e04473bc3d467aa66126bb1449660
9,516
py
Python
sympy/physics/units/util.py
yupbank/sympy
66d7aef9dc1b26055af22e27ba42004c40b95d7c
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/units/util.py
yupbank/sympy
66d7aef9dc1b26055af22e27ba42004c40b95d7c
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/units/util.py
yupbank/sympy
66d7aef9dc1b26055af22e27ba42004c40b95d7c
[ "BSD-3-Clause" ]
null
null
null
""" Several methods to simplify expressions involving unit objects. """ from functools import reduce from collections.abc import Iterable from typing import Optional from sympy import default_sort_key from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.core....
37.912351
153
0.683375
from functools import reduce from collections.abc import Iterable from typing import Optional from sympy import default_sort_key from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.core.power import Pow from sympy.core.sorting import ordered from sympy.core....
true
true
08f6128d9bdd94a447799f45cc3854c3177885fe
120
py
Python
1a. beginner_path_1_book_a_byte_of_python/a_byte_of_python by Swaroop C H - programs/function_keyword.py
codeclubbentleigh/Python
94d6a937aa3520b201ee1641c2009bd90566d52a
[ "MIT" ]
null
null
null
1a. beginner_path_1_book_a_byte_of_python/a_byte_of_python by Swaroop C H - programs/function_keyword.py
codeclubbentleigh/Python
94d6a937aa3520b201ee1641c2009bd90566d52a
[ "MIT" ]
null
null
null
1a. beginner_path_1_book_a_byte_of_python/a_byte_of_python by Swaroop C H - programs/function_keyword.py
codeclubbentleigh/Python
94d6a937aa3520b201ee1641c2009bd90566d52a
[ "MIT" ]
null
null
null
def func(a, b=5, c=10): print('a is', a, 'and b is', b, 'and c is', c) func(3, 7) func(25, c=24) func(c=50, a=100)
17.142857
50
0.516667
def func(a, b=5, c=10): print('a is', a, 'and b is', b, 'and c is', c) func(3, 7) func(25, c=24) func(c=50, a=100)
true
true
08f612cde2c2fa73d6466afe8e1bd9db483c0d2f
8,139
py
Python
hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/test/dbus/testlib.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU Genera...
27.220736
77
0.675513
import string import random import functools import xml.etree.ElementTree as Et from collections import OrderedDict import dbus import os import sys import time BUS_NAME = os.getenv('LVM_DBUS_NAME', 'com.redhat.lvmdbus1') BASE_INTERFACE = 'com.redhat.lvmdbus1' MANAGER_INT = BASE_INTERFACE + '.Manager' MANAGER_OBJ = '...
true
true
08f6135c92eaa5e4b6b6c28c6763a733a19fef2a
6,616
py
Python
assembler/assembler.py
tadaren/CPU_RV32I
64ae3b4b690d1730152ebd2b01c74b36a2f58fae
[ "MIT" ]
null
null
null
assembler/assembler.py
tadaren/CPU_RV32I
64ae3b4b690d1730152ebd2b01c74b36a2f58fae
[ "MIT" ]
null
null
null
assembler/assembler.py
tadaren/CPU_RV32I
64ae3b4b690d1730152ebd2b01c74b36a2f58fae
[ "MIT" ]
null
null
null
import argparse import re class ParseError(Exception): pass def parse_register(rs): if rs[0] != 'r': raise ParseError(f'{rs} is not Register') register_num = int(rs[1:]) if register_num < 0 or 32 <= register_num: raise ParseError(f'{rs} needs to be more than 0 and less than ...
45.944444
147
0.589933
import argparse import re class ParseError(Exception): pass def parse_register(rs): if rs[0] != 'r': raise ParseError(f'{rs} is not Register') register_num = int(rs[1:]) if register_num < 0 or 32 <= register_num: raise ParseError(f'{rs} needs to be more than 0 and less than ...
true
true
08f6139ac736e85ee8a2898ecf6553822d70f1c3
1,730
py
Python
analysis/copy_maps_to_new_folder.py
ludazhao/art_history_net
396f7b99b3c4fe4f9da752d8f7eb0f3395752f57
[ "MIT" ]
15
2016-12-30T21:03:48.000Z
2022-01-31T08:09:09.000Z
analysis/copy_maps_to_new_folder.py
ludazhao/SherlockNet
396f7b99b3c4fe4f9da752d8f7eb0f3395752f57
[ "MIT" ]
null
null
null
analysis/copy_maps_to_new_folder.py
ludazhao/SherlockNet
396f7b99b3c4fe4f9da752d8f7eb0f3395752f57
[ "MIT" ]
null
null
null
import os import glob import numpy as np import cPickle as pickle import h5py from scipy.misc import imsave print "Loading data" (image_metadata, book_metadata, image_to_idx) = pickle.load(open("/data/all_metadata.pkl", 'r')) if not glob.glob("/data/maps_by_date"): os.mkdir("/data/maps_by_date") image_hdf5 =...
29.827586
105
0.639884
import os import glob import numpy as np import cPickle as pickle import h5py from scipy.misc import imsave print "Loading data" (image_metadata, book_metadata, image_to_idx) = pickle.load(open("/data/all_metadata.pkl", 'r')) if not glob.glob("/data/maps_by_date"): os.mkdir("/data/maps_by_date") image_hdf5 =...
false
true
08f61437153a82207888f6bd6f94c94c00aa1119
4,842
py
Python
video_classify.py
AdamSpannbauer/wedding_ring_detector
eb59acbb70f513711657b6f1b04abbf2ca271319
[ "MIT" ]
3
2019-10-24T01:48:37.000Z
2020-06-21T18:06:28.000Z
video_classify.py
AdamSpannbauer/wedding_ring_detector
eb59acbb70f513711657b6f1b04abbf2ca271319
[ "MIT" ]
null
null
null
video_classify.py
AdamSpannbauer/wedding_ring_detector
eb59acbb70f513711657b6f1b04abbf2ca271319
[ "MIT" ]
null
null
null
"""Apply model to frames of video from web-cam""" import pickle import cv2 import imutils.text from extract_features import FeatureExtractor class MarriagePredictor: """Wrapper class to hold binary married/not married hand classifier :param model_path: File path to pickled marriage/not married sklearn model ...
34.098592
109
0.566708
import pickle import cv2 import imutils.text from extract_features import FeatureExtractor class MarriagePredictor: def __init__(self, model_path='model.pickle', threshold=0.5): self.threshold = threshold self.labels = ['Married', 'Not Married'] self._feature_extractor = FeatureExtractor()...
true
true
08f615678ace7b3028218dcbf6de08c1fb57a104
3,198
py
Python
cloudify_azure/resources/compute/managed_cluster.py
cloudify-cosmo/cloudify-azure-plugin
b9ac49f603d6588685e00d16f19bcfe3f84d5c98
[ "Apache-2.0" ]
2
2016-07-25T14:21:27.000Z
2016-10-26T19:47:23.000Z
cloudify_azure/resources/compute/managed_cluster.py
cloudify-cosmo/cloudify-azure-plugin
b9ac49f603d6588685e00d16f19bcfe3f84d5c98
[ "Apache-2.0" ]
34
2015-11-09T11:05:23.000Z
2021-05-06T14:03:42.000Z
cloudify_azure/resources/compute/managed_cluster.py
cloudify-cosmo/cloudify-azure-plugin
b9ac49f603d6588685e00d16f19bcfe3f84d5c98
[ "Apache-2.0" ]
13
2015-07-09T10:49:55.000Z
2021-05-06T09:24:30.000Z
# ####### # Copyright (c) 2020 Cloudify Platform Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
36.758621
74
0.713258
import yaml import base64 from cloudify.decorators import operation from cloudify_azure import (constants, utils, decorators) from azure_sdk.resources.compute.managed_cluster import ManagedCluster def get_manged_cluster_interface(ctx): azure_config = utils.get_client_config(ctx.node.properties) api_version...
true
true
08f61620ea48816bdf2a7f9cf6d6217a9d1f5311
16,706
py
Python
repos/system_upgrade/common/actors/storagescanner/tests/unit_test_storagescanner.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/common/actors/storagescanner/tests/unit_test_storagescanner.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/common/actors/storagescanner/tests/unit_test_storagescanner.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
import functools import os import pyudev from leapp import reporting from leapp.libraries.actor import storagescanner from leapp.libraries.common.testutils import create_report_mocked, logger_mocked from leapp.libraries.stdlib import api from leapp.models import ( FstabEntry, LsblkEntry, LvdisplayEntry, ...
35.849785
112
0.549443
import functools import os import pyudev from leapp import reporting from leapp.libraries.actor import storagescanner from leapp.libraries.common.testutils import create_report_mocked, logger_mocked from leapp.libraries.stdlib import api from leapp.models import ( FstabEntry, LsblkEntry, LvdisplayEntry, ...
true
true
08f6166939c93827b245ca241a59d949ec21b6d4
4,564
py
Python
tests/test_mobile_bitcoin_price.py
RajkumarQxf2/qxf2-page-object-model
f777ef3e9e140aeacb481c945e9522a2bc42840d
[ "MIT" ]
null
null
null
tests/test_mobile_bitcoin_price.py
RajkumarQxf2/qxf2-page-object-model
f777ef3e9e140aeacb481c945e9522a2bc42840d
[ "MIT" ]
null
null
null
tests/test_mobile_bitcoin_price.py
RajkumarQxf2/qxf2-page-object-model
f777ef3e9e140aeacb481c945e9522a2bc42840d
[ "MIT" ]
1
2022-01-24T03:56:37.000Z
2022-01-24T03:56:37.000Z
""" Automated test will do the following: # Open Bitcoin Info application in emulator. # Click on the bitcoin real time price page button. # Compare expected bitcoin real time price page heading with current page heading. # Verify that the bitcoin real time price is displayed on the page. # Display ...
43.466667
308
0.700701
import os, sys, time sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from page_objects.PageFactory import PageFactory from utils.Option_Parser import Option_Parser import conf.mobile_bitcoin_conf as conf import conf.testrail_caseid_conf as testrail_file import pytest @pytest.mark.MOBILE de...
true
true
08f617e44858207eb3337fb0662258e09f397271
140
py
Python
renaming_images/simply use .py
StrawH/lazy-work-with-python
100e388c7313cb1b45d0724b40a5a249eafca1c9
[ "MIT" ]
null
null
null
renaming_images/simply use .py
StrawH/lazy-work-with-python
100e388c7313cb1b45d0724b40a5a249eafca1c9
[ "MIT" ]
null
null
null
renaming_images/simply use .py
StrawH/lazy-work-with-python
100e388c7313cb1b45d0724b40a5a249eafca1c9
[ "MIT" ]
null
null
null
from rename_files import RenamingFiles rename__ = RenamingFiles() rename__.list_files("folder\\path") rename__.chaning_name('new name')
28
39
0.792857
from rename_files import RenamingFiles rename__ = RenamingFiles() rename__.list_files("folder\\path") rename__.chaning_name('new name')
true
true
08f618d9540cb6d0f0a993043ddcba2129af2966
1,318
py
Python
python implementation/lesson_5.py
abdelrhman-adel-ahmed/Functional-Programming
724e71273606f75f076cbaadef2475ab1069d2c9
[ "MIT" ]
26
2021-03-31T17:51:53.000Z
2021-11-12T11:20:21.000Z
python implementation/lesson_5.py
abdelrhman-adel-ahmed/Functional-Programming
724e71273606f75f076cbaadef2475ab1069d2c9
[ "MIT" ]
null
null
null
python implementation/lesson_5.py
abdelrhman-adel-ahmed/Functional-Programming
724e71273606f75f076cbaadef2475ab1069d2c9
[ "MIT" ]
7
2021-04-02T15:26:41.000Z
2021-04-05T21:05:24.000Z
from functools import partial, reduce mydata = [3, 5, 7, 8] def SubstractTen(item): return item - 10 def Square(item): return pow(item, 2) def AddOne(item): return item + 1 def ComposeFunction(f1, f2, f3): return lambda item: f3(f2(f1(item))) def compose(f, g): return lambda item: f(g(ite...
20.920635
156
0.714719
from functools import partial, reduce mydata = [3, 5, 7, 8] def SubstractTen(item): return item - 10 def Square(item): return pow(item, 2) def AddOne(item): return item + 1 def ComposeFunction(f1, f2, f3): return lambda item: f3(f2(f1(item))) def compose(f, g): return lambda item: f(g(ite...
true
true
08f619255aa1daa60ee170048bf4c3720c37d5e5
3,412
py
Python
delineate_watersheds.py
cmshobe/grass-scripts
5d593f301fd708252e5a69b7304ce28ea8490506
[ "MIT" ]
null
null
null
delineate_watersheds.py
cmshobe/grass-scripts
5d593f301fd708252e5a69b7304ce28ea8490506
[ "MIT" ]
null
null
null
delineate_watersheds.py
cmshobe/grass-scripts
5d593f301fd708252e5a69b7304ce28ea8490506
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 19 14:57:29 2018 @author: charlie create watersheds from pour point shapefile 'cleaned_pour_points' """ import numpy as np import grass.script as grass from grass.pygrass.modules.shortcuts import general as g from grass.pygrass.modules.shortcuts im...
36.297872
78
0.734467
import numpy as np import grass.script as grass from grass.pygrass.modules.shortcuts import general as g from grass.pygrass.modules.shortcuts import vector as v from grass.pygrass.modules.shortcuts import raster as r grass.use_temp_region() cleaned_pour_points = 'cleaned_pour_points' out_file = 'cleaned_pour_points....
true
true
08f61a99f8aef0cc724d9906317be9b7a4566db0
10,273
py
Python
mlrun/frameworks/lgbm/__init__.py
george0st/mlrun
6467d3a5ceadf6cd35512b84b3ddc3da611cf39a
[ "Apache-2.0" ]
null
null
null
mlrun/frameworks/lgbm/__init__.py
george0st/mlrun
6467d3a5ceadf6cd35512b84b3ddc3da611cf39a
[ "Apache-2.0" ]
null
null
null
mlrun/frameworks/lgbm/__init__.py
george0st/mlrun
6467d3a5ceadf6cd35512b84b3ddc3da611cf39a
[ "Apache-2.0" ]
null
null
null
import warnings from typing import Dict, List, Union import lightgbm as lgb import mlrun from .._common import ExtraDataType, get_plans from .._ml_common import ( DatasetType, Metric, MetricEntry, MetricsLibrary, MLArtifactsLibrary, MLPlan, PickleModelServer, get_metrics, ) from .mlru...
49.389423
120
0.584542
import warnings from typing import Dict, List, Union import lightgbm as lgb import mlrun from .._common import ExtraDataType, get_plans from .._ml_common import ( DatasetType, Metric, MetricEntry, MetricsLibrary, MLArtifactsLibrary, MLPlan, PickleModelServer, get_metrics, ) from .mlru...
true
true
08f61abf3c813e90de78f368f5f3d6f435a149eb
1,402
py
Python
code/test_for_multi_windows/Ui_untitled3.py
Kurisuzzz/PyQt5
1b5a5c0bc423db2b95b3511167b547ed1336c78a
[ "MIT" ]
null
null
null
code/test_for_multi_windows/Ui_untitled3.py
Kurisuzzz/PyQt5
1b5a5c0bc423db2b95b3511167b547ed1336c78a
[ "MIT" ]
null
null
null
code/test_for_multi_windows/Ui_untitled3.py
Kurisuzzz/PyQt5
1b5a5c0bc423db2b95b3511167b547ed1336c78a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'f:\360MoveData\Users\Dell\Desktop\pyqt5\PyQt5\test_for_multi_windows\untitled3.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this fi...
38.944444
136
0.731812
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMainWindow class Ui_MainWindow(QMainWindow): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralw...
true
true
08f61ad017954879b176be80b82fbeed785b9e7e
23
py
Python
projects/connection-pool/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
25
2021-10-30T19:54:59.000Z
2022-03-29T06:11:02.000Z
projects/connection-pool/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
21
2021-10-19T01:09:38.000Z
2022-03-24T16:08:53.000Z
projects/connection-pool/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
3
2022-01-25T20:25:13.000Z
2022-03-08T02:58:50.000Z
import connection_pool
11.5
22
0.913043
import connection_pool
true
true
08f61b6dd9cd2658c8bbfcaa8d13277b7e0af6df
1,950
py
Python
backend/pyrogram/raw/types/base_theme_night.py
appheap/social-media-analyzer
0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c
[ "Apache-2.0" ]
5
2021-09-11T22:01:15.000Z
2022-03-16T21:33:42.000Z
backend/pyrogram/raw/types/base_theme_night.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
null
null
null
backend/pyrogram/raw/types/base_theme_night.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
3
2022-01-18T11:06:22.000Z
2022-02-26T13:39:28.000Z
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
30.46875
103
0.633333
from io import BytesIO from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector from pyrogram.raw.core import TLObject from pyrogram import raw from typing import List, Union, Any class BaseThemeNight(TLObject): __slots__: List[str] = [] ID = 0xb7b31ea8 ...
true
true
08f61c00c4c9be926a2d58437910c0ad06b19f03
747
py
Python
libMR/setup.py
eilon123/CROSR-main
c94b117008d41c39751d2c6cfc4e043e4d8167c6
[ "MIT" ]
47
2021-09-02T10:42:29.000Z
2022-03-31T01:37:49.000Z
libMR/setup.py
eilon123/CROSR-main
c94b117008d41c39751d2c6cfc4e043e4d8167c6
[ "MIT" ]
2
2021-12-05T02:28:42.000Z
2022-01-05T06:46:10.000Z
libMR/setup.py
eilon123/CROSR-main
c94b117008d41c39751d2c6cfc4e043e4d8167c6
[ "MIT" ]
6
2021-09-19T16:31:32.000Z
2022-03-03T06:57:34.000Z
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import sys import numpy #ext_modules = [Extension("libmr", ["libmr.pyx", "MetaRecognition.cpp"])] setup( ext_modules = cythonize(Extension('libmr', ...
35.571429
82
0.460509
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import sys import numpy setup( ext_modules = cythonize(Extension('libmr', ["libmr.pyx", ...
true
true
08f61ca06c99cddb0e7e10fba645bf9dd06d0ad8
316
py
Python
config/api_router.py
okosamastar/nisshin_b2b
7576eb464ca90a191e57dddddfdfd0aff76d2291
[ "MIT" ]
null
null
null
config/api_router.py
okosamastar/nisshin_b2b
7576eb464ca90a191e57dddddfdfd0aff76d2291
[ "MIT" ]
3
2022-03-25T06:31:45.000Z
2022-03-31T06:34:00.000Z
config/api_router.py
okosamastar/nisshin_b2b
7576eb464ca90a191e57dddddfdfd0aff76d2291
[ "MIT" ]
null
null
null
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from nisshin_b2b.users.api.views import UserViewSet if settings.DEBUG: router = DefaultRouter() else: router = SimpleRouter() router.register("users", UserViewSet) app_name = "api" urlpatterns = router.urls
19.75
62
0.781646
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from nisshin_b2b.users.api.views import UserViewSet if settings.DEBUG: router = DefaultRouter() else: router = SimpleRouter() router.register("users", UserViewSet) app_name = "api" urlpatterns = router.urls
true
true
08f61e344e97559629eed92631a24f8b44738c25
18,108
py
Python
azure/mgmt/network/v2015_06_15/operations/route_tables_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/network/v2015_06_15/operations/route_tables_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2015_06_15/operations/route_tables_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
44.711111
144
0.654959
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller from .. import models class RouteTablesOperations(object): models = models def __init__(self, client, config, serializer, deserializer)...
true
true
08f61e92ac237cfd9dcf7d4f44d93781db5ecd46
6,295
py
Python
asoul_spider.py
Joe1sn/asoul_weibo_comment
bc2cd69cc908bc2a5638b183126c94745feab780
[ "MIT" ]
1
2021-10-08T00:22:58.000Z
2021-10-08T00:22:58.000Z
asoul_spider.py
Joe1sn/asoul_weibo_comment
bc2cd69cc908bc2a5638b183126c94745feab780
[ "MIT" ]
null
null
null
asoul_spider.py
Joe1sn/asoul_weibo_comment
bc2cd69cc908bc2a5638b183126c94745feab780
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/9/28 10:57 # @Author : Joe1sn # @Project : a_soul # @FileName: asoul_spider.py # @Software: PyCharm # @Version : python3.8 import requests from urllib.parse import urlencode from pyquery import PyQuery as pq from time_issue import get_format_datetime from weibo_co...
31.009852
276
0.56521
import requests from urllib.parse import urlencode from pyquery import PyQuery as pq from time_issue import get_format_datetime from weibo_comment import main_function import MySQLdb import time global keyword SNAP = 4 weibo_base_url = 'https://m.weibo.cn/api/container/getIndex?' headers = { "U...
true
true
08f6209600259569f43a1a60b4cbe6c4c67ada38
425
py
Python
2020/7b.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
2
2021-12-04T00:02:12.000Z
2021-12-11T05:38:45.000Z
2020/7b.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
null
null
null
2020/7b.py
combatopera/advent2020
6fa54e91ef1a5443dff36c15e65892701293201f
[ "Unlicense" ]
1
2020-12-20T18:50:54.000Z
2020-12-20T18:50:54.000Z
#!/usr/bin/env python3 from adventlib import BagRule from pathlib import Path def main(): colortocontained = {} with Path('input', '7').open() as f: for r in BagRule.readmany(f): colortocontained[r.lhs] = r.rhs def contains(color): return sum(n * (1 + contains(c)) for c, n in c...
25
85
0.625882
from adventlib import BagRule from pathlib import Path def main(): colortocontained = {} with Path('input', '7').open() as f: for r in BagRule.readmany(f): colortocontained[r.lhs] = r.rhs def contains(color): return sum(n * (1 + contains(c)) for c, n in colortocontained[color]....
true
true
08f6214eff99d573ac2699e1145e94daa1333c4e
1,258
py
Python
LAB2/mlutils.py
fgulan/machine-learning-fer
d37142a1f00fd04f1454b43c1b4bb02b0dcf179b
[ "MIT" ]
null
null
null
LAB2/mlutils.py
fgulan/machine-learning-fer
d37142a1f00fd04f1454b43c1b4bb02b0dcf179b
[ "MIT" ]
null
null
null
LAB2/mlutils.py
fgulan/machine-learning-fer
d37142a1f00fd04f1454b43c1b4bb02b0dcf179b
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt def plot_2d_clf_problem(X, y, h=None): ''' Plots a two-dimensional labeled dataset (X,y) and, if function h(x) is given, the decision surfaces. ''' assert X.shape[1] == 2, "Dataset is not two-dimensional" if h!=None : # Crea...
37
83
0.505564
import numpy as np import matplotlib.pyplot as plt def plot_2d_clf_problem(X, y, h=None): assert X.shape[1] == 2, "Dataset is not two-dimensional" if h!=None : r = 0.02 x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1 y_min, y_max = X[:, 1].min() - 1, X[:, 1].max() +...
true
true
08f62197f19563d01e92b8fbed4a62ee34158373
1,226
py
Python
pull_from_github.py
rocco8773/plasmapy.github.io
5975e2766f7b31e4e59d263c16d2d58711ebb70c
[ "CC-BY-4.0" ]
null
null
null
pull_from_github.py
rocco8773/plasmapy.github.io
5975e2766f7b31e4e59d263c16d2d58711ebb70c
[ "CC-BY-4.0" ]
null
null
null
pull_from_github.py
rocco8773/plasmapy.github.io
5975e2766f7b31e4e59d263c16d2d58711ebb70c
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python import requests as re OUTPUT_DIR = "web/pages/" BASE_URL = "https://raw.githubusercontent.com/PlasmaPy/PlasmaPy/master/" WEB_BASE_URL = "https://raw.githubusercontent.com/PlasmaPy/plasmapy.github.io/src/" PAGES = [ {"filename": OUTPUT_DIR + "conduct.md", "url": BASE_URL + "CODE_OF_CONDUC...
30.65
83
0.574225
import requests as re OUTPUT_DIR = "web/pages/" BASE_URL = "https://raw.githubusercontent.com/PlasmaPy/PlasmaPy/master/" WEB_BASE_URL = "https://raw.githubusercontent.com/PlasmaPy/plasmapy.github.io/src/" PAGES = [ {"filename": OUTPUT_DIR + "conduct.md", "url": BASE_URL + "CODE_OF_CONDUCT.md", "metadata"...
true
true
08f62275f29edddbffd2dfebcb04e97efe5a18f8
8,718
py
Python
algorithms/appo/model.py
magicly/sample-factory
32cd44a907653fdad40c026ba0a4fa4cca68554b
[ "MIT" ]
1
2020-11-30T23:32:04.000Z
2020-11-30T23:32:04.000Z
algorithms/appo/model.py
magicly/sample-factory
32cd44a907653fdad40c026ba0a4fa4cca68554b
[ "MIT" ]
null
null
null
algorithms/appo/model.py
magicly/sample-factory
32cd44a907653fdad40c026ba0a4fa4cca68554b
[ "MIT" ]
1
2020-07-07T07:52:25.000Z
2020-07-07T07:52:25.000Z
import torch from torch import nn from algorithms.appo.model_utils import create_encoder, create_core, ActionParameterizationContinuousNonAdaptiveStddev, \ ActionParameterizationDefault, normalize_obs from algorithms.utils.action_distributions import sample_actions_log_probs, is_continuous_action_space from utils....
38.405286
146
0.683184
import torch from torch import nn from algorithms.appo.model_utils import create_encoder, create_core, ActionParameterizationContinuousNonAdaptiveStddev, \ ActionParameterizationDefault, normalize_obs from algorithms.utils.action_distributions import sample_actions_log_probs, is_continuous_action_space from utils....
true
true
08f622c08ef40de2d23b6c992201533cbf4c4c19
2,367
py
Python
scons-local/scons-local-2.3.6/SCons/Tool/hplink.py
rdadolf/msms
ef1dcf345234a8241f12b7952801bde9d7b406b8
[ "BSD-3-Clause" ]
null
null
null
scons-local/scons-local-2.3.6/SCons/Tool/hplink.py
rdadolf/msms
ef1dcf345234a8241f12b7952801bde9d7b406b8
[ "BSD-3-Clause" ]
null
null
null
scons-local/scons-local-2.3.6/SCons/Tool/hplink.py
rdadolf/msms
ef1dcf345234a8241f12b7952801bde9d7b406b8
[ "BSD-3-Clause" ]
null
null
null
"""SCons.Tool.hplink Tool-specific initialization for the HP linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free o...
30.346154
105
0.726236
__revision__ = "src/engine/SCons/Tool/hplink.py rel_2.3.5:3347:d31d5a4e74b6 2015/07/31 14:36:10 bdbaddog" import os import os.path import SCons.Util import link ccLinker = None try: dirs = os.listdir('/opt') except (IOError, OSError): # (IOError) or isn't readable (OSError) is okay. dirs = [] f...
true
true
08f6240a4c35fe5be4daafdcc562c9c9135fa008
2,673
py
Python
image_cluster/pipeline/pipeline.py
kowaalczyk/image-cluster
2d034dd154491da8b22ee6662c9dcf9500283186
[ "BSD-2-Clause" ]
1
2019-05-09T10:30:23.000Z
2019-05-09T10:30:23.000Z
image_cluster/pipeline/pipeline.py
kowaalczyk/image-cluster
2d034dd154491da8b22ee6662c9dcf9500283186
[ "BSD-2-Clause" ]
null
null
null
image_cluster/pipeline/pipeline.py
kowaalczyk/image-cluster
2d034dd154491da8b22ee6662c9dcf9500283186
[ "BSD-2-Clause" ]
null
null
null
from sklearn.base import BaseEstimator, ClusterMixin, TransformerMixin from sklearn.metrics import silhouette_score, calinski_harabaz_score import numpy as np from image_cluster.pipeline.utils import VerboseMixin from image_cluster.pipeline.model_factory import ModelFactory from image_cluster.types import Score clas...
36.616438
70
0.649832
from sklearn.base import BaseEstimator, ClusterMixin, TransformerMixin from sklearn.metrics import silhouette_score, calinski_harabaz_score import numpy as np from image_cluster.pipeline.utils import VerboseMixin from image_cluster.pipeline.model_factory import ModelFactory from image_cluster.types import Score clas...
true
true
08f624450260b6d71f65acf4e7d7b9d9b97d9106
13,574
py
Python
api/tests/opentrons/protocol_engine/state/test_labware_view.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/protocol_engine/state/test_labware_view.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/protocol_engine/state/test_labware_view.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
"""Labware state store tests.""" import pytest from typing import Dict, Optional, cast from opentrons_shared_data.deck.dev_types import DeckDefinitionV2 from opentrons_shared_data.pipette.dev_types import LabwareUri from opentrons.protocols.models import LabwareDefinition from opentrons.types import DeckSlotName, Poin...
34.451777
82
0.648519
import pytest from typing import Dict, Optional, cast from opentrons_shared_data.deck.dev_types import DeckDefinitionV2 from opentrons_shared_data.pipette.dev_types import LabwareUri from opentrons.protocols.models import LabwareDefinition from opentrons.types import DeckSlotName, Point from opentrons.protocol_engine...
true
true
08f624b1aad0fb6ebf865cefe7ed21718cc50401
1,746
py
Python
jet/utils.py
FR98/jet-python
365920c5268e7c64636a9fc3ee7bffb033027735
[ "MIT" ]
null
null
null
jet/utils.py
FR98/jet-python
365920c5268e7c64636a9fc3ee7bffb033027735
[ "MIT" ]
null
null
null
jet/utils.py
FR98/jet-python
365920c5268e7c64636a9fc3ee7bffb033027735
[ "MIT" ]
null
null
null
import hmac import hashlib import json import base64 def hmac_sha256(msg, key, encoding): return hmac.new( msg = bytes(str(msg), encoding), key = bytes(str(key), encoding), digestmod = hashlib.sha256 ).hexdigest() def stringfy_dict(p_dict): # Python dictionary to json return js...
26.454545
55
0.670676
import hmac import hashlib import json import base64 def hmac_sha256(msg, key, encoding): return hmac.new( msg = bytes(str(msg), encoding), key = bytes(str(key), encoding), digestmod = hashlib.sha256 ).hexdigest() def stringfy_dict(p_dict): return json.dumps(p_dict) def encode...
true
true
08f62594541b8a17a3453db4860146489b9ad95e
8,059
py
Python
kolibri/core/deviceadmin/tests/test_dbrestore.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
kolibri/core/deviceadmin/tests/test_dbrestore.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
kolibri/core/deviceadmin/tests/test_dbrestore.py
rrobinson-SIUMEDICINE/kolibri
4a33ac3ca4435dc524a9aba86eae1d3334930d1a
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import random import tempfile import pytest from django.conf import settings from django.core.management import call_command from django.test.utils import override_settings from mock import p...
33.439834
88
0.682715
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import random import tempfile import pytest from django.conf import settings from django.core.management import call_command from django.test.utils import override_settings from mock import p...
true
true
08f625abe2beb5f87a28e6e92b2fbfb20853fef8
3,193
py
Python
newsapp/news.py
adi112100/newsapp
7cdf6070299b4a8dcc950e7fcdfb82cf1a1d98cb
[ "MIT" ]
null
null
null
newsapp/news.py
adi112100/newsapp
7cdf6070299b4a8dcc950e7fcdfb82cf1a1d98cb
[ "MIT" ]
null
null
null
newsapp/news.py
adi112100/newsapp
7cdf6070299b4a8dcc950e7fcdfb82cf1a1d98cb
[ "MIT" ]
null
null
null
from newsapi import NewsApiClient import datetime indian_news = {'date': 1, 'news': 'null'} national_news = {'date': 1, 'news': 'null'} international_news = {'date': 1, 'news': 'null'} bollywood_news = {'date': 1, 'news': 'null'} lifestyle_news = {'date': 1, 'news': 'null'} sport_news = {'date': 1, 'news': 'null'} bus...
56.017544
187
0.691513
from newsapi import NewsApiClient import datetime indian_news = {'date': 1, 'news': 'null'} national_news = {'date': 1, 'news': 'null'} international_news = {'date': 1, 'news': 'null'} bollywood_news = {'date': 1, 'news': 'null'} lifestyle_news = {'date': 1, 'news': 'null'} sport_news = {'date': 1, 'news': 'null'} bus...
true
true
08f625c3c603a5a1801cbdc60eecb3577797769a
4,569
py
Python
src/tests/ftest/control/daos_admin_privileged.py
cdurf1/daos
f57f682ba07560fd35c0991798c5496c20f10769
[ "Apache-2.0" ]
null
null
null
src/tests/ftest/control/daos_admin_privileged.py
cdurf1/daos
f57f682ba07560fd35c0991798c5496c20f10769
[ "Apache-2.0" ]
null
null
null
src/tests/ftest/control/daos_admin_privileged.py
cdurf1/daos
f57f682ba07560fd35c0991798c5496c20f10769
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ (C) Copyright 2018-2020 Intel Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appli...
38.394958
80
0.668855
from __future__ import print_function import os import getpass from dmg_utils import storage_format from server_utils import ServerManager, ServerFailed, storage_prepare from command_utils import CommandFailure from apricot import TestWithServers class DaosAdminPrivTest(TestWithServers): def __init__(self, *ar...
true
true
08f625faab0d4828acd8788f3742012e6ee3f8ac
18,688
py
Python
pypy/lib/pyrepl/reader.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
1
2019-05-27T00:58:46.000Z
2019-05-27T00:58:46.000Z
pypy/lib/pyrepl/reader.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
pypy/lib/pyrepl/reader.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
# Copyright 2000-2004 Michael Hudson mwh@python.net # # All Rights Reserved # # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appear in all copies and # that both ...
32.054889
77
0.53735
import types, unicodedata from pyrepl import commands from pyrepl import input def _make_unctrl_map(): uc_map = {} for c in map(unichr, range(256)): if unicodedata.category(c)[0] <> 'C': uc_map[c] = c for i in range(32): c = unichr(i) uc_map[c] = u'^' + unichr(ord('A') ...
false
true
08f62613920e776548e97333f74f73b89bfabaf3
661
py
Python
vaccinate/core/migrations/0121_source_location_match_history_location_can_be_null.py
MoralCode/vial
cdaaab053a9cf1cef40104a2cdf480b7932d58f7
[ "MIT" ]
7
2021-06-28T17:33:47.000Z
2022-02-12T21:54:59.000Z
vaccinate/core/migrations/0121_source_location_match_history_location_can_be_null.py
MoralCode/vial
cdaaab053a9cf1cef40104a2cdf480b7932d58f7
[ "MIT" ]
104
2021-06-17T21:25:30.000Z
2022-03-28T14:21:57.000Z
vaccinate/core/migrations/0121_source_location_match_history_location_can_be_null.py
MoralCode/vial
cdaaab053a9cf1cef40104a2cdf480b7932d58f7
[ "MIT" ]
1
2021-06-25T17:52:23.000Z
2021-06-25T17:52:23.000Z
# Generated by Django 3.2.1 on 2021-05-07 01:25 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0120_geography_fields"), ] operations = [ migrations.AlterField( model_name="sourceloca...
25.423077
61
0.582451
import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0120_geography_fields"), ] operations = [ migrations.AlterField( model_name="sourcelocationmatchhistory", name="new_match_l...
true
true
08f6263c615d18e3c89492f77d94a13c452539b8
16,873
py
Python
models/encoders.py
oguzserbetci/EffiCare
4a81b6ddcff6b3b7d37dd8a6a8cd0419d742709e
[ "MIT" ]
1
2020-12-27T23:01:37.000Z
2020-12-27T23:01:37.000Z
models/encoders.py
oguzserbetci/EffiCare
4a81b6ddcff6b3b7d37dd8a6a8cd0419d742709e
[ "MIT" ]
null
null
null
models/encoders.py
oguzserbetci/EffiCare
4a81b6ddcff6b3b7d37dd8a6a8cd0419d742709e
[ "MIT" ]
null
null
null
import torch import torch.nn from models.modules import * from utils import load_class class EventEncoder(nn.Module): def __init__(self, vocab, freeze_emb, emb_dim, include_time, n_bins): super().__init__() input_size = emb_dim input_size += n_bins if include_time: inp...
37.495556
230
0.54602
import torch import torch.nn from models.modules import * from utils import load_class class EventEncoder(nn.Module): def __init__(self, vocab, freeze_emb, emb_dim, include_time, n_bins): super().__init__() input_size = emb_dim input_size += n_bins if include_time: inp...
true
true
08f62763512cdaae57571955a77526da2b1551a1
415
py
Python
account/__init__.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
account/__init__.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
account/__init__.py
KieranSweeden/fol.io
a6f231e3f9fb96841387b04d72131470c5fc3239
[ "OLDAP-2.5", "OLDAP-2.4", "OLDAP-2.3" ]
null
null
null
""" Contains changes to default settings regarding the account app """ from django.apps import AppConfig DEFAULT_APP_CONFIG = 'account.__init__.AccountConfig' class AccountConfig(AppConfig): """ Changes the label for this app as the account name already exists within django. Without this, django will thr...
24.411765
62
0.73253
from django.apps import AppConfig DEFAULT_APP_CONFIG = 'account.__init__.AccountConfig' class AccountConfig(AppConfig): name = 'account' label = 'folio_account'
true
true
08f627e5a6a90e38b8922e351baf68a9c26c4e46
4,490
py
Python
cpmpy/tunapalooza.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
279
2015-01-10T09:55:35.000Z
2022-03-28T02:34:03.000Z
cpmpy/tunapalooza.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
10
2017-10-05T15:48:50.000Z
2021-09-20T12:06:52.000Z
cpmpy/tunapalooza.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
83
2015-01-20T03:44:00.000Z
2022-03-13T23:53:06.000Z
""" Tunalalooza puzzle (Dell Logic Puzzles) in cpmpy. http://brownbuffalo.sourceforge.net/TunapaloozaClues.html ''' Title: Tunapalooza Author: Eliot George Publication: Dell Logic Puzzles Issue: April, 1998 Page: 10 Stars: 2 Tim and Keri have a full day ahead for themselves as they plan to see and hear everything at...
38.050847
92
0.642094
from cpmpy import * import cpmpy.solvers import numpy as np from cpmpy_hakank import * def tunapalooza(): n = 4 rockband = list(range(n)) Ellyfish, Korrupt, Retread_Ed_and_the_Flat_Tires, Yellow_Reef = rockband genre = intvar(0,n-1,shape=n,name="genre") country, grunge, reggae, speed_metal = genre r...
true
true
08f628f82a6b3acb6acd374745f1f1f7dec960c0
51,012
py
Python
env/Lib/site-packages/pip/_vendor/distlib/locators.py
johncam11/liquid_dl
d2a3791d759a2fc1d8e8beb793c669c8ec5309b4
[ "MIT" ]
90
2017-08-24T18:57:21.000Z
2022-03-04T01:58:56.000Z
env/Lib/site-packages/pip/_vendor/distlib/locators.py
johncam11/liquid_dl
d2a3791d759a2fc1d8e8beb793c669c8ec5309b4
[ "MIT" ]
22
2017-09-05T10:19:20.000Z
2021-06-10T18:09:48.000Z
env/Lib/site-packages/pip/_vendor/distlib/locators.py
johncam11/liquid_dl
d2a3791d759a2fc1d8e8beb793c669c8ec5309b4
[ "MIT" ]
11
2017-09-05T18:24:37.000Z
2020-06-11T18:13:45.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except Impo...
39.728972
95
0.535149
import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except ImportError: import dummy_threading as threading import zlib from . import DistlibException from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url, ...
true
true
08f629c5c6591e3848cc1fee19bf807a56ac9c31
190
py
Python
qiskit/converters/__init__.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
2
2021-12-20T05:19:44.000Z
2021-12-20T05:21:48.000Z
qiskit/converters/__init__.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
null
null
null
qiskit/converters/__init__.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
1
2021-12-20T05:20:35.000Z
2021-12-20T05:20:35.000Z
from .circuit_to_gate import circuit_to_gate from .dag_to_circuit import dag_to_circuit from .circuit_to_dag import circuit_to_dag from .circuit_to_instruction import circuit_to_instruction
38
58
0.894737
from .circuit_to_gate import circuit_to_gate from .dag_to_circuit import dag_to_circuit from .circuit_to_dag import circuit_to_dag from .circuit_to_instruction import circuit_to_instruction
true
true
08f62b2a6328c3384e69a8db240e654c9551868b
2,960
py
Python
OverloadingFixed/_main/_metaclasses/GenericWrapperMeta/main.py
stupidlogic/overloading.py
08e8d7648c76c10728c400b72bbc55aaec662352
[ "MIT" ]
null
null
null
OverloadingFixed/_main/_metaclasses/GenericWrapperMeta/main.py
stupidlogic/overloading.py
08e8d7648c76c10728c400b72bbc55aaec662352
[ "MIT" ]
null
null
null
OverloadingFixed/_main/_metaclasses/GenericWrapperMeta/main.py
stupidlogic/overloading.py
08e8d7648c76c10728c400b72bbc55aaec662352
[ "MIT" ]
1
2021-09-01T18:39:07.000Z
2021-09-01T18:39:07.000Z
class GenericWrapperMeta(type): def __new__(mcs, name, bases, attrs, type_=None, base=None, simplify=False): cls = super().__new__(mcs, name, bases, attrs) if type_ is None: return cls if base is None: base = find_base_generic(type_) if simplify: ...
35.662651
82
0.547973
class GenericWrapperMeta(type): def __new__(mcs, name, bases, attrs, type_=None, base=None, simplify=False): cls = super().__new__(mcs, name, bases, attrs) if type_ is None: return cls if base is None: base = find_base_generic(type_) if simplify: ...
true
true
08f62b45edb2e26d188b4ff7976bf603a1ba8b8d
1,841
py
Python
ejemplos/ejemplo3.py
gmg-utn/elementos_finitos
5f8b11886d94d926fb358ad6344b079c5cb63e4e
[ "CC0-1.0" ]
null
null
null
ejemplos/ejemplo3.py
gmg-utn/elementos_finitos
5f8b11886d94d926fb358ad6344b079c5cb63e4e
[ "CC0-1.0" ]
null
null
null
ejemplos/ejemplo3.py
gmg-utn/elementos_finitos
5f8b11886d94d926fb358ad6344b079c5cb63e4e
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Ejemplo 3: aproximación de una función Jupyter notebook autor: Ramiro Irastorza """ from __future__ import print_function import numpy as np #importo numpy y lo denomino np import matplotlib.pyplot as plt #Definimos la función sombrero def phi(x,xi,i): hi ...
26.3
111
0.521999
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt def phi(x,xi,i): hi = xi[1]-xi[0] f = np.zeros_like(x) for m in range(len(x)): if i == 0: if xi[i] <= x[m] < xi[i+1]: f[m] = (xi[i+1]-x[m])/(xi[i+1]-xi[i]) else: ...
true
true
08f62bad06d9e92c5d48dd330a22fe5d4b0387b3
14,015
py
Python
doc/sphinx/source/conf.py
jvegasbsc/ESMValTool
792dd98a07b227779dc5733270b01c6502a784ed
[ "Apache-2.0" ]
null
null
null
doc/sphinx/source/conf.py
jvegasbsc/ESMValTool
792dd98a07b227779dc5733270b01c6502a784ed
[ "Apache-2.0" ]
null
null
null
doc/sphinx/source/conf.py
jvegasbsc/ESMValTool
792dd98a07b227779dc5733270b01c6502a784ed
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # ESMValTool documentation build configuration file, created by # sphinx-quickstart on Tue Jun 2 11:34:13 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
31.565315
126
0.693115
import os import sys from datetime import datetime from pathlib import Path root = Path(__file__).absolute().parent.parent.parent.parent sys.path.insert(0, str(root)) from esmvaltool import __version__ on_rtd = os.environ.get("READTHEDOCS", None) == "True" rtd_version = os.environ.get("READTHEDOCS_VERSION", "late...
true
true
08f62be12e15806cb80009d90855335e4b7da8af
791
py
Python
aiosqlite/__init__.py
dmitrypolo/aiosqlite
94d9d9fce9480ab3d763ece4604d36323dc3b764
[ "MIT" ]
null
null
null
aiosqlite/__init__.py
dmitrypolo/aiosqlite
94d9d9fce9480ab3d763ece4604d36323dc3b764
[ "MIT" ]
null
null
null
aiosqlite/__init__.py
dmitrypolo/aiosqlite
94d9d9fce9480ab3d763ece4604d36323dc3b764
[ "MIT" ]
null
null
null
# Copyright 2018 John Reese # Licensed under the MIT license """asyncio bridge to sqlite3""" from sqlite3 import ( # pylint: disable=redefined-builtin register_adapter, register_converter, sqlite_version, sqlite_version_info, Row, Warning, Error, DatabaseError, IntegrityError, ...
18.833333
58
0.663717
from sqlite3 import ( register_adapter, register_converter, sqlite_version, sqlite_version_info, Row, Warning, Error, DatabaseError, IntegrityError, ProgrammingError, OperationalError, NotSupportedError, ) from .core import connect, Connection, Cursor __version__ = "...
true
true
08f62c875bdea5884360318d3c95781a1bffce86
4,682
py
Python
python_package/2_develop_package/distributions/Binomialdistribution.py
RaoulMa/NeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
1
2020-04-29T10:38:19.000Z
2020-04-29T10:38:19.000Z
python_package/2_develop_package/distributions/Binomialdistribution.py
RaoulMa/BasicNeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
null
null
null
python_package/2_develop_package/distributions/Binomialdistribution.py
RaoulMa/BasicNeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
null
null
null
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution std...
24.259067
87
0.495728
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): def __init__(self, prob=.5, size=20): self.n = size self.p = prob Distribution.__init__(self, self.calculate_mean(), self.calculate_std...
true
true
08f62cdf3aa197021db02b11040de3c6fea4d155
3,410
py
Python
examples/chart_column.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_column.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_column.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
1
2015-03-22T12:08:05.000Z
2015-03-22T12:08:05.000Z
####################################################################### # # An example of creating Excel Column charts with Python and XlsxWriter. # # Copyright 2013-2015, John McNamara, jmcnamara@cpan.org # import xlsxwriter workbook = xlsxwriter.Workbook('chart_column.xlsx') worksheet = workbook.add_worksheet() bold...
28.416667
77
0.588856
import xlsxwriter workbook = xlsxwriter.Workbook('chart_column.xlsx') worksheet = workbook.add_worksheet() bold = workbook.add_format({'bold': 1}) headings = ['Number', 'Batch 1', 'Batch 2'] data = [ [2, 3, 4, 5, 6, 7], [10, 40, 50, 20, 10, 50], [30, 60, 70, 50, 40, 30], ] worksheet.write_row('A1', headi...
true
true
08f62d8b8cf95c767fcf302180fb9dec0fa6fdf8
26
py
Python
flaskapp/blueprints/questions/__init__.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
6
2020-08-02T20:58:34.000Z
2022-03-23T20:33:20.000Z
flaskapp/blueprints/questions/__init__.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
209
2020-02-12T17:09:15.000Z
2021-06-03T20:34:35.000Z
flaskapp/blueprints/questions/__init__.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
54
2020-02-18T14:54:35.000Z
2021-09-05T06:31:12.000Z
"""questions blueprint"""
13
25
0.692308
true
true
08f62e0825b254c3ce6c010769a06aa902dfe46d
1,357
py
Python
scripts/gh_parse_issue.py
Theta-Dev/Spotify-Gender-Ex
4e5360f115cb3302397b8e1ad1b11ad96b887ad2
[ "MIT" ]
1
2022-02-05T16:40:13.000Z
2022-02-05T16:40:13.000Z
scripts/gh_parse_issue.py
Theta-Dev/Spotify-Gender-Ex
4e5360f115cb3302397b8e1ad1b11ad96b887ad2
[ "MIT" ]
31
2021-06-17T11:59:33.000Z
2022-03-19T07:05:18.000Z
scripts/gh_parse_issue.py
Theta-Dev/Spotify-Gender-Ex
4e5360f115cb3302397b8e1ad1b11ad96b887ad2
[ "MIT" ]
null
null
null
import json import os import click from spotify_gender_ex import gh_issue from spotify_gender_ex.genderex import GenderEx from spotify_gender_ex.replacement_table import ReplacementTable @click.command() @click.argument('replacement_table', type=click.Path(True)) def run(replacement_table): event_json = os.envi...
29.5
104
0.726603
import json import os import click from spotify_gender_ex import gh_issue from spotify_gender_ex.genderex import GenderEx from spotify_gender_ex.replacement_table import ReplacementTable @click.command() @click.argument('replacement_table', type=click.Path(True)) def run(replacement_table): event_json = os.envi...
true
true
08f62e3648b8e2c6a7a80df95759a7b019ba0355
4,979
py
Python
parlai/chat_service/core/agents.py
jakeane/ParlAI
7bea8dce02b69a537a9e2a642f86e595deec5736
[ "MIT" ]
null
null
null
parlai/chat_service/core/agents.py
jakeane/ParlAI
7bea8dce02b69a537a9e2a642f86e595deec5736
[ "MIT" ]
null
null
null
parlai/chat_service/core/agents.py
jakeane/ParlAI
7bea8dce02b69a537a9e2a642f86e595deec5736
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time from abc import ABC, abstractmethod from queue import Queue from parlai.core.agents import Agent class Cha...
30.734568
84
0.602932
import time from abc import ABC, abstractmethod from queue import Queue from parlai.core.agents import Agent class ChatServiceAgent(Agent, ABC): def __init__(self, opt, manager, receiver_id, task_id): super().__init__(opt) self.manager = manager self.id = receiver_id self.task_i...
true
true
08f62e84ebb6641c4efd6db0b68324390bc8e3c6
2,123
py
Python
knn.py
haoyudong-97/tg2019task
4f31968cc49105d13bc95487136dc3ae986bf4d1
[ "MIT" ]
null
null
null
knn.py
haoyudong-97/tg2019task
4f31968cc49105d13bc95487136dc3ae986bf4d1
[ "MIT" ]
null
null
null
knn.py
haoyudong-97/tg2019task
4f31968cc49105d13bc95487136dc3ae986bf4d1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import warnings import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import HashingVectorizer from sklearn.metrics.pairwise import cosine_dist...
30.768116
112
0.659915
import os import warnings import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import HashingVectorizer from sklearn.metrics.pairwise import cosine_distances def read_explan...
true
true
08f62e9fb70b35bccbe5f09eab1852d8a1f488fa
798
py
Python
PreprocessData/all_class_files/AgreeAction.py
wkid-neu/Schema
4854720a15894dd814691a55e03329ecbbb6f558
[ "MIT" ]
3
2021-11-06T12:29:05.000Z
2022-03-22T12:48:55.000Z
PreprocessData/all_class_files/AgreeAction.py
DylanNEU/Schema
4854720a15894dd814691a55e03329ecbbb6f558
[ "MIT" ]
null
null
null
PreprocessData/all_class_files/AgreeAction.py
DylanNEU/Schema
4854720a15894dd814691a55e03329ecbbb6f558
[ "MIT" ]
1
2021-11-06T12:29:12.000Z
2021-11-06T12:29:12.000Z
from PreprocessData.all_class_files.ReactAction import ReactAction import global_data class AgreeAction(ReactAction): def __init__(self, additionalType=None, alternateName=None, description=None, disambiguatingDescription=None, identifier=None, image=None, mainEntityOfPage=None, name=None, potentialAction=No...
99.75
385
0.808271
from PreprocessData.all_class_files.ReactAction import ReactAction import global_data class AgreeAction(ReactAction): def __init__(self, additionalType=None, alternateName=None, description=None, disambiguatingDescription=None, identifier=None, image=None, mainEntityOfPage=None, name=None, potentialAction=No...
true
true
08f62f41922ab4ce4d93ae6daf8f7dca62d9b961
598
py
Python
converter.py
shaswat01/Gif-Creator
6c8898c670295a2422d70d776a0e8996cf7c7cb7
[ "MIT" ]
null
null
null
converter.py
shaswat01/Gif-Creator
6c8898c670295a2422d70d776a0e8996cf7c7cb7
[ "MIT" ]
null
null
null
converter.py
shaswat01/Gif-Creator
6c8898c670295a2422d70d776a0e8996cf7c7cb7
[ "MIT" ]
null
null
null
import imageio import os clip = os.path.abspath('video.mp4') # print(clip) def gifMaker(inputPath, targetFormat): outputPath = os.path.splitext(inputPath)[0] + targetFormat #To get the name of file and to put the deired format name to it. print(f"Converting {inputPath} \n to {outputPath}") reader = imag...
24.916667
128
0.683946
import imageio import os clip = os.path.abspath('video.mp4') def gifMaker(inputPath, targetFormat): outputPath = os.path.splitext(inputPath)[0] + targetFormat print(f"Converting {inputPath} \n to {outputPath}") reader = imageio.get_reader(inputPath) fps = reader.get_meta_data()['fps'] writer = ...
true
true
08f6308679f87a70f608cef00b981d79168a4e55
923
py
Python
src/config.py
TomerShech/Binventor
b009fd6ac139ec1c282d17dddf85695a9f941e11
[ "MIT" ]
30
2019-09-20T21:33:54.000Z
2020-02-29T19:03:16.000Z
src/config.py
TomerShech/Binventor
b009fd6ac139ec1c282d17dddf85695a9f941e11
[ "MIT" ]
1
2019-10-02T21:02:30.000Z
2019-10-04T00:52:34.000Z
src/config.py
TomerShech/Binventor
b009fd6ac139ec1c282d17dddf85695a9f941e11
[ "MIT" ]
2
2019-09-21T19:54:43.000Z
2019-10-11T17:51:35.000Z
import json with open("config.json") as config_file: config = json.load(config_file) class Config: SECRET_KEY = config.get("SECRET_KEY") GMAIL_USERNAME = config.get("GMAIL_USERNAME") def __init__(self, app): self.app = app def config_db(self): self.app.config["SQLALCHEMY_DATABASE_...
35.5
77
0.672806
import json with open("config.json") as config_file: config = json.load(config_file) class Config: SECRET_KEY = config.get("SECRET_KEY") GMAIL_USERNAME = config.get("GMAIL_USERNAME") def __init__(self, app): self.app = app def config_db(self): self.app.config["SQLALCHEMY_DATABASE_...
true
true
08f631639aecfabdbb43dba481d8665fef09a1f5
600
py
Python
trade_remedies_caseworker/core/templatetags/link_or_not.py
uktrade/trade-remedies-caseworker
fece9fde3cb241d96cbc1aaf7188d976f8621600
[ "MIT" ]
1
2020-08-27T09:53:00.000Z
2020-08-27T09:53:00.000Z
trade_remedies_caseworker/core/templatetags/link_or_not.py
uktrade/trade-remedies-caseworker
fece9fde3cb241d96cbc1aaf7188d976f8621600
[ "MIT" ]
7
2020-10-14T16:23:42.000Z
2021-09-24T14:18:47.000Z
trade_remedies_caseworker/core/templatetags/link_or_not.py
uktrade/trade-remedies-caseworker
fece9fde3cb241d96cbc1aaf7188d976f8621600
[ "MIT" ]
null
null
null
from core.templatetags import register from django.utils.safestring import mark_safe """ Template tag to display a link - if the given path is different from the current url - or a simple span otherwise Usage: {% link_or_not <title> <path> %} """ @register.simple_tag(takes_context=True) def link_or_not(context, ...
30
86
0.703333
from core.templatetags import register from django.utils.safestring import mark_safe @register.simple_tag(takes_context=True) def link_or_not(context, title, path): request = context.get("request") target = request.build_absolute_uri(path) if target == request.build_absolute_uri(request.path): re...
true
true
08f631f3ed7df5643ea61838e55cf888ebc26efa
1,480
py
Python
examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
1
2018-09-24T14:04:48.000Z
2018-09-24T14:04:48.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
38.947368
76
0.77973
from facebook_business.adobjects.productcatalog import ProductCatalog from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<PRODUCT_CATALOG_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'hotel_catalog...
true
true
08f6333e60942b988431a76f55136c450b117679
9,102
py
Python
archiver/parse.py
erik-h/bookmark-archiver
5260de403ebdcb4fac6d245ac8c4e9102902bd1a
[ "MIT" ]
6
2019-03-31T01:42:28.000Z
2021-06-05T14:51:27.000Z
archiver/parse.py
erik-h/bookmark-archiver
5260de403ebdcb4fac6d245ac8c4e9102902bd1a
[ "MIT" ]
null
null
null
archiver/parse.py
erik-h/bookmark-archiver
5260de403ebdcb4fac6d245ac8c4e9102902bd1a
[ "MIT" ]
null
null
null
# coding: utf-8 """ Everything related to parsing links from bookmark services. For a list of supported services, see the README.md. For examples of supported files see examples/. Parsed link schema: { 'url': 'https://example.com/example/?abc=123&xyc=345#lmnop', 'domain': 'example.com', 'base_url': 'exam...
36.701613
264
0.547682
import re import json import xml.etree.ElementTree as etree from datetime import datetime from util import ( domain, base_url, str_between, get_link_type, ) def get_parsers(file): return { 'pocket': parse_pocket_export, 'pinboard': parse_json_export, 'bookmarks': parse...
true
true
08f633d1fb75adcfef047b797d2295bff522bbba
5,385
py
Python
torch/autograd/forward_ad.py
ljhOfGithub/pytorch
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
[ "Intel" ]
2
2020-03-13T06:57:49.000Z
2020-05-17T04:18:14.000Z
torch/autograd/forward_ad.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
1
2019-07-23T15:23:32.000Z
2019-07-23T15:32:23.000Z
torch/autograd/forward_ad.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
2
2019-07-23T14:37:31.000Z
2019-07-23T14:47:13.000Z
import torch from .grad_mode import _DecoratorContextManager from collections import namedtuple from typing import Any # Global variable used to make the python API simpler to use _current_level = -1 def enter_dual_level(): r"""Function that can be used to enter a new forward grad level. This level can be us...
36.632653
114
0.662767
import torch from .grad_mode import _DecoratorContextManager from collections import namedtuple from typing import Any _current_level = -1 def enter_dual_level(): global _current_level new_level = torch._C._enter_dual_level() if new_level != _current_level + 1: raise RuntimeError("Entering a new ...
true
true
08f635a61aaf599b8199a078e1e6edb0defe252e
3,023
py
Python
LearnTF(Keras)/tensorflow2_training_lower_API.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
2
2021-08-25T01:13:29.000Z
2021-10-10T14:49:59.000Z
LearnTF(Keras)/tensorflow2_training_lower_API.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
null
null
null
LearnTF(Keras)/tensorflow2_training_lower_API.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
null
null
null
import time import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import numpy as np # Prepare the training dataset. batch_size = 64 (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data() x_train = np.reshape(x_train, (-1, 784)) x_test = np.reshape(x_test, (-1, 7...
30.23
73
0.699967
import time import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import numpy as np batch_size = 64 (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data() x_train = np.reshape(x_train, (-1, 784)) x_test = np.reshape(x_test, (-1, 784)) x_val = x_train[-10000:] y...
true
true
08f6362c6803f6e1f74fe9533fa8ac15d7c21960
9,524
py
Python
nesmdb/convert.py
duhaime/nesmdb
d56b176cebbcf91b0069fc529f0884768acf42e8
[ "MIT" ]
408
2018-06-07T22:53:16.000Z
2022-03-23T09:48:57.000Z
nesmdb/convert.py
duhaime/nesmdb
d56b176cebbcf91b0069fc529f0884768acf42e8
[ "MIT" ]
7
2018-07-05T23:51:40.000Z
2022-03-04T07:54:04.000Z
nesmdb/convert.py
duhaime/nesmdb
d56b176cebbcf91b0069fc529f0884768acf42e8
[ "MIT" ]
36
2018-06-07T22:59:16.000Z
2022-03-01T01:37:05.000Z
import cPickle as pickle import os import numpy as np from scipy.io.wavfile import write as wavwrite from scipy.misc import imsave as imwrite import nesmdb.vgm import nesmdb.score def _verify_type(fp, expected): fn = os.path.basename(fp) num_ext = expected.count('.') failed = False try: fp_exts = fn.rs...
26.828169
115
0.680911
import cPickle as pickle import os import numpy as np from scipy.io.wavfile import write as wavwrite from scipy.misc import imsave as imwrite import nesmdb.vgm import nesmdb.score def _verify_type(fp, expected): fn = os.path.basename(fp) num_ext = expected.count('.') failed = False try: fp_exts = fn.rs...
false
true
08f636826787e43a6df736fa5312182a82001316
6,738
py
Python
lib/m2ee/util.py
diogomatsubara/cf-mendix-buildpack
48ab483585785e55dc7b94e2a8017fa70f0ef4a9
[ "Apache-2.0" ]
null
null
null
lib/m2ee/util.py
diogomatsubara/cf-mendix-buildpack
48ab483585785e55dc7b94e2a8017fa70f0ef4a9
[ "Apache-2.0" ]
1
2021-02-08T20:38:26.000Z
2021-02-08T20:38:26.000Z
lib/m2ee/util.py
diogomatsubara/cf-mendix-buildpack
48ab483585785e55dc7b94e2a8017fa70f0ef4a9
[ "Apache-2.0" ]
1
2020-05-13T15:56:49.000Z
2020-05-13T15:56:49.000Z
# # Copyright (c) 2009-2015, Mendix bv # All Rights Reserved. # # http://www.mendix.com/ # import os import shutil import subprocess import socket import http.client from .log import logger try: import readline # allow - in filenames we're completing without messing up completion readline.set_completer_de...
35.650794
77
0.614426
import os import shutil import subprocess import socket import http.client from .log import logger try: import readline readline.set_completer_delims( readline.get_completer_delims().replace('-', '') ) except ImportError: pass try: import httplib2 except ImportError: logger.critic...
true
true
08f636f59a1cfd22d212929ea9ae8312c0e1c83b
413
py
Python
web/carts/migrations/0002_cart_shipping_charge.py
Arvind-4/E-Commerce
d7d2f395a4e64a683dd73fed29c627a2210f479a
[ "MIT" ]
null
null
null
web/carts/migrations/0002_cart_shipping_charge.py
Arvind-4/E-Commerce
d7d2f395a4e64a683dd73fed29c627a2210f479a
[ "MIT" ]
null
null
null
web/carts/migrations/0002_cart_shipping_charge.py
Arvind-4/E-Commerce
d7d2f395a4e64a683dd73fed29c627a2210f479a
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2022-02-01 08:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('carts', '0001_initial'), ] operations = [ migrations.AddField( model_name='cart', name='shipping_charge', ...
21.736842
85
0.607748
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('carts', '0001_initial'), ] operations = [ migrations.AddField( model_name='cart', name='shipping_charge', field=models.DecimalField(decimal_places=2, de...
true
true
08f6375ebf5c28f29972ded3c9fab433d05b2fb9
1,254
py
Python
1654/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
2
2020-01-14T07:27:25.000Z
2020-02-12T07:49:58.000Z
1654/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
1
2020-01-14T07:29:30.000Z
2021-11-28T11:29:08.000Z
1654/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
null
null
null
import sys sys.setrecursionlimit(100000) def sol(): input = sys.stdin.readline K, N = map(int, input().split()) lines = [int(input()) for _ in range(K)] print(binary_search_with_recursion(lines, N, 1, sum(lines) // N)) print(binary_search_without_recursion(lines, N, 1, sum(lines) // N)) def bin...
27.26087
72
0.582137
import sys sys.setrecursionlimit(100000) def sol(): input = sys.stdin.readline K, N = map(int, input().split()) lines = [int(input()) for _ in range(K)] print(binary_search_with_recursion(lines, N, 1, sum(lines) // N)) print(binary_search_without_recursion(lines, N, 1, sum(lines) // N)) def bin...
true
true
08f63786b3f06000c6fa1f00af849cbf88b225b9
10,877
py
Python
perfkitbenchmarker/providers/gcp/gcp_dpb_dataproc.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/providers/gcp/gcp_dpb_dataproc.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
1
2021-09-09T07:43:25.000Z
2021-09-09T10:47:56.000Z
perfkitbenchmarker/providers/gcp/gcp_dpb_dataproc.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.256667
80
0.683001
import datetime import json import logging from typing import Any, Dict, Optional from absl import flags from perfkitbenchmarker import dpb_service from perfkitbenchmarker import errors from perfkitbenchmarker import flag_util from perfkitbenchmarker.linux_packages import aws_credentials from perfkitbenchmarker.provi...
true
true
08f637c5e07ca1d22c08024828282408e1f0da8f
22,616
py
Python
qa/L0_sequence_stress/sequence_stress.py
sinaure/server
e214447ae534a472bf8aaeff0e8024a3dc936ad2
[ "BSD-3-Clause" ]
1
2020-12-25T02:01:38.000Z
2020-12-25T02:01:38.000Z
qa/L0_sequence_stress/sequence_stress.py
sinaure/server
e214447ae534a472bf8aaeff0e8024a3dc936ad2
[ "BSD-3-Clause" ]
null
null
null
qa/L0_sequence_stress/sequence_stress.py
sinaure/server
e214447ae534a472bf8aaeff0e8024a3dc936ad2
[ "BSD-3-Clause" ]
1
2021-12-17T03:07:54.000Z
2021-12-17T03:07:54.000Z
# Copyright (c) 2019-2020, NVIDIA CORPORATION. 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 list of conditi...
37.01473
83
0.528652
import sys sys.path.append("../common") import argparse from builtins import range from builtins import str from future.utils import iteritems import os import time import threading import traceback import numpy as np import test_util as tu from functools import partial import tritongrpcclient as grpcclient from trit...
true
true
08f639f217db137e5b272c9ab6426c4f9bcdb09b
2,006
py
Python
examples/python/ina132.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
619
2015-01-14T23:50:18.000Z
2019-11-08T14:04:33.000Z
examples/python/ina132.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
576
2015-01-02T09:55:14.000Z
2019-11-12T15:31:10.000Z
examples/python/ina132.py
moredu/upm
d6f76ff8c231417666594214679c49399513112e
[ "MIT" ]
494
2015-01-14T18:33:56.000Z
2019-11-07T10:08:15.000Z
#!/usr/bin/env python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
37.148148
73
0.742273
from __future__ import print_function import time, sys, signal, atexit from upm import pyupm_ina132 as upmIna132 def main(): myDifferentialAmplifier = upmIna132.INA132(0) def SIGINTHandler(signum, frame): raise SystemExit def exitHandler(): print("Exiting") ...
true
true
08f63b0179db20ae0daa63eed8303cc501aeb395
5,272
py
Python
pandas/io/tests/generate_legacy_pickles.py
olgabot/pandas
286811a2775c9b5ca1c30086b1950dd1060ecf68
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
26
2018-02-14T23:52:58.000Z
2021-08-16T13:50:03.000Z
pandas/io/tests/generate_legacy_pickles.py
josericardo/pandas
fe9aa125c19ce2b22a0c4aabedd68b24df6cb98e
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/io/tests/generate_legacy_pickles.py
josericardo/pandas
fe9aa125c19ce2b22a0c4aabedd68b24df6cb98e
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
10
2018-08-13T19:38:39.000Z
2020-04-19T03:02:00.000Z
""" self-contained to write legacy pickle files """ from __future__ import print_function def _create_sp_series(): import numpy as np from pandas import SparseSeries nan = np.nan # nan-based arr = np.arange(15, dtype=np.float64) index = np.arange(15) arr[7:12] = nan arr[-1:] = nan ...
35.863946
115
0.519347
from __future__ import print_function def _create_sp_series(): import numpy as np from pandas import SparseSeries nan = np.nan arr = np.arange(15, dtype=np.float64) index = np.arange(15) arr[7:12] = nan arr[-1:] = nan bseries = SparseSeries(arr, kind='block') bseries.name = ...
true
true
08f63ea2968414f9df5ef85cfb8aa6c296dac68d
6,780
tac
Python
docs/core/howto/tutorial/listings/finger/finger19.tac
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
null
null
null
docs/core/howto/tutorial/listings/finger/finger19.tac
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
3
2015-08-20T09:05:57.000Z
2015-11-10T08:30:51.000Z
docs/core/howto/tutorial/listings/finger/finger19.tac
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
null
null
null
# Do everything properly, and componentize from twisted.application import internet, service, strports from twisted.internet import protocol, reactor, defer, endpoints from twisted.words.protocols import irc from twisted.protocols import basic from twisted.python import components from twisted.web import resource, serv...
26.177606
84
0.655015
from twisted.application import internet, service, strports from twisted.internet import protocol, reactor, defer, endpoints from twisted.words.protocols import irc from twisted.protocols import basic from twisted.python import components from twisted.web import resource, server, static, xmlrpc from zope.interface impo...
true
true
08f63f0f074d5ed665b51a0d4d977c83c88af795
773
py
Python
server/infrastructure/flaskSetup.py
wazatoki/IotLogger
9baec9bff7762fbc0d279207fabf8902d9650a2d
[ "MIT" ]
null
null
null
server/infrastructure/flaskSetup.py
wazatoki/IotLogger
9baec9bff7762fbc0d279207fabf8902d9650a2d
[ "MIT" ]
7
2021-03-11T00:57:20.000Z
2022-02-27T07:53:56.000Z
server/infrastructure/flaskSetup.py
wazatoki/IotLogger
9baec9bff7762fbc0d279207fabf8902d9650a2d
[ "MIT" ]
null
null
null
import os from flask import Flask, jsonify, request from flask_cors import CORS from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate url_prefix = "/api/" class Config(object): SQLALCHEMY_DATABASE_URI = 'sqlite:///../db/IotLogger.sqlite' SECRET_KE...
25.766667
67
0.717982
import os from flask import Flask, jsonify, request from flask_cors import CORS from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate url_prefix = "/api/" class Config(object): SQLALCHEMY_DATABASE_URI = 'sqlite:///../db/IotLogger.sqlite' SECRET_KE...
true
true
08f63fd82ccc54ff537a473737ad402e0c048081
5,300
py
Python
integration-tests/integration_tests/integration_tests/end_to_end_tests/int_forward_reliable_messaging_pattern_tests.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
1
2020-05-20T12:26:46.000Z
2020-05-20T12:26:46.000Z
integration-tests/integration_tests/integration_tests/end_to_end_tests/int_forward_reliable_messaging_pattern_tests.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
41
2020-05-18T12:49:29.000Z
2022-02-28T13:34:01.000Z
integration-tests/integration_tests/integration_tests/end_to_end_tests/int_forward_reliable_messaging_pattern_tests.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
6
2020-06-04T18:59:25.000Z
2021-12-16T16:42:32.000Z
""" Provides tests around the Forward Reliable workflow, including sync-async wrapping """ from unittest import TestCase from integration_tests.amq.amq_message_assertor import AMQMessageAssertor from integration_tests.amq.mhs_inbound_queue import MHS_INBOUND_QUEUE from integration_tests.assertors.assert_with_retries i...
46.086957
171
0.689811
from unittest import TestCase from integration_tests.amq.amq_message_assertor import AMQMessageAssertor from integration_tests.amq.mhs_inbound_queue import MHS_INBOUND_QUEUE from integration_tests.assertors.assert_with_retries import AssertWithRetries from integration_tests.db.db_wrapper_factory import MHS_STATE_TABLE...
true
true
08f64065d97a784b81fb0784127cd9b9ca9554e6
143
py
Python
ssm/arhmm/__init__.py
lindermanlab/ssm-jax-refactor
879243a5b649daeacea3467fab09b5a405cb4ff9
[ "MIT" ]
19
2021-12-02T08:40:57.000Z
2022-03-08T15:23:37.000Z
ssm/arhmm/__init__.py
lindermanlab/ssm-jax-refactor
879243a5b649daeacea3467fab09b5a405cb4ff9
[ "MIT" ]
17
2021-11-20T00:21:58.000Z
2022-02-25T11:05:53.000Z
ssm/arhmm/__init__.py
lindermanlab/ssm-jax-refactor
879243a5b649daeacea3467fab09b5a405cb4ff9
[ "MIT" ]
1
2022-03-02T05:55:16.000Z
2022-03-02T05:55:16.000Z
from ssm.arhmm.base import AutoregressiveHMM from ssm.arhmm.emissions import AutoregressiveEmissions from ssm.arhmm.models import GaussianARHMM
47.666667
55
0.881119
from ssm.arhmm.base import AutoregressiveHMM from ssm.arhmm.emissions import AutoregressiveEmissions from ssm.arhmm.models import GaussianARHMM
true
true
08f642e3186116751f91a8e0c06040f06426a187
5,467
py
Python
google/ads/google_ads/v6/services/transports/third_party_app_analytics_link_service_grpc_transport.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/services/transports/third_party_app_analytics_link_service_grpc_transport.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/services/transports/third_party_app_analytics_link_service_grpc_transport.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
38.5
154
0.649716
import google.api_core.grpc_helpers from google.ads.google_ads.v6.proto.services import third_party_app_analytics_link_service_pb2_grpc class ThirdPartyAppAnalyticsLinkServiceGrpcTransport(object): _OAUTH_SCOPES = ( 'https://www.googleapis.com/auth/adwords', ) def __init__(self, channe...
true
true
08f642f6642cd81fd68631e29a041e1ced02a13b
2,123
py
Python
pareto/tests/test_packaging.py
MAZamarripa/project-pareto
610d1f024ffdeb3b358303058a53d5b5097dfa5b
[ "BSD-3-Clause-LBNL" ]
4
2022-01-28T17:39:33.000Z
2022-02-25T20:15:53.000Z
pareto/tests/test_packaging.py
MAZamarripa/project-pareto
610d1f024ffdeb3b358303058a53d5b5097dfa5b
[ "BSD-3-Clause-LBNL" ]
24
2021-11-12T14:31:52.000Z
2022-03-29T19:02:34.000Z
pareto/tests/test_packaging.py
MAZamarripa/project-pareto
610d1f024ffdeb3b358303058a53d5b5097dfa5b
[ "BSD-3-Clause-LBNL" ]
5
2021-11-10T15:27:16.000Z
2022-02-25T16:53:38.000Z
##################################################################################################### # PARETO was produced under the DOE Produced Water Application for Beneficial Reuse Environmental # Impact and Treatment Optimization (PARETO), and is copyright (c) 2021 by the software owners: The # Regents of the Uni...
43.326531
102
0.687706
from pareto import __version__ import pytest from packaging.version import Version class TestVersion: @pytest.fixture def version(self) -> str: return __version__ @pytest.fixture def parsed_version(self, version) -> Version: return Version(version) @pytest.fixture def normal...
true
true
08f6432e2ea73aff6f493ed75a0a05ac49775712
1,557
py
Python
var/spack/repos/builtin/packages/r-a4base/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/r-a4base/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/r-a4base/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RA4base(RPackage): """Automated Affymetrix Array Analysis Base Package Base utility f...
43.25
75
0.695568
from spack import * class RA4base(RPackage): homepage = "https://bioconductor.org/packages/a4Base" git = "https://git.bioconductor.org/packages/a4Base.git" version('1.38.0', commit='4add242fa9c62795aca5b0dfca34a43484c5aa82') version('1.32.0', commit='8a1e15d25494c54db8c1de5dbbd69e628569e3d7') ...
true
true
08f6449430a3057a618fce10250105b8a9def001
2,145
py
Python
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_procedure_put.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_procedure_put.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_procedure_put.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2018, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## import json impor...
34.047619
76
0.593939
import json import uuid from pgadmin.browser.server_groups.servers.databases.tests import utils as \ database_utils from pgadmin.utils.route import BaseTestGenerator from regression.python_test_utils import test_utils as utils from . import utils as funcs_utils class ProcedurePutTestCase(BaseTestGenerator): ...
true
true
08f6454f1be4f76217991f14ee8362c445452ed6
1,718
py
Python
server/src/routes/api/pathways.py
CollinStark/metamdb
6df29f0b0ab1362904f3efb42a651ee433f517df
[ "MIT" ]
1
2021-05-27T13:43:08.000Z
2021-05-27T13:43:08.000Z
server/src/routes/api/pathways.py
metamdb/metamdb
f884cfb604007ed0bbebbd76ee353fa14797b5fb
[ "MIT" ]
1
2021-06-11T09:35:24.000Z
2021-06-11T09:35:24.000Z
server/src/routes/api/pathways.py
metamdb/metamdb
f884cfb604007ed0bbebbd76ee353fa14797b5fb
[ "MIT" ]
null
null
null
from typing import Optional from flask import Blueprint, json, jsonify, request from src.errors import handler from src.models.casm import Pathway, PathwayJsonSchema, PathwayReactionsSchema pathways_blueprint = Blueprint('pathways', __name__, url_prefix='/...
29.118644
78
0.664144
from typing import Optional from flask import Blueprint, json, jsonify, request from src.errors import handler from src.models.casm import Pathway, PathwayJsonSchema, PathwayReactionsSchema pathways_blueprint = Blueprint('pathways', __name__, url_prefix='/...
true
true