hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c310a363cd43bc3cf0bf2612db8eb1c88950cce
23,180
py
Python
models/nets/cpm_hand.py
Aniket1998Agrawal/robotic-palm
3062db8da9a32a9606aa19ef0ee632013cd40b30
[ "Apache-2.0" ]
828
2017-08-28T07:42:53.000Z
2022-03-24T07:24:22.000Z
models/nets/cpm_hand.py
abcx3261/convolutional-pose-machines-tensorflow
b9a30fbb5a2f1d15faf8f553201203a431cb34cb
[ "Apache-2.0" ]
81
2017-08-27T13:46:54.000Z
2022-01-20T11:31:44.000Z
models/nets/cpm_hand.py
abcx3261/convolutional-pose-machines-tensorflow
b9a30fbb5a2f1d15faf8f553201203a431cb34cb
[ "Apache-2.0" ]
312
2017-08-29T08:13:02.000Z
2022-01-16T12:27:21.000Z
import tensorflow as tf import pickle from models.nets.CPM import CPM class CPM_Model(CPM): def __init__(self, input_size, heatmap_size, stages, joints, img_type='RGB', is_training=True): self.stages = stages self.stage_heatmap = [] self.stage_loss = [0 for _ in range(stages)] self...
56.674817
116
0.40302
import tensorflow as tf import pickle from models.nets.CPM import CPM class CPM_Model(CPM): def __init__(self, input_size, heatmap_size, stages, joints, img_type='RGB', is_training=True): self.stages = stages self.stage_heatmap = [] self.stage_loss = [0 for _ in range(stages)] self...
true
true
1c310aa9cac9b207948edbf0c276725f744ffb7e
672
py
Python
Day 09/1.py
Xerisu/Advent-of-Code
bd068a90b26b04a2345f62cb2054566fbbfce631
[ "MIT" ]
1
2021-12-02T13:58:00.000Z
2021-12-02T13:58:00.000Z
Day 09/1.py
Xerisu/Advent-of-Code
bd068a90b26b04a2345f62cb2054566fbbfce631
[ "MIT" ]
null
null
null
Day 09/1.py
Xerisu/Advent-of-Code
bd068a90b26b04a2345f62cb2054566fbbfce631
[ "MIT" ]
null
null
null
input_file = open("./cave.txt","r") floor = input_file.readlines() input_file.close() floor = ["9" + elem.strip() + "9" for elem in floor] floor = ["9" * len(floor[0])] + floor + ["9" * len(floor[0])] floor = [[int(x) for x in row] for row in floor] #floor[y][x] low_points = [] sum_low_points = 0 for y in range(1,...
24
135
0.568452
input_file = open("./cave.txt","r") floor = input_file.readlines() input_file.close() floor = ["9" + elem.strip() + "9" for elem in floor] floor = ["9" * len(floor[0])] + floor + ["9" * len(floor[0])] floor = [[int(x) for x in row] for row in floor] low_points = [] sum_low_points = 0 for y in range(1, len(floor) -...
true
true
1c310b4c33b1a3f0e7e4d9388796098395a17ff7
3,888
py
Python
Python/whatsView/apps/views.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
2
2022-01-18T09:27:42.000Z
2022-03-29T14:59:00.000Z
Python/whatsView/apps/views.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
null
null
null
Python/whatsView/apps/views.py
min9288/Multicampus
2aaac730b35e530f8f91cb1ba41c08ee18d59142
[ "MIT" ]
null
null
null
import json, os, sys, urllib.request, requests, re from django.shortcuts import render, redirect from django.conf import settings from django.views.generic import FormView from requests import request from bs4 import BeautifulSoup def index(request): return render(request, 'common/main.html') def make_naver_...
34.714286
130
0.623971
import json, os, sys, urllib.request, requests, re from django.shortcuts import render, redirect from django.conf import settings from django.views.generic import FormView from requests import request from bs4 import BeautifulSoup def index(request): return render(request, 'common/main.html') def make_naver_...
true
true
1c310c172c06261161c1ed4dfea6d45ac54fb34c
655
py
Python
var/spack/repos/builtin/packages/lndir/package.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/lndir/package.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/lndir/package.py
carlabguillen/spack
7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 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 Lndir(AutotoolsPackage, XorgPackage): """lndir - create a shadow directory of symbolic lin...
32.75
95
0.737405
from spack import * class Lndir(AutotoolsPackage, XorgPackage): homepage = "http://cgit.freedesktop.org/xorg/util/lndir" xorg_mirror_path = "util/lndir-1.0.3.tar.gz" version('1.0.3', sha256='95b2d26fb3cbe702f828146c7a4c7c48001d2da52b062580227b7b68180be902') depends_on('xproto@7.0.17:', type='build...
true
true
1c310c178edaf20ebe5d2e344ace27beb2ba5739
30,327
py
Python
tests/sagemaker/test_deployment.py
devlibx/mlflowx
291c51161ec26450b1e79c8e4a32af960da79591
[ "Apache-2.0" ]
1
2022-03-15T00:19:10.000Z
2022-03-15T00:19:10.000Z
tests/sagemaker/test_deployment.py
dengzhihai/mlflow
1ce3b5eadf6543878a62b070fd06735d471d75d5
[ "Apache-2.0" ]
null
null
null
tests/sagemaker/test_deployment.py
dengzhihai/mlflow
1ce3b5eadf6543878a62b070fd06735d471d75d5
[ "Apache-2.0" ]
null
null
null
import os import pytest import time from collections import namedtuple from unittest import mock import boto3 import botocore import numpy as np from click.testing import CliRunner from sklearn.linear_model import LogisticRegression import mlflow import mlflow.pyfunc import mlflow.sklearn import mlflow.sagemaker as m...
37.861423
100
0.732845
import os import pytest import time from collections import namedtuple from unittest import mock import boto3 import botocore import numpy as np from click.testing import CliRunner from sklearn.linear_model import LogisticRegression import mlflow import mlflow.pyfunc import mlflow.sklearn import mlflow.sagemaker as m...
true
true
1c310c2fa7447febf5131a6eb41de0b79a189580
2,587
py
Python
tools/xf-batch.py
vanlink/xf-traffic-generator
32d10b1d19af413acbd498f9ffe8c399aa5b3b49
[ "Apache-2.0" ]
null
null
null
tools/xf-batch.py
vanlink/xf-traffic-generator
32d10b1d19af413acbd498f9ffe8c399aa5b3b49
[ "Apache-2.0" ]
null
null
null
tools/xf-batch.py
vanlink/xf-traffic-generator
32d10b1d19af413acbd498f9ffe8c399aa5b3b49
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import os import sys import getopt import traceback import json import time import copy import pprint import requests from libtools import * UNIQUE = None TO_KILL = False TO_LWIP = False TO_GENERATOR = False TO_DISPATCH = False TO_STREAM = False TO_INTERFACE = False # -----------------------------...
26.670103
79
0.478933
import os import sys import getopt import traceback import json import time import copy import pprint import requests from libtools import * UNIQUE = None TO_KILL = False TO_LWIP = False TO_GENERATOR = False TO_DISPATCH = False TO_STREAM = False TO_INTERFACE = False if __name__ != '__main__': sys.exit(0) try: ...
true
true
1c310c6664d26c85ae161d02b9015c70e433ed29
3,494
py
Python
coil_model_warmstart.py
havefun28/scenario_runner
d24e9563179b7a345705c53e7da877b42736acf2
[ "MIT" ]
1
2020-10-09T07:25:36.000Z
2020-10-09T07:25:36.000Z
coil_model_warmstart.py
RuihanGao/scenario_runner
d24e9563179b7a345705c53e7da877b42736acf2
[ "MIT" ]
null
null
null
coil_model_warmstart.py
RuihanGao/scenario_runner
d24e9563179b7a345705c53e7da877b42736acf2
[ "MIT" ]
null
null
null
import os, sys sys.path.append('/home/ruihan/coiltraine/') import yaml import torch from network.models.coil_icra import CoILICRA from coilutils import AttributeDict # from attribute_dict import AttributeDict # # Sample from PyTorch docs: https://pytorch.org/tutorials/beginner/saving_loading_models.html#warmstartin...
31.763636
154
0.726388
import os, sys sys.path.append('/home/ruihan/coiltraine/') import yaml import torch from network.models.coil_icra import CoILICRA from coilutils import AttributeDict torch.set_default_dtype(torch.float32) torch.set_default_tensor_type('torch.cuda.FloatTensor') yaml_filename = 'coil_configs.yaml' with open(yam...
true
true
1c310cf5f4de81d0af84be7fff6b32545eb07092
408
py
Python
src/mpl_styles/__init__.py
icaros-usc/dqd-rl
83e3da62df37b45c4b8fc549c07f566797b5f685
[ "MIT" ]
6
2022-02-09T05:35:37.000Z
2022-03-12T11:54:59.000Z
src/mpl_styles/__init__.py
icaros-usc/dqd-rl
83e3da62df37b45c4b8fc549c07f566797b5f685
[ "MIT" ]
null
null
null
src/mpl_styles/__init__.py
icaros-usc/dqd-rl
83e3da62df37b45c4b8fc549c07f566797b5f685
[ "MIT" ]
null
null
null
"""Styles for Matplotlib.""" from matplotlib.colors import ListedColormap # Qualitative colormap that (should) be color-blind friendly. See # https://personal.sron.nl/~pault/ for more accessible color schemes. QUALITATIVE_COLORS = ( '#77AADD', '#EE8866', '#44BB99', '#FFAABB', '#99DDFF', '#BBCC3...
24
69
0.676471
from matplotlib.colors import ListedColormap QUALITATIVE_COLORS = ( '#77AADD', '#EE8866', '#44BB99', '#FFAABB', '#99DDFF', '#BBCC33', '#EEDD88', '#AAAA00', ) QualitativeMap = ListedColormap(QUALITATIVE_COLORS)
true
true
1c310defa615980cda6cafd978363a331a7e0346
4,385
py
Python
dev-utils/_windows/msys/msys.py
gitdevmod/craft-blueprints-kde
81a866d2d606dabd57347fbac7cdab42979332dd
[ "BSD-2-Clause" ]
null
null
null
dev-utils/_windows/msys/msys.py
gitdevmod/craft-blueprints-kde
81a866d2d606dabd57347fbac7cdab42979332dd
[ "BSD-2-Clause" ]
null
null
null
dev-utils/_windows/msys/msys.py
gitdevmod/craft-blueprints-kde
81a866d2d606dabd57347fbac7cdab42979332dd
[ "BSD-2-Clause" ]
null
null
null
import io import info import shells from CraftOS.osutils import OsUtils from Package.MaybeVirtualPackageBase import * class subinfo(info.infoclass): def setTargets(self): #as updates are applied with msys and not by craft don't ever change the name of the target, its a bad idea... self.targets[...
38.80531
140
0.620525
import io import info import shells from CraftOS.osutils import OsUtils from Package.MaybeVirtualPackageBase import * class subinfo(info.infoclass): def setTargets(self): self.targets["base"] = f"https://github.com/msys2/msys2-installer/releases/download/2020-05-22/msys2-base-x86_64-20200522.ta...
true
true
1c310e8484badd79ac34991597b64d85aecd23a2
1,766
py
Python
python_ast/flake8_tests/test_ast_linter.py
jerryliu55/pyre-check
ca779758cda4468c95dc2cd84f97a896bb983e3c
[ "MIT" ]
3
2019-03-29T22:32:12.000Z
2019-04-16T08:54:57.000Z
python_ast/flake8_tests/test_ast_linter.py
jerryliu55/pyre-check
ca779758cda4468c95dc2cd84f97a896bb983e3c
[ "MIT" ]
null
null
null
python_ast/flake8_tests/test_ast_linter.py
jerryliu55/pyre-check
ca779758cda4468c95dc2cd84f97a896bb983e3c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import ast import unittest from pathlib import Path from typing import List, NamedTuple from .ast_linter import AstChecker, Error class ExpectedError(NamedTuple): line: int message: str class AstVisitorBaseCase(unittest.TestCase): def load_checker(self, test_file) -> AstChecker:...
30.982456
88
0.632503
import ast import unittest from pathlib import Path from typing import List, NamedTuple from .ast_linter import AstChecker, Error class ExpectedError(NamedTuple): line: int message: str class AstVisitorBaseCase(unittest.TestCase): def load_checker(self, test_file) -> AstChecker: test_repositor...
true
true
1c310f7bbabe1c66ae36be1262be6c97762c5011
13,942
py
Python
mhs/common/mhs_common/messages/ebxml_request_envelope.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
1
2020-05-20T12:26:46.000Z
2020-05-20T12:26:46.000Z
mhs/common/mhs_common/messages/ebxml_request_envelope.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
41
2020-05-18T12:49:29.000Z
2022-02-28T13:34:01.000Z
mhs/common/mhs_common/messages/ebxml_request_envelope.py
nhsconnect/integration-adaptor-mhs
fa9006ad8b64b696040d48cd469d60c9fc803b3e
[ "Apache-2.0" ]
6
2020-06-04T18:59:25.000Z
2021-12-16T16:42:32.000Z
"""This module defines the envelope used to wrap asynchronous request messages to be sent to a remote MHS.""" from __future__ import annotations import base64 import copy import email import email.message import email.policy from typing import Dict, Tuple, Union, List, Sequence, Generator from xml.etree.ElementTree i...
49.091549
120
0.650624
from __future__ import annotations import base64 import copy import email import email.message import email.policy from typing import Dict, Tuple, Union, List, Sequence, Generator from xml.etree.ElementTree import Element from builder import pystache_message_builder from defusedxml import ElementTree from comms.htt...
true
true
1c311011386e04a22ecac2c71ba793d750f6de17
7,872
py
Python
hcipy/field/field.py
dskleingeld/hcipy
85cacfb7a8058506afb288e3acdf3b6059ba2b50
[ "MIT" ]
1
2020-07-20T23:25:17.000Z
2020-07-20T23:25:17.000Z
hcipy/field/field.py
dskleingeld/hcipy
85cacfb7a8058506afb288e3acdf3b6059ba2b50
[ "MIT" ]
null
null
null
hcipy/field/field.py
dskleingeld/hcipy
85cacfb7a8058506afb288e3acdf3b6059ba2b50
[ "MIT" ]
null
null
null
import numpy as np import string class Field(np.ndarray): '''The value of some physical quantity for each point in some coordinate system. Parameters ---------- arr : array_like An array of values or tensors for each point in the :class:`Grid`. grid : Grid The corresponding :class:`Grid` on which the values ...
29.70566
85
0.696138
import numpy as np import string class Field(np.ndarray): def __new__(cls, arr, grid): obj = np.asarray(arr).view(cls) obj.grid = grid return obj def __array_finalize__(self, obj): if obj is None: return self.grid = getattr(obj, 'grid', None) @property def tensor_order(self): return self.ndim - ...
true
true
1c31111aac8aff95f5f45202a6e11e841a5044da
6,289
py
Python
python-basic-template.py
realSnoopy/python-ffmpeg-multi-conversion
3e9986252fabe229273771e021ea55fd9b208bd4
[ "MIT" ]
null
null
null
python-basic-template.py
realSnoopy/python-ffmpeg-multi-conversion
3e9986252fabe229273771e021ea55fd9b208bd4
[ "MIT" ]
null
null
null
python-basic-template.py
realSnoopy/python-ffmpeg-multi-conversion
3e9986252fabe229273771e021ea55fd9b208bd4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Beautiful is better than ugly. # Explicit is better than implicit. # Simple is better than complex. # Complex is better than complicated. # Flat is better than nested. # Python 3.5 and up # getestet Python 3.6.5 VERSION = 'ALPHA' def clear_console(): if os.name==...
27.583333
109
0.618699
VERSION = 'ALPHA' def clear_console(): if os.name=='nt': os.system('cls') else: os.system('clear') def exit(error_msg=None): if error_msg: print('\n[ERROR]\n{}\n[EXIT]'.format(error_msg)) sys.exit(0) try: import os import sys import unicodedata import loggin...
true
true
1c31124a28d1dee46f542f0014529787d8946185
222
py
Python
tests/test_iterator_TCP.py
jcarreira/cirrus-kv
a44099185e02859385997956333b364ae836fee5
[ "Apache-2.0" ]
8
2018-07-18T22:13:36.000Z
2021-08-24T12:28:42.000Z
tests/test_iterator_TCP.py
jcarreira/ddc
a44099185e02859385997956333b364ae836fee5
[ "Apache-2.0" ]
7
2016-11-22T11:07:14.000Z
2016-12-17T22:49:23.000Z
tests/test_iterator_TCP.py
jcarreira/ddc
a44099185e02859385997956333b364ae836fee5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys import subprocess import time import test_runner # Set name of test to run testPath = "./tests/object_store/test_iterator" # Call script to run the test test_runner.runTestTCP(testPath)
18.5
47
0.788288
import sys import subprocess import time import test_runner testPath = "./tests/object_store/test_iterator" test_runner.runTestTCP(testPath)
true
true
1c3112ce7a1bbf5a04753c11f0da9a56ef16ce27
22,703
py
Python
python-profiles/STANDA/8MID12-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
3
2020-12-08T14:41:48.000Z
2022-02-23T13:42:42.000Z
python-profiles/STANDA/8MID12-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
4
2020-12-08T20:15:06.000Z
2021-12-08T14:15:24.000Z
python-profiles/STANDA/8MID12-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
2
2020-11-02T02:17:35.000Z
2021-03-18T14:13:56.000Z
def set_profile_8MID12_1_AR(lib, id): worst_result = Result.Ok result = Result.Ok feedback_settings = feedback_settings_t() feedback_settings.IPS = 4000 class FeedbackType_: FEEDBACK_ENCODER_MEDIATED = 6 FEEDBACK_NONE = 5 FEEDBACK_EMF = 4 FEEDBACK_ENCODER = 1 fe...
35.922468
185
0.693389
def set_profile_8MID12_1_AR(lib, id): worst_result = Result.Ok result = Result.Ok feedback_settings = feedback_settings_t() feedback_settings.IPS = 4000 class FeedbackType_: FEEDBACK_ENCODER_MEDIATED = 6 FEEDBACK_NONE = 5 FEEDBACK_EMF = 4 FEEDBACK_ENCODER = 1 fe...
true
true
1c31164741e00323e319a697268a69b6f3d9f9bb
2,029
py
Python
tests/test_all_notebooks.py
scottprahl/iadpython
df04f6446c73b5c5c1aabed072e986877f81104b
[ "MIT" ]
4
2017-09-13T14:01:32.000Z
2021-11-09T04:48:17.000Z
tests/test_all_notebooks.py
scottprahl/iadpython
df04f6446c73b5c5c1aabed072e986877f81104b
[ "MIT" ]
null
null
null
tests/test_all_notebooks.py
scottprahl/iadpython
df04f6446c73b5c5c1aabed072e986877f81104b
[ "MIT" ]
1
2020-06-16T21:09:44.000Z
2020-06-16T21:09:44.000Z
""" This file is intended to be the target of a pytest run. It will recursively find all .ipynb files in the current directory, ignoring directories that start with . and any files matching patterins found in the file .testignore List patterns to skip in .testignore file: under_construction/* Sample invocations...
31.703125
80
0.712666
import os.path import pathlib import pytest import nbformat from nbconvert.preprocessors import ExecutePreprocessor searchpath = pathlib.Path('./docs/') ignores = '' if os.path.exists('.testignore'): ignores = [line.strip() for line in open('.testignore') if line.strip()] notebooks = [notebook for notebook in s...
true
true
1c3116918f0e8ccfa2d25dce8b10ccbb99e8d1a0
8,361
py
Python
src/AE/ae.py
goeckslab/MarkerIntensityPredictor
704e4ea782c6653cabb4b37a7b34fea4cd9fe595
[ "MIT" ]
3
2021-02-22T19:26:04.000Z
2022-03-02T22:08:25.000Z
src/AE/ae.py
goeckslab/MarkerIntensityPredictor
704e4ea782c6653cabb4b37a7b34fea4cd9fe595
[ "MIT" ]
1
2021-03-12T22:22:25.000Z
2021-03-12T22:22:25.000Z
src/AE/ae.py
goeckslab/MarkerIntensityPredictor
704e4ea782c6653cabb4b37a7b34fea4cd9fe595
[ "MIT" ]
1
2021-03-12T20:28:50.000Z
2021-03-12T20:28:50.000Z
import pickle import sys from pathlib import Path from Shared.data import Data from Shared.data_loader import DataLoader import numpy as np import keras from keras import layers, regularizers from sklearn.preprocessing import StandardScaler, MinMaxScaler import anndata as ad import pandas as pd import umap import tenso...
38.888372
119
0.631384
import pickle import sys from pathlib import Path from Shared.data import Data from Shared.data_loader import DataLoader import numpy as np import keras from keras import layers, regularizers from sklearn.preprocessing import StandardScaler, MinMaxScaler import anndata as ad import pandas as pd import umap import tenso...
true
true
1c311714daa3855f26e41a441c7cba090913511a
2,127
py
Python
scons-local/SCons/Tool/sgilink.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
1
2017-02-10T00:26:44.000Z
2017-02-10T00:26:44.000Z
scons-local/SCons/Tool/sgilink.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
null
null
null
scons-local/SCons/Tool/sgilink.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
null
null
null
"""SCons.Tool.sgilink Tool-specific initialization for the SGI MIPSPro linker on SGI. 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 - 2014 The SCons Foundation # # Permission is here...
33.761905
80
0.739069
__revision__ = "src/engine/SCons/Tool/sgilink.py 2014/07/05 09:42:21 garyo" import SCons.Util import link linkers = ['CC', 'cc'] def generate(env): link.generate(env) env['LINK'] = env.Detect(linkers) or 'cc' env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared') env['RPATHPREF...
true
true
1c31177090badb6048b814d1896ef8b6e2323ee1
264
py
Python
tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_12/ar_/test_artificial_128_BoxCox_MovingMedian_12__0.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_12/ar_/test_artificial_128_BoxCox_MovingMedian_12__0.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_BoxCox/trend_MovingMedian/cycle_12/ar_/test_artificial_128_BoxCox_MovingMedian_12__0.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 12, transform = "BoxCox", sigma = 0.0, exog_count = 0, ar_order = 0);
37.714286
164
0.731061
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 12, transform = "BoxCox", sigma = 0.0, exog_count = 0, ar_order = 0);
true
true
1c31198db568de2df98c2405e815b17b0c759b7f
1,784
py
Python
gargantua/apis/query_makers.py
Laisky/laisky-blog
ebe7dadf8fce283ebab0539926ad1be1246e5156
[ "Apache-2.0" ]
18
2015-05-08T02:06:39.000Z
2022-03-05T21:36:48.000Z
gargantua/apis/query_makers.py
Laisky/laisky-blog
ebe7dadf8fce283ebab0539926ad1be1246e5156
[ "Apache-2.0" ]
131
2015-01-22T14:54:59.000Z
2022-02-16T15:14:10.000Z
gargantua/apis/query_makers.py
Laisky/laisky-blog
ebe7dadf8fce283ebab0539926ad1be1246e5156
[ "Apache-2.0" ]
3
2016-01-11T13:52:41.000Z
2019-06-12T08:54:15.000Z
"""Constructors to make query to db""" from abc import ABC, abstractclassmethod import pymongo from bson import ObjectId import tornado from gargantua.utils import logger, is_objectid, debug_wrapper class QueryMakerError(Exception): pass class BaseMaker(ABC): @abstractclassmethod async def update_que...
27.446154
86
0.56222
from abc import ABC, abstractclassmethod import pymongo from bson import ObjectId import tornado from gargantua.utils import logger, is_objectid, debug_wrapper class QueryMakerError(Exception): pass class BaseMaker(ABC): @abstractclassmethod async def update_query(cls, app, query, projection): ...
true
true
1c311a9d72424ccf04f8719f6f13a013322ccf33
438
py
Python
products/migrations/0006_album_special_offer_price.py
JuanBrachoDev/Vinyl
b988c93f9919371aa151869fef2eed2f7c705b44
[ "Net-SNMP", "Xnet" ]
null
null
null
products/migrations/0006_album_special_offer_price.py
JuanBrachoDev/Vinyl
b988c93f9919371aa151869fef2eed2f7c705b44
[ "Net-SNMP", "Xnet" ]
null
null
null
products/migrations/0006_album_special_offer_price.py
JuanBrachoDev/Vinyl
b988c93f9919371aa151869fef2eed2f7c705b44
[ "Net-SNMP", "Xnet" ]
1
2021-10-20T21:13:26.000Z
2021-10-20T21:13:26.000Z
# Generated by Django 3.2 on 2021-10-05 18:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0005_auto_20211005_1735'), ] operations = [ migrations.AddField( model_name='album', name='special_offer_p...
23.052632
93
0.627854
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0005_auto_20211005_1735'), ] operations = [ migrations.AddField( model_name='album', name='special_offer_price', field=models.DecimalField(b...
true
true
1c311a9ef7a57e39e9cdd6e1cdbd444534088472
2,216
py
Python
hata/discord/guild/flags.py
monoidic/hata
869fdd116360745cd554799d5df3b3a810f156b2
[ "0BSD" ]
1
2022-03-02T03:59:57.000Z
2022-03-02T03:59:57.000Z
hata/discord/guild/flags.py
m0nk3ybraindead/hata
f87ed3d7009eeae31d6ea158772efd33775c7b1c
[ "0BSD" ]
1
2022-02-08T16:54:39.000Z
2022-02-08T16:54:39.000Z
hata/discord/guild/flags.py
WizzyBots/hata
f6991afc0bebf7dad932888a536f4d010f8663c7
[ "0BSD" ]
1
2020-09-17T20:10:15.000Z
2020-09-17T20:10:15.000Z
__all__ = ('SystemChannelFlag',) from ..bases import ReverseFlagBase class SystemChannelFlag(ReverseFlagBase): """ The flags of a ``Guild``'s system channel. For Discord these flags tell, what ``MessageType`-s are not sent to the guild's system channel, but the wrapper reverses this behaviour. ...
31.657143
115
0.393051
__all__ = ('SystemChannelFlag',) from ..bases import ReverseFlagBase class SystemChannelFlag(ReverseFlagBase): __keys__ = { 'welcome': 0, 'boost': 1, 'setup_tips': 2, 'join_sticker_replies': 3, } @property def none(self): return (self == self.NONE) ...
true
true
1c311b580482ffa462e622f3c9d59ce48f1417ba
21
py
Python
song/__init__.py
louisgv/song-cli
10186b26f66c2f07e3cf1a3cd7b5212610c33afb
[ "MIT" ]
70
2017-05-17T15:11:27.000Z
2021-01-10T01:09:06.000Z
song/__init__.py
louisgv/song-cli
10186b26f66c2f07e3cf1a3cd7b5212610c33afb
[ "MIT" ]
9
2017-05-12T17:29:46.000Z
2018-03-16T19:21:50.000Z
song/__init__.py
louisgv/song-cli
10186b26f66c2f07e3cf1a3cd7b5212610c33afb
[ "MIT" ]
17
2017-05-28T20:27:35.000Z
2021-07-12T03:41:25.000Z
__version__ = '2.9.1'
21
21
0.666667
__version__ = '2.9.1'
true
true
1c311bee07b9b229e65fea6e6239bd3237c48315
341
py
Python
app/api/api_v1/api.py
wlsouza/fastapi-todolist
c7c75bd73754dde8687e1486a80c77d903e33b31
[ "MIT" ]
4
2021-09-09T00:20:21.000Z
2022-01-12T09:08:07.000Z
app/api/api_v1/api.py
wlsouza/fastapi-todolist
c7c75bd73754dde8687e1486a80c77d903e33b31
[ "MIT" ]
null
null
null
app/api/api_v1/api.py
wlsouza/fastapi-todolist
c7c75bd73754dde8687e1486a80c77d903e33b31
[ "MIT" ]
null
null
null
from fastapi import APIRouter from app.api.api_v1.endpoints import login, users api_v1_router = APIRouter() api_v1_router.include_router(login.router, prefix="/login", tags=["login"]) api_v1_router.include_router(users.router, prefix="/users", tags=["users"]) # api_v1_router.include_router(tasks.router, prefix="/tas...
34.1
77
0.771261
from fastapi import APIRouter from app.api.api_v1.endpoints import login, users api_v1_router = APIRouter() api_v1_router.include_router(login.router, prefix="/login", tags=["login"]) api_v1_router.include_router(users.router, prefix="/users", tags=["users"])
true
true
1c311c26c934dbfc350461f0fa8b24cde322d362
9,058
py
Python
src/spaczz/search/tokensearcher.py
JonasHablitzel/spaczz
9f79fe9d35a25787f926b4c4955c2650f4600073
[ "MIT" ]
153
2020-07-07T01:26:25.000Z
2022-03-31T23:47:00.000Z
src/spaczz/search/tokensearcher.py
JonasHablitzel/spaczz
9f79fe9d35a25787f926b4c4955c2650f4600073
[ "MIT" ]
38
2020-07-15T02:29:34.000Z
2021-08-15T21:32:54.000Z
src/spaczz/search/tokensearcher.py
JonasHablitzel/spaczz
9f79fe9d35a25787f926b4c4955c2650f4600073
[ "MIT" ]
20
2020-07-07T15:41:05.000Z
2022-02-21T19:28:22.000Z
"""Module for TokenSearcher: flexible token searching in spaCy `Doc` objects.""" from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union import regex from spacy.tokens import Doc, Token from spacy.vocab import Vocab from ..process import FuzzyFuncs from ..util import n_wise cl...
36.672065
87
0.548465
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union import regex from spacy.tokens import Doc, Token from spacy.vocab import Vocab from ..process import FuzzyFuncs from ..util import n_wise class TokenSearcher: def __init__(self: TokenSearcher, vocab: Vocab) -> None: ...
true
true
1c311c684a007f61d10d19b067c8f928b015dca9
1,480
py
Python
doctr/models/detection/predictor/pytorch.py
elejke/doctr
1d62d3f2b1e9a60560af0685fe882a69826503a7
[ "Apache-2.0" ]
null
null
null
doctr/models/detection/predictor/pytorch.py
elejke/doctr
1d62d3f2b1e9a60560af0685fe882a69826503a7
[ "Apache-2.0" ]
null
null
null
doctr/models/detection/predictor/pytorch.py
elejke/doctr
1d62d3f2b1e9a60560af0685fe882a69826503a7
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import Any, List, Union import numpy as np import torch from torch import nn from doctr.models.preprocessor impo...
28.461538
108
0.658784
from typing import Any, List, Union import numpy as np import torch from torch import nn from doctr.models.preprocessor import PreProcessor __all__ = ['DetectionPredictor'] class DetectionPredictor(nn.Module): def __init__( self, pre_processor: PreProcessor, model: nn.Module, ) -...
true
true
1c311c9c35666325e1ee647c83484b12a76c0664
37,270
py
Python
sympy/simplify/tests/test_hyperexpand.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2016-02-22T22:46:50.000Z
2016-02-22T22:46:50.000Z
sympy/simplify/tests/test_hyperexpand.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
7
2017-05-01T14:15:32.000Z
2017-09-06T20:44:24.000Z
sympy/simplify/tests/test_hyperexpand.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2020-09-09T15:20:27.000Z
2020-09-09T15:20:27.000Z
from random import randrange from sympy.simplify.hyperexpand import (ShiftA, ShiftB, UnShiftA, UnShiftB, MeijerShiftA, MeijerShiftB, MeijerShiftC, MeijerShiftD, MeijerUnShiftA, MeijerUnShiftB, MeijerUnShiftC, MeijerUnShiftD, Re...
36.755424
85
0.498658
from random import randrange from sympy.simplify.hyperexpand import (ShiftA, ShiftB, UnShiftA, UnShiftB, MeijerShiftA, MeijerShiftB, MeijerShiftC, MeijerShiftD, MeijerUnShiftA, MeijerUnShiftB, MeijerUnShiftC, MeijerUnShiftD, Re...
true
true
1c311cc4a86d1fcfc51f40fb745398e3291d2ee1
2,144
py
Python
joladnijo/serializers.py
joladnijo/joladnijo-backend
89240e3990ce9cdad86a1d212d28062c07a58edb
[ "MIT" ]
null
null
null
joladnijo/serializers.py
joladnijo/joladnijo-backend
89240e3990ce9cdad86a1d212d28062c07a58edb
[ "MIT" ]
40
2022-03-06T19:46:07.000Z
2022-03-27T11:50:02.000Z
joladnijo/serializers.py
joladnijo/joladnijo-backend
89240e3990ce9cdad86a1d212d28062c07a58edb
[ "MIT" ]
1
2022-03-29T08:53:21.000Z
2022-03-29T08:53:21.000Z
from rest_framework import serializers from . import models class ContactSerializer(serializers.ModelSerializer): class Meta: model = models.Contact exclude = ['organization', 'aid_center'] class OrganizationSerializer(serializers.ModelSerializer): contact = ContactSerializer() class M...
29.777778
117
0.71222
from rest_framework import serializers from . import models class ContactSerializer(serializers.ModelSerializer): class Meta: model = models.Contact exclude = ['organization', 'aid_center'] class OrganizationSerializer(serializers.ModelSerializer): contact = ContactSerializer() class M...
true
true
1c311d91ed8d7ddec962d080c66a6e62be771ba9
7,380
py
Python
trainerpi.py
derillina/trainerpi
15268c5765ee5e12f217e9585af7b29e57ba59d8
[ "MIT" ]
33
2019-07-04T19:05:33.000Z
2022-01-12T19:36:27.000Z
trainerpi.py
derillina/trainerpi
15268c5765ee5e12f217e9585af7b29e57ba59d8
[ "MIT" ]
5
2018-07-24T18:36:12.000Z
2021-01-31T05:17:39.000Z
trainerpi.py
derillina/trainerpi
15268c5765ee5e12f217e9585af7b29e57ba59d8
[ "MIT" ]
11
2019-07-21T15:48:38.000Z
2022-03-29T20:08:42.000Z
import asyncio import bleCSC import collections import numpy import os import pygame import time # --------------------------------------------------------------------------- # # SETTINGS # # -----------------------------------------------------------...
36.9
109
0.581165
import asyncio import bleCSC import collections import numpy import os import pygame import time ROLLING_LENGTH = 2096. POWER_CURVE = numpy.loadtxt("power-4.csv", delimiter=",") SCREEN_SIZE = WIDTH, HEIGHT = 320, 240 BORDER = 10 FONT_NAME = "DejaVuSans" FONT_SIZE = 28 SCREEN_UPDATE_DELAY = 0.05 CSC_SENSOR_ADDRESSES...
true
true
1c311e21d5aa989de05b6b21c1dec8a37917990b
2,965
py
Python
test/test_melgan_layers.py
Reaiot/kiswahili_tts
1bbbff49f7c6cf899e5e3fd4c8cb7d6a7d1b6e79
[ "Apache-2.0" ]
1,961
2020-07-31T07:31:27.000Z
2022-03-31T20:39:29.000Z
test/test_melgan_layers.py
Reaiot/kiswahili_tts
1bbbff49f7c6cf899e5e3fd4c8cb7d6a7d1b6e79
[ "Apache-2.0" ]
587
2020-07-31T03:24:54.000Z
2022-03-29T02:31:50.000Z
test/test_melgan_layers.py
Reaiot/kiswahili_tts
1bbbff49f7c6cf899e5e3fd4c8cb7d6a7d1b6e79
[ "Apache-2.0" ]
483
2020-07-31T17:48:32.000Z
2022-03-31T13:55:49.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Minh Nguyen (@dathudeptrai) # # 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 ...
31.88172
113
0.707251
import logging import os import numpy as np import pytest import tensorflow as tf from tensorflow_tts.models.melgan import ( TFConvTranspose1d, TFReflectionPad1d, TFResidualStack, ) os.environ["CUDA_VISIBLE_DEVICES"] = "" logging.basicConfig( level=logging.DEBUG, format="%(asctime)s (%(module)s...
true
true
1c311e4869fadf9f2ff3dee2ed081123eb53101a
5,290
py
Python
train.py
endaaman/prostate
e08beb862fc61ab0bcef672ab77d2ff528259094
[ "BSD-2-Clause" ]
null
null
null
train.py
endaaman/prostate
e08beb862fc61ab0bcef672ab77d2ff528259094
[ "BSD-2-Clause" ]
1
2020-06-12T07:59:58.000Z
2020-06-12T07:59:59.000Z
train.py
endaaman/prostate
e08beb862fc61ab0bcef672ab77d2ff528259094
[ "BSD-2-Clause" ]
null
null
null
import os import math import re import gc import argparse from enum import Enum, auto import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import LambdaLR import torch.nn.functional as F from torch.utils.data import DataLoader from torchvision import datasets, ...
33.0625
177
0.693762
import os import math import re import gc import argparse from enum import Enum, auto import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import LambdaLR import torch.nn.functional as F from torch.utils.data import DataLoader from torchvision import datasets, ...
true
true
1c311e9e8f6b393ac57896e04339007088012c4a
4,835
py
Python
cli/sawtooth_cli/transaction.py
mealchain/beta
7dc1a1aea175bfb3f1008939f098a1d58bb455a6
[ "Apache-2.0" ]
1
2017-08-04T10:31:00.000Z
2017-08-04T10:31:00.000Z
cli/sawtooth_cli/transaction.py
mealchain/beta
7dc1a1aea175bfb3f1008939f098a1d58bb455a6
[ "Apache-2.0" ]
null
null
null
cli/sawtooth_cli/transaction.py
mealchain/beta
7dc1a1aea175bfb3f1008939f098a1d58bb455a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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 applicable law or agreed to in wri...
38.373016
80
0.63061
import argparse from base64 import b64decode from sawtooth_cli import format_utils as fmt from sawtooth_cli.rest_client import RestClient from sawtooth_cli.exceptions import CliException from sawtooth_cli.parent_parsers import base_http_parser from sawtooth_cli.parent_parsers import base_list_parser from sawtooth_cli....
true
true
1c311eaff781636af920b6c76513759dd4b2e600
3,235
py
Python
setup.py
Caleydo/taco_server
be2d4786fbc8ad62ecb5b599572fe09f8c2ea05e
[ "BSD-3-Clause" ]
2
2017-03-30T05:12:54.000Z
2019-07-11T09:42:06.000Z
setup.py
Caleydo/taco_server
be2d4786fbc8ad62ecb5b599572fe09f8c2ea05e
[ "BSD-3-Clause" ]
11
2016-11-18T17:13:37.000Z
2021-03-26T11:35:43.000Z
setup.py
Caleydo/taco_server
be2d4786fbc8ad62ecb5b599572fe09f8c2ea05e
[ "BSD-3-Clause" ]
2
2018-01-26T09:56:41.000Z
2019-10-26T04:41:31.000Z
############################################################################### # Caleydo - Visualization for Molecular Biology - http://caleydo.org # Copyright (c) The Caleydo Team. All rights reserved. # Licensed under the new BSD license, available at http://caleydo.org/license ######################################...
34.414894
108
0.662442
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) def read_it(name): with open(path.join(here, name), encoding='utf-8') as f: return f.read() with open(path.join(here, 'package.json'), encoding='utf-8') as json_data: import ...
true
true
1c311ef6c77d2d2c696899f5c5518bbfbe901764
1,778
py
Python
tests/integration/preview/acc_security/service/test_verification_check.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
1
2019-12-30T21:46:55.000Z
2019-12-30T21:46:55.000Z
tests/integration/preview/acc_security/service/test_verification_check.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
tests/integration/preview/acc_security/service/test_verification_check.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class VerificationCheckTestCase...
32.925926
116
0.577615
from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class VerificationCheckTestCase(IntegrationTestCase): def test_create_request(self): self.holodeck.mock(Response(500, '')) with s...
true
true
1c311f75778dffa8637a08e97bcd150cd5fab9d0
3,184
py
Python
gpt-example/deps/gpt/src/sample.py
Antaego/gpt-companion
071d1218661cb8dddfd31d50da91c1af7a9be21b
[ "Unlicense" ]
null
null
null
gpt-example/deps/gpt/src/sample.py
Antaego/gpt-companion
071d1218661cb8dddfd31d50da91c1af7a9be21b
[ "Unlicense" ]
null
null
null
gpt-example/deps/gpt/src/sample.py
Antaego/gpt-companion
071d1218661cb8dddfd31d50da91c1af7a9be21b
[ "Unlicense" ]
null
null
null
import tensorflow as tf from deps.gpt.src import model def top_k_logits(logits, k): if k == 0: # no truncation return logits def _top_k(): values, _ = tf.nn.top_k(logits, k=k) min_values = values[:, -1, tf.newaxis] return tf.where( logits < min_values, ...
33.166667
122
0.576947
import tensorflow as tf from deps.gpt.src import model def top_k_logits(logits, k): if k == 0: return logits def _top_k(): values, _ = tf.nn.top_k(logits, k=k) min_values = values[:, -1, tf.newaxis] return tf.where( logits < min_values, tf.ones_...
true
true
1c311fbb1c23401c4ba13b9d5683ed866307cd23
78,928
py
Python
openmc/lattice.py
openmsr/openmc
831c8d1c50cb4441faf8a0268ec59f6f803bb258
[ "MIT" ]
null
null
null
openmc/lattice.py
openmsr/openmc
831c8d1c50cb4441faf8a0268ec59f6f803bb258
[ "MIT" ]
null
null
null
openmc/lattice.py
openmsr/openmc
831c8d1c50cb4441faf8a0268ec59f6f803bb258
[ "MIT" ]
null
null
null
from abc import ABC from collections import OrderedDict from collections.abc import Iterable from copy import deepcopy from math import sqrt, floor from numbers import Real import types from xml.etree import ElementTree as ET import numpy as np import openmc import openmc.checkvalue as cv from ._xml import get_text f...
35.843778
83
0.530205
from abc import ABC from collections import OrderedDict from collections.abc import Iterable from copy import deepcopy from math import sqrt, floor from numbers import Real import types from xml.etree import ElementTree as ET import numpy as np import openmc import openmc.checkvalue as cv from ._xml import get_text f...
true
true
1c31205fde9e085f681e8304eadebb64056c8636
268
py
Python
setup.py
onshoremanover/dist
96a52b23e6e651d6d6b73614c73a5aa0d0c4bd14
[ "MIT" ]
1
2021-11-04T14:02:57.000Z
2021-11-04T14:02:57.000Z
setup.py
onshoremanover/dcfe
65256aac5a3212a98896cbf0d04533af83bb4ce8
[ "MIT" ]
null
null
null
setup.py
onshoremanover/dcfe
65256aac5a3212a98896cbf0d04533af83bb4ce8
[ "MIT" ]
null
null
null
from setuptools import setup setup( name = 'dcfe', version = '0.1.4', packages = ['dcfe'], entry_points = { 'console_scripts': [ 'dcfe = dcfe.__main__:main' ] })
20.615385
43
0.399254
from setuptools import setup setup( name = 'dcfe', version = '0.1.4', packages = ['dcfe'], entry_points = { 'console_scripts': [ 'dcfe = dcfe.__main__:main' ] })
true
true
1c31217294f3c2bc4855de6abfe75bfa6885b338
1,356
py
Python
app/recipe/serializers.py
garden117/recipe-app-api
ce58a993cac38660ddd25b99ae1e6cffeff537eb
[ "MIT" ]
null
null
null
app/recipe/serializers.py
garden117/recipe-app-api
ce58a993cac38660ddd25b99ae1e6cffeff537eb
[ "MIT" ]
null
null
null
app/recipe/serializers.py
garden117/recipe-app-api
ce58a993cac38660ddd25b99ae1e6cffeff537eb
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): """serializer for tag objects""" class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializers...
28.25
98
0.676991
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializers.ModelSerializer): class Meta: ...
true
true
1c31223d26a10e794076573f547fb1b5b9a01c27
13,816
py
Python
mypy/stubdoc.py
Phlogistique/mypy
eea4c76de4a67a36e3a2293eae9a2e775c636e1d
[ "PSF-2.0" ]
12,496
2016-02-19T13:38:26.000Z
2022-03-31T23:56:19.000Z
mypy/stubdoc.py
Phlogistique/mypy
eea4c76de4a67a36e3a2293eae9a2e775c636e1d
[ "PSF-2.0" ]
9,429
2016-02-19T13:41:32.000Z
2022-03-31T23:29:38.000Z
mypy/stubdoc.py
Zeckie/baselinedmypy
142c896a7ec0a10697375833fd897b293a748699
[ "PSF-2.0" ]
2,770
2016-02-19T16:18:19.000Z
2022-03-31T08:12:49.000Z
"""Parsing/inferring signatures from documentation. This module provides several functions to generate better stubs using docstrings and Sphinx docs (.rst files). """ import re import io import contextlib import tokenize from typing import ( Optional, MutableMapping, MutableSequence, List, Sequence, Tuple, NamedT...
37.040214
98
0.585191
import re import io import contextlib import tokenize from typing import ( Optional, MutableMapping, MutableSequence, List, Sequence, Tuple, NamedTuple, Any ) from typing_extensions import Final Sig = Tuple[str, str] _TYPE_RE: Final = re.compile(r"^[a-zA-Z_][\w\[\], ]*(\.[a-zA-Z_][\w\[\], ]*)*$") _ARG_NAME_RE: ...
true
true
1c31227aa951cf3036977b7f40365ac03c47458f
621
py
Python
src/pythonModules/CsvReader.py
apurva1795/calculator
a72ec7cd961d65da0ebcf3d2c5cea974011ea977
[ "MIT" ]
null
null
null
src/pythonModules/CsvReader.py
apurva1795/calculator
a72ec7cd961d65da0ebcf3d2c5cea974011ea977
[ "MIT" ]
null
null
null
src/pythonModules/CsvReader.py
apurva1795/calculator
a72ec7cd961d65da0ebcf3d2c5cea974011ea977
[ "MIT" ]
null
null
null
import csv from pprint import pprint def ClassFactory(class_name, dictionary): return type(class_name, (object,), dictionary) class CsvReader: data = [] def __init__(self, filepath): self.data = [] with open(filepath) as text_data: csv_data = csv.DictReader(text_data, delimite...
27
63
0.605475
import csv from pprint import pprint def ClassFactory(class_name, dictionary): return type(class_name, (object,), dictionary) class CsvReader: data = [] def __init__(self, filepath): self.data = [] with open(filepath) as text_data: csv_data = csv.DictReader(text_data, delimite...
true
true
1c31229798c28406b90c4cd36c7258c85aafd348
3,463
py
Python
ros2/src/roboy_vision/convertions/convertions.py
HackRoboy/dialogic
0c0b766409aeb2b717e4c396000d79909658cbb2
[ "MIT" ]
null
null
null
ros2/src/roboy_vision/convertions/convertions.py
HackRoboy/dialogic
0c0b766409aeb2b717e4c396000d79909658cbb2
[ "MIT" ]
1
2018-12-07T09:56:14.000Z
2018-12-07T09:56:14.000Z
ros2/src/roboy_vision/convertions/convertions.py
ro-boy/ravestate
f67bbb378d327d9e29de21795770fd5e51141608
[ "MIT" ]
1
2018-11-09T19:05:14.000Z
2018-11-09T19:05:14.000Z
import sys from sensor_msgs.msg import Image import numpy as np from convertions.registry import converts_to_numpy, converts_from_numpy name_to_dtypes = { "rgb8": (np.uint8, 3), "rgba8": (np.uint8, 4), "rgb16": (np.uint16, 3), "rgba16": (np.uint16, 4), "bgr8": (np.uint8, 3), "bgra8": (np.uin...
28.154472
75
0.587063
import sys from sensor_msgs.msg import Image import numpy as np from convertions.registry import converts_to_numpy, converts_from_numpy name_to_dtypes = { "rgb8": (np.uint8, 3), "rgba8": (np.uint8, 4), "rgb16": (np.uint16, 3), "rgba16": (np.uint16, 4), "bgr8": (np.uint8, 3), "bgra8": (np.uin...
true
true
1c31252b57e09ecac5110c11b73a11a5e8449f6c
3,012
py
Python
server/Pybuilder/env/Lib/site-packages/pybuilder/plugins/python/pylint_plugin.py
abhnvx/DataMetric
adde84ea9b0b7792349ce24eac00b0eee7bbed51
[ "RSA-MD" ]
1,419
2015-01-02T20:51:04.000Z
2022-03-23T21:26:00.000Z
server/Pybuilder/env/Lib/site-packages/pybuilder/plugins/python/pylint_plugin.py
abhnvx/DataMetric
adde84ea9b0b7792349ce24eac00b0eee7bbed51
[ "RSA-MD" ]
670
2015-01-01T10:26:03.000Z
2022-02-23T16:33:13.000Z
src/main/python/pybuilder/plugins/python/pylint_plugin.py
paolodedios/pybuilder
12ea2f54e04f97daada375dc3309a3f525f1b5e1
[ "Apache-2.0" ]
270
2015-01-02T05:01:53.000Z
2022-01-20T10:22:59.000Z
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
36.731707
94
0.707503
from pybuilder.core import use_plugin, after, init, task from pybuilder.errors import BuildFailedException from pybuilder.pluginhelper.external_command import ExternalCommandBuilder use_plugin("python.core") use_plugin("analysis") DEFAULT_PYLINT_OPTIONS = ["--max-line-length=100", "--no-docstring-rgx=.*"] @init de...
true
true
1c3125571a27dde6334f07b0b8b3ced20a5bab94
21,608
py
Python
pandas/tests/indexes/period/test_construction.py
developing-coder/pandas
9feb3ad92cc0397a04b665803a49299ee7aa1037
[ "BSD-3-Clause" ]
1
2019-05-04T03:42:25.000Z
2019-05-04T03:42:25.000Z
pandas/tests/indexes/period/test_construction.py
developing-coder/pandas
9feb3ad92cc0397a04b665803a49299ee7aa1037
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/period/test_construction.py
developing-coder/pandas
9feb3ad92cc0397a04b665803a49299ee7aa1037
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pytest from pandas._libs.tslibs.period import IncompatibleFrequency from pandas.compat import lmap, lrange from pandas.core.dtypes.dtypes import PeriodDtype import pandas as pd from pandas import ( Index, Period, PeriodIndex, Series, date_range, offsets, period_range) import pandas.core...
39.575092
79
0.584367
import numpy as np import pytest from pandas._libs.tslibs.period import IncompatibleFrequency from pandas.compat import lmap, lrange from pandas.core.dtypes.dtypes import PeriodDtype import pandas as pd from pandas import ( Index, Period, PeriodIndex, Series, date_range, offsets, period_range) import pandas.core...
true
true
1c312568dd030c2e506792ee49485e62f3f8f42a
3,182
py
Python
Rendering/Volume/Testing/Python/TestBunykRayCastFunction.py
jasper-yeh/VtkDotNet
84b56f781cb511694e4380cebfb245bbefe2560b
[ "BSD-3-Clause" ]
3
2020-06-20T23:31:06.000Z
2021-01-11T02:17:16.000Z
Rendering/Volume/Testing/Python/TestBunykRayCastFunction.py
jasper-yeh/VtkDotNet
84b56f781cb511694e4380cebfb245bbefe2560b
[ "BSD-3-Clause" ]
1
2020-12-01T23:21:02.000Z
2020-12-02T23:44:43.000Z
Rendering/Volume/Testing/Python/TestBunykRayCastFunction.py
jasper-yeh/VtkDotNet
84b56f781cb511694e4380cebfb245bbefe2560b
[ "BSD-3-Clause" ]
5
2015-10-09T04:12:29.000Z
2021-12-15T16:57:11.000Z
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the standard renderer, render window # and interactor ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() ...
37
66
0.803268
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.SetDesiredUpdateRate(3) reader = vtk.vtkStructuredP...
true
true
1c3126bad5ba59783881d63b1e1d9ee4ad1c4671
13,205
py
Python
lenstronomy_extensions/Itterative/iterative_source.py
Thomas-01/lenstronomy_extensions
fbbfe24dcfd71eae9e7c2dd60865a9b94db67fe8
[ "MIT" ]
27
2018-02-28T08:54:44.000Z
2022-03-25T00:13:43.000Z
lenstronomy_extensions/Itterative/iterative_source.py
Thomas-01/lenstronomy_extensions
fbbfe24dcfd71eae9e7c2dd60865a9b94db67fe8
[ "MIT" ]
3
2019-03-12T13:37:51.000Z
2020-10-30T03:03:59.000Z
lenstronomy_extensions/Itterative/iterative_source.py
Thomas-01/lenstronomy_extensions
fbbfe24dcfd71eae9e7c2dd60865a9b94db67fe8
[ "MIT" ]
33
2018-03-19T18:47:38.000Z
2022-03-27T02:55:04.000Z
__author__ = 'sibirrer' import numpy as np import lenstronomy.Util.util as util from lenstronomy.LightModel.Profiles.shapelets import Shapelets from lenstronomy.ImSim.image_model import ImageModel class MakeImageIter(ImageModel): """ class to perform an iterative source reconstruction goal: find the floo...
48.193431
290
0.605225
__author__ = 'sibirrer' import numpy as np import lenstronomy.Util.util as util from lenstronomy.LightModel.Profiles.shapelets import Shapelets from lenstronomy.ImSim.image_model import ImageModel class MakeImageIter(ImageModel): def find_max_residuals(self, residuals, ra_coords, dec_coords, N): ra_mins,...
true
true
1c3127322990bde39d34eb74ce48ed98c6892598
12,778
py
Python
src/sagemaker/predictor.py
yifeim/sagemaker-python-sdk
d60f8d3889b4bbada745ff67ce4d0aae2013285a
[ "Apache-2.0" ]
null
null
null
src/sagemaker/predictor.py
yifeim/sagemaker-python-sdk
d60f8d3889b4bbada745ff67ce4d0aae2013285a
[ "Apache-2.0" ]
null
null
null
src/sagemaker/predictor.py
yifeim/sagemaker-python-sdk
d60f8d3889b4bbada745ff67ce4d0aae2013285a
[ "Apache-2.0" ]
1
2020-07-30T13:26:45.000Z
2020-07-30T13:26:45.000Z
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
35.201102
120
0.659649
from __future__ import print_function, absolute_import import codecs import csv import json import numpy as np import six from six import StringIO, BytesIO from sagemaker.content_types import CONTENT_TYPE_JSON, CONTENT_TYPE_CSV, CONTENT_TYPE_NPY from sagemaker.session import Session class RealTimePredictor(object):...
true
true
1c3127e03f7f9fb78734fc9dd2b6659ba51bc514
20,553
py
Python
tests/test_indefinite_freeze_attack.py
KainaatSingh/tuf
08f48d52df95aaaa44ab3f3143c3f148cd65f3aa
[ "Apache-2.0", "MIT" ]
null
null
null
tests/test_indefinite_freeze_attack.py
KainaatSingh/tuf
08f48d52df95aaaa44ab3f3143c3f148cd65f3aa
[ "Apache-2.0", "MIT" ]
null
null
null
tests/test_indefinite_freeze_attack.py
KainaatSingh/tuf
08f48d52df95aaaa44ab3f3143c3f148cd65f3aa
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright 2012 - 2017, New York University and the TUF contributors # SPDX-License-Identifier: MIT OR Apache-2.0 """ <Program Name> test_indefinite_freeze_attack.py <Author> Konstantin Andrianov. <Started> March 10, 2012. April 1, 2014. Refactored to use the 'unittest' module (t...
43.269474
88
0.724225
from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import datetime import os import time import tempfile import shutil import json import logging import unittest import sys from urllib import request if sys.version_in...
true
true
1c3128678f21598c7caa8347da40ac2a26954faf
32,068
py
Python
test/functional/fundrawtransaction.py
taowen1990/merit
d5cd9ff6c2c77caccf6a6b936884e58f2b88faed
[ "MIT" ]
229
2018-01-01T09:43:38.000Z
2022-03-21T23:11:20.000Z
test/functional/fundrawtransaction.py
taowen1990/merit
d5cd9ff6c2c77caccf6a6b936884e58f2b88faed
[ "MIT" ]
109
2018-01-01T17:23:02.000Z
2020-10-31T00:06:19.000Z
test/functional/fundrawtransaction.py
taowen1990/merit
d5cd9ff6c2c77caccf6a6b936884e58f2b88faed
[ "MIT" ]
26
2018-01-02T22:05:19.000Z
2020-10-30T21:10:55.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the fundrawtransaction RPC.""" from test_framework.test_framework import MeritTestFramework from ...
43.868673
223
0.569103
from test_framework.test_framework import MeritTestFramework from test_framework.util import * def get_unspent(listunspent, amount): for utx in listunspent: if utx['amount'] == amount: return utx raise AssertionError('Could not find unspent with amount={}'.format(amount)) class RawTransa...
true
true
1c312882f690d45be0acf85dd13c25cd0fdf9bbe
1,154
py
Python
tests/data/source_code/python/default/asciidoxy/default_values.py
RerrerBuub/asciidoxy
3402f37d59e30975e9919653465839e396f05513
[ "Apache-2.0" ]
14
2020-04-28T08:51:43.000Z
2022-02-12T13:40:34.000Z
tests/data/source_code/python/default/asciidoxy/default_values.py
RerrerBuub/asciidoxy
3402f37d59e30975e9919653465839e396f05513
[ "Apache-2.0" ]
47
2020-05-18T14:19:31.000Z
2022-03-04T13:46:46.000Z
tests/data/source_code/python/default/asciidoxy/default_values.py
RerrerBuub/asciidoxy
3402f37d59e30975e9919653465839e396f05513
[ "Apache-2.0" ]
8
2020-05-17T20:52:42.000Z
2022-02-25T16:16:01.000Z
# Copyright (C) 2019-2021, TomTom (http://tomtom.com). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
30.368421
74
0.627383
class Point: def __init__(self, x: int = 0, y: int = 1): ... def increment(self, x: int = 2, y: int = 3) -> "Point": ...
true
true
1c3128bf0ed7b0c9cf485afafd436c3b34c03a80
973
py
Python
taskify/todo/models.py
tricelex/taskify
cf967bbccc39aef65efd13c429d48455f38e1fb6
[ "MIT" ]
null
null
null
taskify/todo/models.py
tricelex/taskify
cf967bbccc39aef65efd13c429d48455f38e1fb6
[ "MIT" ]
1
2022-03-01T11:20:20.000Z
2022-03-01T11:20:20.000Z
taskify/todo/models.py
tricelex/taskify
cf967bbccc39aef65efd13c429d48455f38e1fb6
[ "MIT" ]
null
null
null
import uuid from django.conf import settings from django.db import models from django.urls import reverse from taskify.utils.models import BaseAbstractModel class TaskList(BaseAbstractModel): id = models.UUIDField( primary_key=True, default=uuid.uuid4, editable=False, unique=True ) title = model...
27.027778
74
0.700925
import uuid from django.conf import settings from django.db import models from django.urls import reverse from taskify.utils.models import BaseAbstractModel class TaskList(BaseAbstractModel): id = models.UUIDField( primary_key=True, default=uuid.uuid4, editable=False, unique=True ) title = model...
true
true
1c31290a48f8cfbfa4d86d7e15fa5b566ee63b58
8,954
py
Python
src/pyOpenMS/pyTOPP/MapAlignerPoseClustering.py
liangoaix/OpenMS
cccbc5d872320f197091596db275f35b4d0458cd
[ "Zlib", "Apache-2.0" ]
null
null
null
src/pyOpenMS/pyTOPP/MapAlignerPoseClustering.py
liangoaix/OpenMS
cccbc5d872320f197091596db275f35b4d0458cd
[ "Zlib", "Apache-2.0" ]
null
null
null
src/pyOpenMS/pyTOPP/MapAlignerPoseClustering.py
liangoaix/OpenMS
cccbc5d872320f197091596db275f35b4d0458cd
[ "Zlib", "Apache-2.0" ]
null
null
null
import argparse import pyopenms as pms from common import addDataProcessing, writeParamsIfRequested, updateDefaults def align(in_files, out_files, out_trafos, reference_index, reference_file, params): in_types = set(pms.FileHandler.getType(in_) for in_ in in_files) if in_types <= set((pms.Type.MZML,...
34.976563
87
0.580634
import argparse import pyopenms as pms from common import addDataProcessing, writeParamsIfRequested, updateDefaults def align(in_files, out_files, out_trafos, reference_index, reference_file, params): in_types = set(pms.FileHandler.getType(in_) for in_ in in_files) if in_types <= set((pms.Type.MZML,...
true
true
1c312aba90f987553c7c73457f580416290b3f39
2,727
py
Python
collections/ansible_collections/redhat/satellite/plugins/modules/hardware_model.py
hindman-redhat/automated-smart-management-2
5450ccd71f2a4ba568a7f11b03466e1554ae0087
[ "MIT" ]
null
null
null
collections/ansible_collections/redhat/satellite/plugins/modules/hardware_model.py
hindman-redhat/automated-smart-management-2
5450ccd71f2a4ba568a7f11b03466e1554ae0087
[ "MIT" ]
null
null
null
collections/ansible_collections/redhat/satellite/plugins/modules/hardware_model.py
hindman-redhat/automated-smart-management-2
5450ccd71f2a4ba568a7f11b03466e1554ae0087
[ "MIT" ]
2
2021-03-30T14:26:02.000Z
2021-04-01T18:17:29.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2020, Evgeni Golov <evgeni@golov.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
26.475728
111
0.703337
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: hardware_model version_added: 1.0.0 short_description: Manage Hardware Models description: - Manage hardware models author: - "Evgeni Golov (@evgeni)" options: name: description: ...
true
true
1c312b2883b1becc78033db9aad4d87b74a36a8d
498
py
Python
lib/salus/scanners/report_python_modules.py
greaterninja/salus
2f5f56aa8abe252dea9bfbe8a17e086ae3eae6fa
[ "Apache-2.0" ]
null
null
null
lib/salus/scanners/report_python_modules.py
greaterninja/salus
2f5f56aa8abe252dea9bfbe8a17e086ae3eae6fa
[ "Apache-2.0" ]
null
null
null
lib/salus/scanners/report_python_modules.py
greaterninja/salus
2f5f56aa8abe252dea9bfbe8a17e086ae3eae6fa
[ "Apache-2.0" ]
null
null
null
import json try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.req import parse_requirements deps = parse_requirements('requirements.txt', session="_") dependencies = {} for dependency in deps: if hasattr(dependency.req, 'key'): de...
26.210526
71
0.726908
import json try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements deps = parse_requirements('requirements.txt', session="_") dependencies = {} for dependency in deps: if hasattr(dependency.req, 'key'): dependencies[dependency.req.key] = st...
true
true
1c312b83d918655938a1ccbc2c6b326c2c5b74d4
1,637
py
Python
Vue_api_test/Myapp/views.py
archerckk/Vue_api_test
94d37f2430ff6ead0aa64459079b96429298f8cc
[ "MIT" ]
null
null
null
Vue_api_test/Myapp/views.py
archerckk/Vue_api_test
94d37f2430ff6ead0aa64459079b96429298f8cc
[ "MIT" ]
null
null
null
Vue_api_test/Myapp/views.py
archerckk/Vue_api_test
94d37f2430ff6ead0aa64459079b96429298f8cc
[ "MIT" ]
null
null
null
import json from django.shortcuts import render from django.http import JsonResponse, HttpResponse # Create your views here. def index(request): return render(request, 'index.html') value_list = ['apple', 'pear', 'banana'] def load_login(request): return render(request, 'login.html') def search_key(re...
21.539474
75
0.597434
import json from django.shortcuts import render from django.http import JsonResponse, HttpResponse def index(request): return render(request, 'index.html') value_list = ['apple', 'pear', 'banana'] def load_login(request): return render(request, 'login.html') def search_key(request): method = reque...
true
true
1c312b94a31e9d253cc05a00ec83f6f345642192
3,506
py
Python
flight/state_settings.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
12
2019-10-10T22:17:45.000Z
2021-09-14T23:54:02.000Z
flight/state_settings.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
178
2019-10-29T16:28:02.000Z
2021-07-26T17:15:31.000Z
flight/state_settings.py
pieperm/IARC-2020
a90bfe830ea2ceced59e8f2e7b54862dda42f5a3
[ "MIT" ]
6
2019-10-09T00:20:27.000Z
2021-09-28T00:24:00.000Z
"""Class to contain setters and getters for settings in various flight states""" DEFAULT_EARLY_LAPS: int = 2 DEFAULT_RETURN_LAPS: int = 2 DEFAULT_VISION_TEST: str = "module" DEFAULT_RUN_TITLE: str = "N/A" DEFAULT_RUN_DESCRIPTION: str = "N/A" class StateSettings: def __init__(self): """Default constructor...
34.372549
92
0.648032
DEFAULT_EARLY_LAPS: int = 2 DEFAULT_RETURN_LAPS: int = 2 DEFAULT_VISION_TEST: str = "module" DEFAULT_RUN_TITLE: str = "N/A" DEFAULT_RUN_DESCRIPTION: str = "N/A" class StateSettings: def __init__(self): self.simple_takeoff: bool = False self.do_early_laps: bool = True sel...
true
true
1c312c16399deb036897c7350ef9d6f9245e655e
41,208
py
Python
tests/data_context/test_data_context.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context.py
cicdw/great_expectations
0aecddf7da591df19389c8abadbb1700a51b8739
[ "Apache-2.0" ]
null
null
null
import json import os import shutil from collections import OrderedDict import pytest from ruamel.yaml import YAML from great_expectations.core import ( ExpectationConfiguration, ExpectationSuite, expectationSuiteSchema, ) from great_expectations.data_context import ( BaseDataContext, DataContext,...
36.792857
148
0.69899
import json import os import shutil from collections import OrderedDict import pytest from ruamel.yaml import YAML from great_expectations.core import ( ExpectationConfiguration, ExpectationSuite, expectationSuiteSchema, ) from great_expectations.data_context import ( BaseDataContext, DataContext,...
true
true
1c312caf3764cd4dad921eaa796c13378b4645a6
3,030
py
Python
logging_server/logger.py
Geson-anko/logging_server
4617e6a971c81fc4df1cad1c35cdae5f09e20382
[ "MIT" ]
1
2022-03-29T23:00:56.000Z
2022-03-29T23:00:56.000Z
logging_server/logger.py
Geson-anko/logging_server
4617e6a971c81fc4df1cad1c35cdae5f09e20382
[ "MIT" ]
1
2022-03-23T11:54:02.000Z
2022-03-23T11:54:02.000Z
logging_server/logger.py
Geson-anko/logging_server
4617e6a971c81fc4df1cad1c35cdae5f09e20382
[ "MIT" ]
null
null
null
""" Logger class for mutiprocessing logging. Usage: from logging_server import SocketLogger logger = SocketLogger(__name__) logger.setLevel(0) logger.debug("debug") logger.info("info") logger.warning("warning") logger.error("error") logger.exception("exception") このロガークラスはlogging.Logge...
29.417476
96
0.639934
import os import logging import logging.handlers from typing import * def _check_pid(func): def check(self,*args, **kwds): if self.logger is None: self.set_logger() pid = os.getpid() if self._pid != pid: self._pid = pid self.reset_logger() func(s...
true
true
1c312d1dd12914eccb845d112a48c2d3462790c7
135
py
Python
frontend/admin.py
ebmdatalab/openpathology-web
e0620a39b174f2789df2cbea4e12bc413c1723ac
[ "MIT" ]
2
2019-10-08T10:13:25.000Z
2019-10-08T21:55:38.000Z
frontend/admin.py
HDRUK/openpathology-web
e0620a39b174f2789df2cbea4e12bc413c1723ac
[ "MIT" ]
44
2019-09-25T06:36:28.000Z
2021-08-18T11:59:24.000Z
frontend/admin.py
HDRUK/openpathology-web
e0620a39b174f2789df2cbea4e12bc413c1723ac
[ "MIT" ]
4
2019-08-12T14:02:54.000Z
2020-06-16T20:33:11.000Z
from django.contrib import admin from .models import Measure @admin.register(Measure) class MeasureAdmin(admin.ModelAdmin): pass
16.875
37
0.792593
from django.contrib import admin from .models import Measure @admin.register(Measure) class MeasureAdmin(admin.ModelAdmin): pass
true
true
1c312e102b9cebf8bdc37dfacda2a7151ffc0173
47,881
py
Python
testing/python/collect.py
cristianMeli/pytest
1824349f74298112722396be6f84a121bc9d6d63
[ "MIT" ]
1
2021-11-09T10:45:59.000Z
2021-11-09T10:45:59.000Z
testing/python/collect.py
cristianMeli/pytest
1824349f74298112722396be6f84a121bc9d6d63
[ "MIT" ]
59
2020-10-27T20:30:33.000Z
2022-03-28T03:02:29.000Z
testing/python/collect.py
symonk/pytest
a53abe93d87083bbd5c183bd654f5787c0376934
[ "MIT" ]
null
null
null
import os import sys import textwrap from typing import Any from typing import Dict import _pytest._code import pytest from _pytest.config import ExitCode from _pytest.main import Session from _pytest.monkeypatch import MonkeyPatch from _pytest.nodes import Collector from _pytest.pytester import Pytester from _pytest....
32.199731
116
0.549299
import os import sys import textwrap from typing import Any from typing import Dict import _pytest._code import pytest from _pytest.config import ExitCode from _pytest.main import Session from _pytest.monkeypatch import MonkeyPatch from _pytest.nodes import Collector from _pytest.pytester import Pytester from _pytest....
true
true
1c312e8c942f41e88f77ac62566074eccc27a9e4
565
py
Python
src/basics/factorial_dffierent_operator.py
sungheeyun/PythonLectures
3a748672bf5b39568b2f42e813a0b9402711ad8e
[ "Unlicense" ]
null
null
null
src/basics/factorial_dffierent_operator.py
sungheeyun/PythonLectures
3a748672bf5b39568b2f42e813a0b9402711ad8e
[ "Unlicense" ]
null
null
null
src/basics/factorial_dffierent_operator.py
sungheeyun/PythonLectures
3a748672bf5b39568b2f42e813a0b9402711ad8e
[ "Unlicense" ]
null
null
null
""" Below we show that the statement result = result * x can be rewritten to result *= x Like this, Python provides operators such as += -= *= /= """ def factorial(n): """ Return the factorial of n. Parameters ---------- n : an integer of which the factorial i...
13.139535
55
0.511504
def factorial(n): result = 1 for x in range(2, n + 1): result *= x return result if __name__ == "__main__": m = 10 print(m, "! =", factorial(m))
true
true
1c3131316358511257cd0a22ed38d1797a92d67b
4,000
py
Python
mycnn/alexnet.py
jacky10001/tf2-mycnn
6a631ee71b2a91fc4e6e7a43f8f9179260a1d7fa
[ "MIT" ]
null
null
null
mycnn/alexnet.py
jacky10001/tf2-mycnn
6a631ee71b2a91fc4e6e7a43f8f9179260a1d7fa
[ "MIT" ]
20
2022-01-24T15:28:48.000Z
2022-02-13T14:56:25.000Z
mycnn/alexnet.py
jacky10001/tf2-mycnn
6a631ee71b2a91fc4e6e7a43f8f9179260a1d7fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import tensorflow as tf from tensorflow.keras import layers from .core.base_model import KerasModel class LRN(layers.Layer): """ Implement Local Response Normalization """ def __init__(self, alpha=0.0001, k=2, beta=0.75, ...
30.534351
86
0.497
import tensorflow as tf from tensorflow.keras import layers from .core.base_model import KerasModel class LRN(layers.Layer): def __init__(self, alpha=0.0001, k=2, beta=0.75, n=5, **kwargs): super(LRN, self).__init__(**kw...
true
true
1c3131353ea8a23e84ed78c4de8ea42304b785ec
639
py
Python
venv/lib/python3.5/site-packages/coalib/results/HiddenResult.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/coalib/results/HiddenResult.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/coalib/results/HiddenResult.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
from coalib.results.Result import Result class HiddenResult(Result): """ This is a result that is not meant to be shown to the user. It can be used to transfer any data from a dependent bear to others. """ def __init__(self, origin, contents): """ Creates a new HiddenResult. The c...
29.045455
78
0.629108
from coalib.results.Result import Result class HiddenResult(Result): def __init__(self, origin, contents): Result.__init__(self, origin, '') self.contents = contents
true
true
1c31318d50082c5f4a09647c23e41e0b1e41fae2
425
py
Python
numpoly/__init__.py
FredrikMeyer/numpoly
8584d96370dd817df713034cc89a140708dd00a9
[ "BSD-2-Clause" ]
null
null
null
numpoly/__init__.py
FredrikMeyer/numpoly
8584d96370dd817df713034cc89a140708dd00a9
[ "BSD-2-Clause" ]
null
null
null
numpoly/__init__.py
FredrikMeyer/numpoly
8584d96370dd817df713034cc89a140708dd00a9
[ "BSD-2-Clause" ]
null
null
null
# pylint: disable=wildcard-import """Numpoly -- Multivariate polynomials as numpy elements.""" from .baseclass import ndpoly from .align import ( align_polynomials, align_exponents, align_indeterminants, align_shape, align_dtype, ) from .construct import ( polynomial, aspolynomial, clea...
20.238095
60
0.738824
from .baseclass import ndpoly from .align import ( align_polynomials, align_exponents, align_indeterminants, align_shape, align_dtype, ) from .construct import ( polynomial, aspolynomial, clean_attributes, ) from .sympy_ import to_sympy from .array_function import * from .poly_function...
true
true
1c31325282d4dfe6f0247bcb440be73457176259
4,317
py
Python
plugins/pelican-plugins/liquid_tags/pygalcharts.py
dbgriffith01/blog_source
bc5cd3e1ac1ff068de0cbb78b1470a7db743cd53
[ "MIT" ]
4
2018-09-18T19:16:44.000Z
2020-04-30T13:13:29.000Z
plugins/pelican-plugins/liquid_tags/pygalcharts.py
dbgriffith01/blog_source
bc5cd3e1ac1ff068de0cbb78b1470a7db743cd53
[ "MIT" ]
120
2018-09-01T20:27:51.000Z
2021-06-30T16:43:12.000Z
pelican-plugins/liquid_tags/pygalcharts.py
JN-Blog/jn-blog.com
669bf9a9c6813f2b7980792fb137f6718077aea1
[ "MIT" ]
3
2021-03-24T11:58:31.000Z
2022-01-12T16:03:06.000Z
""" pygal Tag --------- This implements a Liquid-style pygal tag for Pelican. JSON is used for the data, and you can pass a bunch of pygal's 'config' items through as-is [1] http://www.pygal.org/ Syntax ------ {% pygal { <graph data> } %} Examples -------- {% pygal { "type": "bar", "title": "Tes...
26.163636
140
0.562428
import base64 import re from json import loads from .mdx_liquid_tags import LiquidTags SYNTAX = '{% pygal (data) %}' DOT_BLOCK_RE = re.compile(r'^\s*\{\s*(?P<code>.*\})\s*\}$', re.MULTILINE | re.DOTALL) def run_pygal(data, options=[], format='svg'): import pygal chart_title = data.get('title', None) ch...
true
true
1c313315f6d7710923735974c2cc8f9b448ebeca
7,248
py
Python
networking_bagpipe/agent/bagpipe_ml2/agent_extension.py
daespinel/networking-bagpipe-1
7e96cc651394813c1dc80747186b6cfcaa173f14
[ "Apache-2.0" ]
29
2015-11-09T21:47:52.000Z
2022-01-25T16:03:17.000Z
networking_bagpipe/agent/bagpipe_ml2/agent_extension.py
openstack/networking-bagpipe-l2
d472fb7b5d05b70f9f4e12288eee1a9a01fdc9fd
[ "Apache-2.0" ]
null
null
null
networking_bagpipe/agent/bagpipe_ml2/agent_extension.py
openstack/networking-bagpipe-l2
d472fb7b5d05b70f9f4e12288eee1a9a01fdc9fd
[ "Apache-2.0" ]
9
2015-11-17T08:24:32.000Z
2020-10-25T18:59:48.000Z
# Copyright (c) 2015 Orange. # 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 a...
35.356098
89
0.639901
import sys import eventlet eventlet.monkey_patch() import __original_module_threading as orig_threading import threading orig_threading.current_thread.__globals__['_active'] = threading._active from oslo_concurrency import lockutils from oslo_config import cfg from oslo_config import types from oslo_log import ...
true
true
1c31346b9eb7cd50c1cd878990e61732e87c10f5
343
py
Python
wandbox/commands/__init__.py
v1nam/wandbox-cli
8ff88944ad3358dc99dd9bf4ac5c0cac2b98179b
[ "MIT" ]
7
2021-01-21T18:45:29.000Z
2021-01-27T06:54:17.000Z
wandbox/commands/__init__.py
v1nam/wandbox-cli
8ff88944ad3358dc99dd9bf4ac5c0cac2b98179b
[ "MIT" ]
null
null
null
wandbox/commands/__init__.py
v1nam/wandbox-cli
8ff88944ad3358dc99dd9bf4ac5c0cac2b98179b
[ "MIT" ]
null
null
null
from wandbox.commands.frominput import FromInput from wandbox.commands.fromfile import FromFile from wandbox.commands.frombuffer import FromBuffer from wandbox.commands.base import Base commands_dict = { "fromfile": FromFile.runfile, "frominput": FromInput.askinp, "frombuffer": FromBuffer.create_buffer, ...
26.384615
50
0.77551
from wandbox.commands.frominput import FromInput from wandbox.commands.fromfile import FromFile from wandbox.commands.frombuffer import FromBuffer from wandbox.commands.base import Base commands_dict = { "fromfile": FromFile.runfile, "frominput": FromInput.askinp, "frombuffer": FromBuffer.create_buffer, ...
true
true
1c3134fd41be915b03b8899512c41b8f42be8099
11,064
py
Python
deepchem/feat/smiles_tokenizer.py
StashOfCode/deepchem
6c5a5405acea333ee7a65a798ddb5c9df702a0b8
[ "MIT" ]
3
2019-05-29T19:18:25.000Z
2021-01-25T05:44:05.000Z
deepchem/feat/smiles_tokenizer.py
StashOfCode/deepchem
6c5a5405acea333ee7a65a798ddb5c9df702a0b8
[ "MIT" ]
10
2017-02-23T19:39:22.000Z
2017-08-31T22:21:18.000Z
deepchem/feat/smiles_tokenizer.py
StashOfCode/deepchem
6c5a5405acea333ee7a65a798ddb5c9df702a0b8
[ "MIT" ]
1
2018-09-22T00:53:53.000Z
2018-09-22T00:53:53.000Z
# Requriments - transformers, tokenizers # Right now, the Smiles Tokenizer uses an exiesting vocab file from rxnfp that is fairly comprehensive and from the USPTO dataset. # The vocab may be expanded in the near future import collections import os import re import pkg_resources from typing import List from transformer...
33.026866
132
0.62491
import collections import os import re import pkg_resources from typing import List from transformers import BertTokenizer from logging import getLogger logger = getLogger(__name__) SMI_REGEX_PATTERN = r"""(\[[^\]]+]|Br?|Cl?|N|O|S|P|F|I|b|c|n|o|s|p|\(|\)|\.|=| #|-|\+|\\|\/|:|~|@|\?|>>?|\*|\$|\%[0-9]{2}|[0-9])""" VO...
true
true
1c31354c7f061a127eb92c549b1b49593a89649b
3,235
py
Python
profiles_project/settings.py
kenbusse1/profiles-rest-api
5344db9a91667f55bbfec87497eb11617afee314
[ "MIT" ]
null
null
null
profiles_project/settings.py
kenbusse1/profiles-rest-api
5344db9a91667f55bbfec87497eb11617afee314
[ "MIT" ]
6
2020-02-12T03:12:05.000Z
2021-06-09T18:48:58.000Z
profiles_project/settings.py
kenbusse1/profiles-rest-api
5344db9a91667f55bbfec87497eb11617afee314
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
25.88
91
0.699227
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '-6but+soqw9&)!j1e(cbvmbr+8yfp!+l@9rm$d(fzc^#d0uk#8' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c3136359d7c666764adf29db4f5c6f2be46a2e4
3,159
py
Python
Algorithms_Course_1/Assignments/Algorithms_PA_1.py
vivekgoe/stanford_algorithms_courses
79afa0348dc4ecd8f631537b27e34c330abe773a
[ "MIT" ]
null
null
null
Algorithms_Course_1/Assignments/Algorithms_PA_1.py
vivekgoe/stanford_algorithms_courses
79afa0348dc4ecd8f631537b27e34c330abe773a
[ "MIT" ]
null
null
null
Algorithms_Course_1/Assignments/Algorithms_PA_1.py
vivekgoe/stanford_algorithms_courses
79afa0348dc4ecd8f631537b27e34c330abe773a
[ "MIT" ]
null
null
null
import time import math count_naive = 0 count = 0 def mul_large_naive(N1, N2): global count_naive assert(N1.__len__() == N2.__len__()) len = N1.__len__() if len > 1: a = N1[0:int(len/2)] b = N1[int(len/2):int(len)] c = N2[0:int(len/2)] d = N2[int(len/2):int(...
34.714286
104
0.552073
import time import math count_naive = 0 count = 0 def mul_large_naive(N1, N2): global count_naive assert(N1.__len__() == N2.__len__()) len = N1.__len__() if len > 1: a = N1[0:int(len/2)] b = N1[int(len/2):int(len)] c = N2[0:int(len/2)] d = N2[int(len/2):int(...
true
true
1c31365bc2dbe1275ef4e8e056e716303fbecc05
13,411
py
Python
electrum/gui/qt/transaction_dialog.py
traysi/electrum-raven
b2a64a459da32afd2987149460253cfadec03384
[ "MIT" ]
5
2018-10-31T18:47:54.000Z
2021-09-20T02:04:42.000Z
electrum/gui/qt/transaction_dialog.py
project-mynt/electrum-mynt
ca1548e008854f2a3eff900a69365307cc20bd57
[ "MIT" ]
null
null
null
electrum/gui/qt/transaction_dialog.py
project-mynt/electrum-mynt
ca1548e008854f2a3eff900a69365307cc20bd57
[ "MIT" ]
11
2018-10-31T19:46:05.000Z
2019-09-25T20:18:37.000Z
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
39.560472
134
0.634628
import copy import datetime import json import traceback from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import qrcode from qrcode import exceptions from electrum.bitcoin import base_encode from electrum.i18n import _ from electrum.plugin import run_hook from electrum import simple...
true
true
1c3136a13a110e5c45f53c6aeb6f0ed4d8822808
358
py
Python
leetcode/0062_unique-paths.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
leetcode/0062_unique-paths.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
leetcode/0062_unique-paths.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=62 lang=python3 # # [62] Unique Paths # # @lc code=start class Solution: def uniquePaths(self, m: int, n: int) -> int: dp = [ 1 for i in range(n)] for _ in range(1,m): for j in range(1,n): dp[j] += dp[j-1] return dp[-1] # @lc code=end s =...
18.842105
49
0.52514
class Solution: def uniquePaths(self, m: int, n: int) -> int: dp = [ 1 for i in range(n)] for _ in range(1,m): for j in range(1,n): dp[j] += dp[j-1] return dp[-1] s = Solution() print(s.uniquePaths(7,3))
true
true
1c313710cd0098036ec3618c2755120adfb5e3a8
455
py
Python
util/tools.py
QuietWoods/patent-rewrite
3bf85a3a5a0dfc7caaf602fc32fe3b727da01944
[ "Apache-2.0" ]
null
null
null
util/tools.py
QuietWoods/patent-rewrite
3bf85a3a5a0dfc7caaf602fc32fe3b727da01944
[ "Apache-2.0" ]
null
null
null
util/tools.py
QuietWoods/patent-rewrite
3bf85a3a5a0dfc7caaf602fc32fe3b727da01944
[ "Apache-2.0" ]
1
2020-09-09T14:49:25.000Z
2020-09-09T14:49:25.000Z
# -*- coding: utf-8 -*- # @Time : 2018/4/24 16:52 # @Author : Wang Lei # @FileName: tools.py # @Software: PyCharm # @Email :1258481281@qq.com import os from PatentRewrite.util.gensim_word2vec import Word2vec, Sentences from PatentRewrite.util.settings import WORD2VEC, PATENTS, TEMP_PATENTS def train_word2vec()...
20.681818
71
0.705495
import os from PatentRewrite.util.gensim_word2vec import Word2vec, Sentences from PatentRewrite.util.settings import WORD2VEC, PATENTS, TEMP_PATENTS def train_word2vec(): model_dir = WORD2VEC word2vec = Word2vec(model_dir) word2vec.train() if __name__ == "__main__": train_word2vec()
true
true
1c31377812b00907ea0d4ff34371845055ca7a6c
1,563
py
Python
tests/conftest.py
johnnoone/aiodisque
afb6851ac907783a69b4b2e5c09456ae48a1faba
[ "MIT" ]
null
null
null
tests/conftest.py
johnnoone/aiodisque
afb6851ac907783a69b4b2e5c09456ae48a1faba
[ "MIT" ]
null
null
null
tests/conftest.py
johnnoone/aiodisque
afb6851ac907783a69b4b2e5c09456ae48a1faba
[ "MIT" ]
null
null
null
import os.path from pytest import fixture from tempfile import TemporaryDirectory from subprocess import Popen, PIPE, run from time import sleep class Configuration: def __init__(self, **opts): for k, v in opts.items(): setattr(self, k, v) class DisqueNode: def __init__(self, port, dir)...
26.05
78
0.568138
import os.path from pytest import fixture from tempfile import TemporaryDirectory from subprocess import Popen, PIPE, run from time import sleep class Configuration: def __init__(self, **opts): for k, v in opts.items(): setattr(self, k, v) class DisqueNode: def __init__(self, port, dir)...
true
true
1c3138931e6dc6d58b703a644a6df7d2ebb08023
485
py
Python
TOR/ConnectionsHandler/Models/DNSExitNode.py
AmerJod/Tor_DNS-Servers
bd95ff28bb697a4e0ba7d0276b366e83a6718a13
[ "MIT" ]
2
2019-05-22T09:42:51.000Z
2021-06-15T19:05:22.000Z
TOR/ConnectionsHandler/Models/DNSExitNode.py
txrproject/Tor_DNS-Servers
bd95ff28bb697a4e0ba7d0276b366e83a6718a13
[ "MIT" ]
null
null
null
TOR/ConnectionsHandler/Models/DNSExitNode.py
txrproject/Tor_DNS-Servers
bd95ff28bb697a4e0ba7d0276b366e83a6718a13
[ "MIT" ]
1
2020-12-23T05:26:32.000Z
2020-12-23T05:26:32.000Z
""" This class is for each exitNode which delong to DNS resolver """ class DNSExitNode(): def __init__(self,nodeIP,nodeDomain,nodeModifiedDomainfull): self.exitNodeIP = nodeIP self.nodeDomian = nodeDomain self.nodeModifiedDomian = nodeModifiedDomainfull self.JSON = self.reprExitNod...
34.642857
116
0.742268
class DNSExitNode(): def __init__(self,nodeIP,nodeDomain,nodeModifiedDomainfull): self.exitNodeIP = nodeIP self.nodeDomian = nodeDomain self.nodeModifiedDomian = nodeModifiedDomainfull self.JSON = self.reprExitNodelistJSON() def reprExitNodelistJSON(self): return dict(...
true
true
1c313bd1421fd2c0959b8883eeab4a41d2c364c8
2,545
py
Python
code/remove_invariant_sites_from_phylip.py
nealplatt/sch_man_nwinvasion
73f7ce5fa4843cc2352fdb709b134f22af28ad19
[ "MIT" ]
null
null
null
code/remove_invariant_sites_from_phylip.py
nealplatt/sch_man_nwinvasion
73f7ce5fa4843cc2352fdb709b134f22af28ad19
[ "MIT" ]
null
null
null
code/remove_invariant_sites_from_phylip.py
nealplatt/sch_man_nwinvasion
73f7ce5fa4843cc2352fdb709b134f22af28ad19
[ "MIT" ]
null
null
null
### RNPlatt ### 05 Sept 2019 ### USAGE: remove_invariant_sites_from_phylip.py <list of invariants> <phylip> <outfile> ### ### This will take a list of invariant sites predetermined by raxml in a single ### site per line file and the original phylip file used in raxml and return ### a phylip file with all the i...
29.252874
91
0.662083
import sys import numpy as np invariant_file=sys.argv[1] phylip_file=sys.argv[2] out_file=sys.argv[3] inv_sites_infile=open(invariant_file, "r") inv_sites=inv_sites_infile.readlines() i=0 for entry in inv_sites: inv_sites[i]=int(entry.rstrip())-1 i=i+1 phylip_infile=open(phylip_file, "r") phylip_data=phyli...
true
true
1c313c2826e1f112676e1337859553b9cf492376
7,335
py
Python
src/utils/chatArchiver.py
ayman2598/GabbyGums
b68ab01610ac399aa2b7daa97d5d71dd0d1b19d6
[ "Apache-2.0" ]
2
2019-12-13T20:06:14.000Z
2022-01-23T00:34:29.000Z
src/utils/chatArchiver.py
ayman2598/GabbyGums
b68ab01610ac399aa2b7daa97d5d71dd0d1b19d6
[ "Apache-2.0" ]
23
2019-10-19T16:55:45.000Z
2020-03-14T16:18:05.000Z
src/utils/chatArchiver.py
amadea-system/GabbyGums
b68ab01610ac399aa2b7daa97d5d71dd0d1b19d6
[ "Apache-2.0" ]
6
2019-12-13T20:06:17.000Z
2021-02-12T16:21:04.000Z
""" Methods for generating HTML and TXT archives of a discord chat from a list of discord messages. Part of the Gabby Gums Discord Logger. """ import hmac import logging import hashlib from functools import partial from datetime import datetime from io import StringIO, SEEK_END, SEEK_SET from typing import TYPE_CHEC...
36.675
175
0.667894
import hmac import logging import hashlib from functools import partial from datetime import datetime from io import StringIO, SEEK_END, SEEK_SET from typing import TYPE_CHECKING, Optional, Dict, List, Union, Tuple, NamedTuple, Match import regex as re from jinja2 import Template, Environment, FileSystemLoader fro...
true
true
1c313d9466ba24619116f017bf281b737b3abf9e
1,704
py
Python
vigobusbot/telegram_bot/services/message_generators/stop_message_text.py
David-Lor/VigoBus-TelegramBot
2cbba9a6565e7f8c92953e79b9ca4247d53f4b33
[ "Apache-2.0" ]
8
2019-07-18T21:33:04.000Z
2022-03-26T15:07:14.000Z
vigobusbot/telegram_bot/services/message_generators/stop_message_text.py
EnforcerZhukov/VigoBus-TelegramBot
9a0258edf5ff34ecedab6bcf4a8238f07bc318fa
[ "Apache-2.0" ]
3
2021-09-10T19:53:36.000Z
2021-09-10T19:53:37.000Z
vigobusbot/telegram_bot/services/message_generators/stop_message_text.py
EnforcerZhukov/VigoBus-TelegramBot
9a0258edf5ff34ecedab6bcf4a8238f07bc318fa
[ "Apache-2.0" ]
3
2019-09-24T15:43:23.000Z
2020-04-18T17:48:29.000Z
"""STOP MESSAGE TEXT Helper to generate the Stop Message text body """ # # Native # # import datetime from typing import Optional # # Project # # from vigobusbot.persistence_api import saved_stops from vigobusbot.static_handler import get_messages from vigobusbot.entities import Stop, BusesResponse __all__ = ("gener...
28.881356
85
0.663732
import datetime from typing import Optional from vigobusbot.persistence_api import saved_stops from vigobusbot.static_handler import get_messages from vigobusbot.entities import Stop, BusesResponse __all__ = ("generate_stop_message_text",) def generate_stop_message_text( stop: Stop, buses_response:...
true
true
1c313dedbfd5a753fe40dabaad5a4b121ecda8d2
11,682
py
Python
test/IECore/CompoundData.py
gcodebackups/cortex-vfx
72fa6c6eb3327fce4faf01361c8fcc2e1e892672
[ "BSD-3-Clause" ]
5
2016-07-26T06:09:28.000Z
2022-03-07T03:58:51.000Z
test/IECore/CompoundData.py
turbosun/cortex
4bdc01a692652cd562f3bfa85f3dae99d07c0b15
[ "BSD-3-Clause" ]
null
null
null
test/IECore/CompoundData.py
turbosun/cortex
4bdc01a692652cd562f3bfa85f3dae99d07c0b15
[ "BSD-3-Clause" ]
3
2015-03-25T18:45:24.000Z
2020-02-15T15:37:18.000Z
########################################################################## # # Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
30.421875
145
0.621041
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import os import math import unittest import sys import subprocess import IECore class CompoundDataTest(unittest.TestCase): def testConstructors(self): v1 = IECore.CompoundData() a = dict() a["1"] = IECore.IntData(1) v3 = IECore....
true
true
1c313ecf741a8525f0d69119189313d14407c4bb
72
py
Python
oauth_login/login/__init__.py
vinoth3v/In_addon_oauth_login
b7ebfaa8d3a3c455d58300ac7c23da761273aadf
[ "Apache-2.0" ]
1
2015-12-16T03:25:31.000Z
2015-12-16T03:25:31.000Z
oauth_login/login/__init__.py
vinoth3v/In_addon_oauth_login
b7ebfaa8d3a3c455d58300ac7c23da761273aadf
[ "Apache-2.0" ]
null
null
null
oauth_login/login/__init__.py
vinoth3v/In_addon_oauth_login
b7ebfaa8d3a3c455d58300ac7c23da761273aadf
[ "Apache-2.0" ]
1
2019-09-13T10:12:23.000Z
2019-09-13T10:12:23.000Z
from .oauth_login import * from .google import * from .facebook import *
24
26
0.763889
from .oauth_login import * from .google import * from .facebook import *
true
true
1c313f615a5d3d57e72c3049381ae4c7671ebbf2
812
py
Python
srv/item/getBudget.py
jphacks/KB_1814
7ae538272f960a5f21460961ebf1112a6e819e3e
[ "MIT" ]
5
2018-10-19T11:09:35.000Z
2020-02-14T07:31:52.000Z
srv/item/getBudget.py
jphacks/KB_1814
7ae538272f960a5f21460961ebf1112a6e819e3e
[ "MIT" ]
null
null
null
srv/item/getBudget.py
jphacks/KB_1814
7ae538272f960a5f21460961ebf1112a6e819e3e
[ "MIT" ]
null
null
null
import requests import json def getBudget(a, b, c): latitude = a longitude = b name = c url = "https://api.gnavi.co.jp/RestSearchAPI/20150630/?keyid=264a257d88e6a732c7195178e8f86f90&format=json&latitude=" + latitude + "&longitude="+ longitude +"&name=" + name headers = {"content-type": "applicatio...
28
175
0.608374
import requests import json def getBudget(a, b, c): latitude = a longitude = b name = c url = "https://api.gnavi.co.jp/RestSearchAPI/20150630/?keyid=264a257d88e6a732c7195178e8f86f90&format=json&latitude=" + latitude + "&longitude="+ longitude +"&name=" + name headers = {"content-type": "applicatio...
true
true
1c31409a6f754c3d642a2e3a3784a98d7c74ce04
3,200
py
Python
OneImage2Video/school_badge.py
HypoX64/bilibili
992029667ad37d7d03131aa2c4c9923da6cca6f2
[ "MIT" ]
24
2020-05-24T10:39:24.000Z
2022-03-09T02:38:09.000Z
OneImage2Video/school_badge.py
HypoX64/bilibili
992029667ad37d7d03131aa2c4c9923da6cca6f2
[ "MIT" ]
null
null
null
OneImage2Video/school_badge.py
HypoX64/bilibili
992029667ad37d7d03131aa2c4c9923da6cca6f2
[ "MIT" ]
2
2021-03-24T13:54:17.000Z
2021-08-07T12:23:51.000Z
import os import cv2 import numpy as np import sys sys.path.append("..") from Util import util,ffmpeg # 用校徽看badapple imgs_dir = './pixel_imgs/university/base' highlight_dir = './pixel_imgs/university/highlight' background_dir = './pixel_imgs/university/background' cut_size = 79 pixel_resize = 0 # resize pixel_imgs, ...
36.363636
106
0.647188
import os import cv2 import numpy as np import sys sys.path.append("..") from Util import util,ffmpeg imgs_dir = './pixel_imgs/university/base' highlight_dir = './pixel_imgs/university/highlight' background_dir = './pixel_imgs/university/background' cut_size = 79 pixel_resize = 0 output_pixel_num = 18 video_path = '...
true
true
1c31419028d0e3ca587e782497408e42320f2b43
18,493
py
Python
tests/unittests/storage/test_storage.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
4
2020-03-25T17:44:40.000Z
2020-04-10T13:53:13.000Z
tests/unittests/storage/test_storage.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
2
2018-06-26T19:17:09.000Z
2022-02-23T13:40:04.000Z
tests/unittests/storage/test_storage.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
2
2019-08-26T11:36:47.000Z
2020-04-07T13:05:48.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Collection of tests for :mod:`orion.storage`.""" import copy import datetime import json import tempfile import pytest from orion.core.io.database import DuplicateKeyError from orion.core.utils.tests import OrionState from orion.core.worker.trial import Trial from ori...
36.912176
99
0.607689
import copy import datetime import json import tempfile import pytest from orion.core.io.database import DuplicateKeyError from orion.core.utils.tests import OrionState from orion.core.worker.trial import Trial from orion.storage.base import FailedUpdate, get_storage, MissingArguments storage_backends = [ None,...
true
true
1c31447e628621eb59455f56b1ff028fed8377fa
7,091
py
Python
adanet/core/report_accessor_test.py
intruder1912/adanet
dfa2f0acc253d1de193aaa795b5559bc471f9ed8
[ "Apache-2.0" ]
1
2018-11-02T04:57:02.000Z
2018-11-02T04:57:02.000Z
adanet/core/report_accessor_test.py
oz99999/adanet
69354c4e961defca790a1ce0e042251dfbe4f410
[ "Apache-2.0" ]
null
null
null
adanet/core/report_accessor_test.py
oz99999/adanet
69354c4e961defca790a1ce0e042251dfbe4f410
[ "Apache-2.0" ]
1
2021-12-14T08:18:17.000Z
2021-12-14T08:18:17.000Z
"""Tests for run_report_accessor.py. Copyright 2018 The AdaNet 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 https://www.apache.org/licenses/LICENSE-2.0 Unless...
29.919831
77
0.453674
from __future__ import absolute_import from __future__ import division from __future__ import print_function from adanet.core import subnetwork from adanet.core.report_accessor import _ReportAccessor import tensorflow as tf class ReportAccessorTest(tf.test.TestCase): def test_read_from_empty_file(self): repo...
true
true
1c3145f61b2b8516ef38e743c7ccb56f655d667a
2,816
py
Python
video_statistics_data.py
MrSipahi/Youtube_Statistics_Data
33a08fd334a9c00139727fe6cfa6b0bc95604eba
[ "MIT" ]
null
null
null
video_statistics_data.py
MrSipahi/Youtube_Statistics_Data
33a08fd334a9c00139727fe6cfa6b0bc95604eba
[ "MIT" ]
null
null
null
video_statistics_data.py
MrSipahi/Youtube_Statistics_Data
33a08fd334a9c00139727fe6cfa6b0bc95604eba
[ "MIT" ]
null
null
null
import urllib import urllib3 import requests import json from datetime import datetime import locale import pymysql as MySQLdb db = MySQLdb.connect("ip","user","password","db_names" ) cursor = db.cursor() # keys = ["API_KEYS"] key_numara = 0 API_KEY = keys[key_numara] query="SELECT * FROM ka...
30.945055
268
0.559304
import urllib import urllib3 import requests import json from datetime import datetime import locale import pymysql as MySQLdb db = MySQLdb.connect("ip","user","password","db_names" ) cursor = db.cursor() keys = ["API_KEYS"] key_numara = 0 API_KEY = keys[key_numara] query="SELECT * FROM kanal...
true
true
1c3146ee467192cfaa82f4f675c16f5fe535c5b7
9,364
py
Python
awx/main/utils/formatters.py
dvaerum/awx
eeab4b90a55864c9c80882e25780a914398b9e51
[ "Apache-2.0" ]
1
2020-04-10T21:29:52.000Z
2020-04-10T21:29:52.000Z
awx/main/utils/formatters.py
dvaerum/awx
eeab4b90a55864c9c80882e25780a914398b9e51
[ "Apache-2.0" ]
null
null
null
awx/main/utils/formatters.py
dvaerum/awx
eeab4b90a55864c9c80882e25780a914398b9e51
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Ansible Tower by Red Hat # All Rights Reserved. from copy import copy import json import logging import traceback import socket from datetime import datetime from dateutil.tz import tzutc from django.core.serializers.json import DjangoJSONEncoder from django.conf import settings class TimeForma...
37.758065
111
0.595686
from copy import copy import json import logging import traceback import socket from datetime import datetime from dateutil.tz import tzutc from django.core.serializers.json import DjangoJSONEncoder from django.conf import settings class TimeFormatter(logging.Formatter): def format(self, record): record...
true
true
1c3147546d1847c7fd6da0c2a520a28952b357fb
401
py
Python
open-codegen/opengen/functions/norm2.py
jgillis/optimization-engine
2952af47891204d3cd080a8e7f71e616ac022e52
[ "Apache-2.0", "MIT" ]
null
null
null
open-codegen/opengen/functions/norm2.py
jgillis/optimization-engine
2952af47891204d3cd080a8e7f71e616ac022e52
[ "Apache-2.0", "MIT" ]
null
null
null
open-codegen/opengen/functions/norm2.py
jgillis/optimization-engine
2952af47891204d3cd080a8e7f71e616ac022e52
[ "Apache-2.0", "MIT" ]
null
null
null
import casadi.casadi as cs import numpy as np from .is_numeric import * from .is_symbolic import * def norm2(u): if (isinstance(u, list) and all(is_numeric(x) for x in u))\ or isinstance(u, np.ndarray): # if `u` is a numeric vector return np.linalg.norm(u) elif is_symbolic(u): ...
26.733333
63
0.628429
import casadi.casadi as cs import numpy as np from .is_numeric import * from .is_symbolic import * def norm2(u): if (isinstance(u, list) and all(is_numeric(x) for x in u))\ or isinstance(u, np.ndarray): return np.linalg.norm(u) elif is_symbolic(u): return cs.norm_2(u) ...
true
true
1c31489dab3dea9499e3bba760b2a7bdeb0f6ada
1,389
py
Python
ssseg/cfgs/dmnet/cfgs_ade20k_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
2
2021-10-31T21:52:30.000Z
2021-12-21T12:35:37.000Z
ssseg/cfgs/dmnet/cfgs_ade20k_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
ssseg/cfgs/dmnet/cfgs_ade20k_resnet50os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
'''define the config file for ade20k and resnet50os16''' import os from .base_cfg import * # modify dataset config DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) # modify dataloader config DATALOADER_CFG = DATALOADER_CFG.copy() # modi...
25.722222
96
0.657307
import os from .base_cfg import * DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) DATALOADER_CFG = DATALOADER_CFG.copy() OPTIMIZER_CFG = OPTIMIZER_CFG.copy() OPTIMIZER_CFG.update( { 'max_epochs': 130 } ) LOSSES_CFG = LO...
true
true
1c3149e38f7b6cc0039c07d18c3679a41298157e
34,017
py
Python
python/interpret_community/mimic/mimic_explainer.py
bethz/interpret-community
3932bfe93aedbc2a6409de1e169e0576cedc8b0d
[ "MIT" ]
2
2020-10-14T01:02:37.000Z
2022-02-17T01:47:49.000Z
python/interpret_community/mimic/mimic_explainer.py
bethz/interpret-community
3932bfe93aedbc2a6409de1e169e0576cedc8b0d
[ "MIT" ]
12
2021-03-10T01:29:02.000Z
2022-02-26T21:11:42.000Z
python/interpret_community/mimic/mimic_explainer.py
bethz/interpret-community
3932bfe93aedbc2a6409de1e169e0576cedc8b0d
[ "MIT" ]
null
null
null
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """Defines the Mimic Explainer for computing explanations on black box models or functions. The mimic explainer trains an explainable mode...
58.852941
119
0.704677
import numpy as np from ..common.explanation_utils import _order_imp from ..common.model_wrapper import _wrap_model from .._internal.raw_explain.raw_explain_utils import get_datamapper_and_transformed_data, \ transform_with_datamapper from ..common.blackbox_explainer import BlackBoxExplainer from .model_distil...
true
true
1c314a83c757289e9cad510ead448cfc9ded4f58
4,987
py
Python
meidoo/meidoo/apps/orders/serializers.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
meidoo/meidoo/apps/orders/serializers.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
meidoo/meidoo/apps/orders/serializers.py
amourbrus/meiduo_mall
965b3d4685d1a8fe18a3177cc864f27eeb516081
[ "MIT" ]
null
null
null
from decimal import Decimal from django.db import transaction from django.utils import timezone from django_redis import get_redis_connection from rest_framework import serializers from rest_framework.exceptions import ValidationError from goods.models import SKU from orders.models import OrderInfo, OrderGoods from me...
33.02649
109
0.49609
from decimal import Decimal from django.db import transaction from django.utils import timezone from django_redis import get_redis_connection from rest_framework import serializers from rest_framework.exceptions import ValidationError from goods.models import SKU from orders.models import OrderInfo, OrderGoods from me...
true
true
1c314b335cc15f8a988e00f70740c268b55cf132
391
py
Python
profile_api/migrations/0002_auto_20210516_0944.py
manishmittal050/profile-rest-api
458806f901e42bfd98fbd14e3da37da7240a01d4
[ "MIT" ]
null
null
null
profile_api/migrations/0002_auto_20210516_0944.py
manishmittal050/profile-rest-api
458806f901e42bfd98fbd14e3da37da7240a01d4
[ "MIT" ]
null
null
null
profile_api/migrations/0002_auto_20210516_0944.py
manishmittal050/profile-rest-api
458806f901e42bfd98fbd14e3da37da7240a01d4
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-05-16 09:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profile_api', '0001_initial'), ] operations = [ migrations.AlterField( model_name='userprofile', name='is_superuser', ...
20.578947
53
0.606138
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profile_api', '0001_initial'), ] operations = [ migrations.AlterField( model_name='userprofile', name='is_superuser', field=models.BooleanField(default=...
true
true
1c314be71dc8f37a5d141751c30c55aed4361499
6,174
py
Python
tests/testshop/settings.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
2,160
2016-01-24T05:08:59.000Z
2022-03-31T12:15:30.000Z
tests/testshop/settings.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
455
2016-01-29T22:41:33.000Z
2022-03-23T08:28:01.000Z
tests/testshop/settings.py
2000-ion/TIDPP-Lab3
3fc97e6214b6e51f40df39f1692d4deec4bb0cc2
[ "BSD-3-Clause" ]
818
2016-02-01T15:09:07.000Z
2022-03-28T19:52:26.000Z
from django.urls import reverse_lazy from django.utils.text import format_lazy DEBUG = True ROOT_URLCONF = 'testshop.urls' SECRET_KEY = 'test' SITE_ID = 1 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } STATIC_URL = '/static/' MEDIA_URL = '/media...
27.5625
119
0.671526
from django.urls import reverse_lazy from django.utils.text import format_lazy DEBUG = True ROOT_URLCONF = 'testshop.urls' SECRET_KEY = 'test' SITE_ID = 1 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } STATIC_URL = '/static/' MEDIA_URL = '/media...
true
true
1c314c09b523262c1d016eb7b0d051d3bc9ce51c
735
py
Python
image_downloader.py
art-litv/Space-Instagram
98fd162cc7795bf66ca28fa2b112dc0c837914fa
[ "MIT" ]
null
null
null
image_downloader.py
art-litv/Space-Instagram
98fd162cc7795bf66ca28fa2b112dc0c837914fa
[ "MIT" ]
null
null
null
image_downloader.py
art-litv/Space-Instagram
98fd162cc7795bf66ca28fa2b112dc0c837914fa
[ "MIT" ]
null
null
null
import requests import os import urllib3 from pathlib import PurePath def download_image(url: str, path: str, verify=True): ''' Downloads an image into "images" directory ''' ''' Required for fetch_spacex.py and fetch_hubble.py ''' urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) r...
27.222222
71
0.678912
import requests import os import urllib3 from pathlib import PurePath def download_image(url: str, path: str, verify=True): urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) response = requests.get(url, verify=verify) response.raise_for_status() filename = path.split(os.sep)[-1] ...
true
true
1c314d4280a04da568ad4442058981508effe981
2,057
py
Python
test/test_validators.py
srobo/python-dbus-next
934df62b29651cfbf513d244ad7ed138faab6fe4
[ "MIT" ]
1
2021-02-28T15:51:52.000Z
2021-02-28T15:51:52.000Z
test/test_validators.py
srobo/python-dbus-next
934df62b29651cfbf513d244ad7ed138faab6fe4
[ "MIT" ]
null
null
null
test/test_validators.py
srobo/python-dbus-next
934df62b29651cfbf513d244ad7ed138faab6fe4
[ "MIT" ]
1
2021-03-08T14:22:27.000Z
2021-03-08T14:22:27.000Z
from dbus_next import (is_bus_name_valid, is_object_path_valid, is_interface_name_valid, is_member_name_valid) def test_object_path_validator(): valid_paths = ['/', '/foo', '/foo/bar', '/foo/bar/bat'] invalid_paths = [ None, {}, '', 'foo', 'foo/bar', '/foo/bar/', '/$/foo/bar', '...
38.811321
95
0.635391
from dbus_next import (is_bus_name_valid, is_object_path_valid, is_interface_name_valid, is_member_name_valid) def test_object_path_validator(): valid_paths = ['/', '/foo', '/foo/bar', '/foo/bar/bat'] invalid_paths = [ None, {}, '', 'foo', 'foo/bar', '/foo/bar/', '/$/foo/bar', '...
true
true
1c314dfe0048db5f295b09c35b1e27c582e5f4bb
78
py
Python
run.py
TianxiaoHu/GomokuAgent
8cb05025059945692846cbb0541a834e9f985ce2
[ "MIT" ]
15
2017-06-29T07:47:12.000Z
2021-11-09T05:33:59.000Z
run.py
TianxiaoHu/GomokuAgent
8cb05025059945692846cbb0541a834e9f985ce2
[ "MIT" ]
null
null
null
run.py
TianxiaoHu/GomokuAgent
8cb05025059945692846cbb0541a834e9f985ce2
[ "MIT" ]
1
2019-12-01T07:53:48.000Z
2019-12-01T07:53:48.000Z
#!/usr/bin/env python from app import app app.run(debug=True, threaded=True)
15.6
34
0.74359
from app import app app.run(debug=True, threaded=True)
true
true
1c314fdde8f8337ef25ea5bbed6c290af6543d97
5,429
py
Python
lib/web/ui.py
Juniper/YAPT
b1a54998867c70352001415d5e4b70408480dab9
[ "BSD-3-Clause" ]
33
2018-05-17T04:16:56.000Z
2021-11-25T21:21:02.000Z
lib/web/ui.py
Juniper/YAPT
b1a54998867c70352001415d5e4b70408480dab9
[ "BSD-3-Clause" ]
4
2021-01-10T20:45:31.000Z
2021-09-23T23:21:16.000Z
lib/web/ui.py
Juniper/YAPT
b1a54998867c70352001415d5e4b70408480dab9
[ "BSD-3-Clause" ]
8
2018-09-19T12:18:54.000Z
2021-01-10T03:49:10.000Z
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER # Copyright (c) 2018 Juniper Networks, Inc. # All rights reserved. # Use is subject to license terms. # # Author: cklewar import socket import jsonpickle import lib.constants as c from lib.amqp.amqpadapter import AMQPBlockingServerAdapter from lib.amqp.am...
47.208696
117
0.640081
import socket import jsonpickle import lib.constants as c from lib.amqp.amqpadapter import AMQPBlockingServerAdapter from lib.amqp.amqpmessage import AMQPMessage from lib.web.logviewer import LogViewer from lib.logmsg import LogCommon from lib.logmsg import LogUiProcessor as logmsg from lib.processor import BackendCl...
true
true
1c3150901e20732eec2c6bd14f28487bfc0b51c5
1,684
py
Python
freezing/model/migrations/versions/f620a24f5f7e_least_variance.py
freezingsaddles/freezing-model
3bb03739d5bdff418bcf17707a52c9994c45e52f
[ "Apache-2.0" ]
2
2020-01-02T01:23:00.000Z
2022-01-03T20:57:39.000Z
freezing/model/migrations/versions/f620a24f5f7e_least_variance.py
freezingsaddles/freezing-model
3bb03739d5bdff418bcf17707a52c9994c45e52f
[ "Apache-2.0" ]
8
2018-01-19T14:36:05.000Z
2021-11-24T19:22:19.000Z
freezing/model/migrations/versions/f620a24f5f7e_least_variance.py
freezingsaddles/freezing-model
3bb03739d5bdff418bcf17707a52c9994c45e52f
[ "Apache-2.0" ]
1
2018-10-28T16:09:51.000Z
2018-10-28T16:09:51.000Z
from alembic import op import sqlalchemy as sa """least-variance Revision ID: f620a24f5f7e Revises: b4d003c71167 Create Date: 2020-01-03 23:06:50.491509 """ # revision identifiers, used by Alembic. revision = "f620a24f5f7e" down_revision = "b4d003c71167" def upgrade(): op.execute( """ cre...
31.773585
78
0.515439
from alembic import op import sqlalchemy as sa revision = "f620a24f5f7e" down_revision = "b4d003c71167" def upgrade(): op.execute( """ create or replace view variance_by_day as select ds.athlete_id, sum(case when ds.distance >= 1 then 1 el...
true
true
1c3151b5319a6b48830c7ba8f9a693be51342a4a
98
py
Python
config.py
boada/microblog
84f2d1a71327da3f6283b74a3b3d722e034b2f5f
[ "MIT" ]
1
2020-02-21T16:13:45.000Z
2020-02-21T16:13:45.000Z
config.py
boada/microblog
84f2d1a71327da3f6283b74a3b3d722e034b2f5f
[ "MIT" ]
null
null
null
config.py
boada/microblog
84f2d1a71327da3f6283b74a3b3d722e034b2f5f
[ "MIT" ]
null
null
null
import os class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'my-secret-key'
19.6
64
0.714286
import os class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'my-secret-key'
true
true
1c3152ca4581bd3fdb80edd4e4c01537da05cec5
1,256
py
Python
qcloudsdkmonitor/GetMonitorDataRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmonitor/GetMonitorDataRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmonitor/GetMonitorDataRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class GetMonitorDataRequest(Request): def __init__(self): super(GetMonitorDataRequest, self).__init__( 'monitor', 'qcloudcliV1', 'GetMonitorData', 'monitor.api.qcloud.com') def get_dimensions(self): return self.get...
27.304348
81
0.667197
from qcloudsdkcore.request import Request class GetMonitorDataRequest(Request): def __init__(self): super(GetMonitorDataRequest, self).__init__( 'monitor', 'qcloudcliV1', 'GetMonitorData', 'monitor.api.qcloud.com') def get_dimensions(self): return self.get_params().get('dimension...
true
true
1c3153c25f4173c0d69cf19c9085eee9f382434a
2,768
py
Python
plenum/test/txn_author_agreement/test_get_empty_txn_author_agreement.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
null
null
null
plenum/test/txn_author_agreement/test_get_empty_txn_author_agreement.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
1
2019-03-20T14:57:22.000Z
2019-03-20T15:01:55.000Z
plenum/test/txn_author_agreement/test_get_empty_txn_author_agreement.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
null
null
null
import pytest from plenum.common.constants import REPLY, CONFIG_LEDGER_ID from plenum.common.exceptions import RequestNackedException from plenum.common.util import get_utc_epoch from plenum.test.delayers import req_delay from plenum.test.stasher import delay_rules from plenum.test.txn_author_agreement.helper import s...
41.939394
106
0.725072
import pytest from plenum.common.constants import REPLY, CONFIG_LEDGER_ID from plenum.common.exceptions import RequestNackedException from plenum.common.util import get_utc_epoch from plenum.test.delayers import req_delay from plenum.test.stasher import delay_rules from plenum.test.txn_author_agreement.helper import s...
true
true
1c31541017e2e3db5152ae18abbb5211d1ab50d4
6,481
py
Python
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
analyze_tls.py
khushhallchandra/CN-project
405ce86e4e65e116531aa19287b8d05c959b1441
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt def main(filename): data = pd.read_csv(filename, header=None) means = data.mean(axis = 0) stds = data.std(axis = 0) return means[0], means[1], stds[0], stds[1] if __name__ == '__main__': files_http1 = ['./results/benchmark_siz...
54.923729
257
0.738158
import numpy as np import pandas as pd import matplotlib.pyplot as plt def main(filename): data = pd.read_csv(filename, header=None) means = data.mean(axis = 0) stds = data.std(axis = 0) return means[0], means[1], stds[0], stds[1] if __name__ == '__main__': files_http1 = ['./results/benchmark_siz...
true
true