hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c35de4f81c28c46e9cb11c08b87d421ba5c8ca8
922
py
Python
uncertainty_baselines/models/criteo_mlp_test.py
y0ast/uncertainty-baselines
8d32c77ba0803ed715c1406378adf10ebd61ab74
[ "Apache-2.0" ]
794
2020-07-17T06:23:58.000Z
2022-03-31T08:31:53.000Z
uncertainty_baselines/models/criteo_mlp_test.py
ranganathkrishnan/uncertainty-baselines
b9c6b870790034c1a2303246f887fd2cf53bff38
[ "Apache-2.0" ]
136
2020-08-04T22:42:04.000Z
2022-03-26T21:07:03.000Z
uncertainty_baselines/models/criteo_mlp_test.py
ranganathkrishnan/uncertainty-baselines
b9c6b870790034c1a2303246f887fd2cf53bff38
[ "Apache-2.0" ]
129
2020-08-16T12:46:55.000Z
2022-03-31T23:00:10.000Z
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
29.741935
74
0.75705
import tensorflow as tf import uncertainty_baselines as ub class CriteoMlpTest(tf.test.TestCase): def testCreateModel(self): model = ub.models.criteo_mlp(31) self.assertLen(model.layers, 47) if __name__ == '__main__': tf.test.main()
true
true
1c35df3b9d562344d9d36cd71b15b4471d668925
4,164
py
Python
tests/test_agent_wrappers.py
vengalraoguttha/EGG
e4f8412f197543ec7f1f00cf89b5a364b038dc57
[ "MIT" ]
254
2019-06-05T00:20:39.000Z
2022-03-25T04:46:12.000Z
tests/test_agent_wrappers.py
vengalraoguttha/EGG
e4f8412f197543ec7f1f00cf89b5a364b038dc57
[ "MIT" ]
95
2019-06-17T19:01:18.000Z
2022-03-21T15:18:49.000Z
tests/test_agent_wrappers.py
vengalraoguttha/EGG
e4f8412f197543ec7f1f00cf89b5a364b038dc57
[ "MIT" ]
97
2019-06-05T02:04:14.000Z
2022-03-28T19:10:21.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys from pathlib import Path import torch from torch.nn import functional as F import egg.core as core sys.path.insert(0, Path(__fil...
27.215686
94
0.65634
import sys from pathlib import Path import torch from torch.nn import functional as F import egg.core as core sys.path.insert(0, Path(__file__).parent.parent.resolve().as_posix()) BATCH_X = torch.eye(8) BATCH_Y = torch.tensor([0, 0, 0, 0, 1, 1, 1, 1]).long() class Dataset: def __iter__(self): re...
true
true
1c35dfa8f12ab7afea203f37dff851c3d86d213b
3,241
py
Python
tests/job/test_lifecycle.py
workfloworchestrator/SuPA
75c34a446e7133ac3f9378810db749a7df2c21a3
[ "Apache-2.0" ]
null
null
null
tests/job/test_lifecycle.py
workfloworchestrator/SuPA
75c34a446e7133ac3f9378810db749a7df2c21a3
[ "Apache-2.0" ]
6
2021-12-01T13:05:28.000Z
2022-03-07T12:40:10.000Z
tests/job/test_lifecycle.py
workfloworchestrator/SuPA
75c34a446e7133ac3f9378810db749a7df2c21a3
[ "Apache-2.0" ]
null
null
null
from datetime import timedelta from typing import Any from sqlalchemy import Column import tests.shared.state_machine as state_machine from supa.job.lifecycle import TerminateJob from supa.util.timestamp import current_timestamp def test_terminate_job_auto_start( connection_id: Column, connection: None, ...
41.551282
110
0.754088
from datetime import timedelta from typing import Any from sqlalchemy import Column import tests.shared.state_machine as state_machine from supa.job.lifecycle import TerminateJob from supa.util.timestamp import current_timestamp def test_terminate_job_auto_start( connection_id: Column, connection: None, ...
true
true
1c35dff0a37402a1b63768cdbb3b60fdc7171aaf
2,625
py
Python
WX272_lab4_thkn.py
Kyl67899/python-labs
aafc6fc94837ee43c9ef2e1b103d86f80dfc9814
[ "FSFAP" ]
null
null
null
WX272_lab4_thkn.py
Kyl67899/python-labs
aafc6fc94837ee43c9ef2e1b103d86f80dfc9814
[ "FSFAP" ]
null
null
null
WX272_lab4_thkn.py
Kyl67899/python-labs
aafc6fc94837ee43c9ef2e1b103d86f80dfc9814
[ "FSFAP" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Feb 14 15:20:21 2020 @author: parsotak """ # import datasets import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset from mpl_toolkits.basemap import Basemap #Define input file infile = '/wx/storage/halpea17/wx272/20170909_erai....
21.341463
129
0.699048
import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset from mpl_toolkits.basemap import Basemap infile = '/wx/storage/halpea17/wx272/20170909_erai.nc' f = Dataset(infile, 'r') gpot_1000mb = f['HGT_GDS0_ISBL'][2, 3, :, :] gpot_500mb = f['HGT_GDS0_ISBL'][2, 3, :, :] lats = f['g0_la...
true
true
1c35e085f8dd013b30da4d1fe0933d17adccad6e
11,833
py
Python
text-video-search/src/python/embedding.py
mikhail-tsir/vespa-exloration
9bebc00acb43021fa60c6e144fe4f1fa1d7719fc
[ "Apache-2.0" ]
null
null
null
text-video-search/src/python/embedding.py
mikhail-tsir/vespa-exloration
9bebc00acb43021fa60c6e144fe4f1fa1d7719fc
[ "Apache-2.0" ]
null
null
null
text-video-search/src/python/embedding.py
mikhail-tsir/vespa-exloration
9bebc00acb43021fa60c6e144fe4f1fa1d7719fc
[ "Apache-2.0" ]
null
null
null
import os import glob import ntpath from collections import Counter import numpy as np import imageio from vespa.package import ApplicationPackage, Field, HNSW, RankProfile, QueryTypeField from vespa.application import Vespa import torch from torch.utils.data import Dataset, DataLoader from torchvision.transforms im...
36.186544
223
0.645145
import os import glob import ntpath from collections import Counter import numpy as np import imageio from vespa.package import ApplicationPackage, Field, HNSW, RankProfile, QueryTypeField from vespa.application import Vespa import torch from torch.utils.data import Dataset, DataLoader from torchvision.transforms im...
true
true
1c35e10434fa28fe4fcc4629a48c8d0eb5ec7751
31,843
py
Python
armi/nuclearDataIO/xsCollections.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
armi/nuclearDataIO/xsCollections.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
armi/nuclearDataIO/xsCollections.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
34.725191
132
0.625632
import numpy from scipy import sparse from armi import runLog from armi.localization import exceptions from armi.utils import properties from armi.utils import units NGAMMA = "nGamma" NAPLHA = "nalph" NP = "np" ND = "nd" NT = "nt" FISSION_XS = "...
true
true
1c35e12dd91b8c2d125fe4cdf0bb30487f6fce29
1,434
py
Python
src/data/295.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/295.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/295.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import queue ROAD = "Road" TOWN = "Town" def solve(N: int, Q: int, A: "List[int]", B: "List[int]", C: "List[int]", D: "List[int]"): G = [[] for _ in range(N)] for i in range(N - 1): G[A[i] - 1].append(B[i] - 1) G[B[i] - 1].append(A[i] - 1) color...
24.724138
167
0.504184
import sys import queue ROAD = "Road" TOWN = "Town" def solve(N: int, Q: int, A: "List[int]", B: "List[int]", C: "List[int]", D: "List[int]"): G = [[] for _ in range(N)] for i in range(N - 1): G[A[i] - 1].append(B[i] - 1) G[B[i] - 1].append(A[i] - 1) color = [-1 for _ in range(...
true
true
1c35e15227e07b2da36653408049b4abd015e2f2
4,756
py
Python
inference-engine/ie_bridges/python/sample/style_transfer_sample/style_transfer_sample.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2021-04-06T03:32:12.000Z
2021-04-06T03:32:12.000Z
inference-engine/ie_bridges/python/sample/style_transfer_sample/style_transfer_sample.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
28
2021-09-24T09:29:02.000Z
2022-03-28T13:20:46.000Z
inference-engine/ie_bridges/python/sample/style_transfer_sample/style_transfer_sample.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2020-08-30T11:48:03.000Z
2020-08-30T11:48:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from __future__ import print_function import sys import os from argparse import ArgumentParser, SUPPRESS import cv2 import numpy as np import logging as log from openvino.inference_engine import IECore def build_argparser(): parser...
45.295238
133
0.643818
from __future__ import print_function import sys import os from argparse import ArgumentParser, SUPPRESS import cv2 import numpy as np import logging as log from openvino.inference_engine import IECore def build_argparser(): parser = ArgumentParser(add_help=False) args = parser.add_argument_group('Options'...
true
true
1c35e1745f7d2094a35073536ccef72aac135bfc
11,021
py
Python
dataset/datasets.py
Shuai-Xie/structure_knowledge_distillation
a5a0897f01e16d71dc4e3c77d4ac926fb0cd532d
[ "BSD-2-Clause" ]
null
null
null
dataset/datasets.py
Shuai-Xie/structure_knowledge_distillation
a5a0897f01e16d71dc4e3c77d4ac926fb0cd532d
[ "BSD-2-Clause" ]
null
null
null
dataset/datasets.py
Shuai-Xie/structure_knowledge_distillation
a5a0897f01e16d71dc4e3c77d4ac926fb0cd532d
[ "BSD-2-Clause" ]
null
null
null
import os import os.path as osp import numpy as np import random import collections import torch import torchvision import cv2 from torch.utils import data class VOCDataSet(data.Dataset): def __init__(self, root, list_path, max_iters=None, crop_size=(321, 321), mean=(128, 128, 128), scale=True, mirror...
43.734127
144
0.545867
import os import os.path as osp import numpy as np import random import collections import torch import torchvision import cv2 from torch.utils import data class VOCDataSet(data.Dataset): def __init__(self, root, list_path, max_iters=None, crop_size=(321, 321), mean=(128, 128, 128), scale=True, mirror...
true
true
1c35e1fefd60a71454bd7c59d580149fde83be33
10,195
py
Python
orthanc/ai-orchestrator.py
ImagingInformatics/orthanc-ai-orchestrator
15396f160a51da1916513308d4e7e813e615ba58
[ "MIT" ]
9
2021-05-05T17:13:31.000Z
2022-01-07T20:00:38.000Z
orthanc/ai-orchestrator.py
deepmd-tools/orthanc-ai-orchestrator
15396f160a51da1916513308d4e7e813e615ba58
[ "MIT" ]
null
null
null
orthanc/ai-orchestrator.py
deepmd-tools/orthanc-ai-orchestrator
15396f160a51da1916513308d4e7e813e615ba58
[ "MIT" ]
1
2021-07-14T18:08:57.000Z
2021-07-14T18:08:57.000Z
import orthanc,pprint,json,datetime,random,sys #TODO store things into the DB #TODO set a timer to automatically expire workitems after a given amount of time? ############################################################################### # GLOBALS ####################################################################...
45.311111
193
0.601766
import orthanc,pprint,json,datetime,random,sys
true
true
1c35e2c92711b4fa0b92f119506a86a49d3074e1
2,056
py
Python
data_loader.py
donghaW/RCF-pytorch
6380209ef747abefa87637e60d33369ba423814d
[ "MIT" ]
null
null
null
data_loader.py
donghaW/RCF-pytorch
6380209ef747abefa87637e60d33369ba423814d
[ "MIT" ]
null
null
null
data_loader.py
donghaW/RCF-pytorch
6380209ef747abefa87637e60d33369ba423814d
[ "MIT" ]
null
null
null
from os.path import join import cv2 import numpy as np from PIL import Image from torch.utils import data def prepare_image_PIL(im): im = im[:,:,::-1] - np.zeros_like(im) # rgb to bgr im -= np.array((104.00698793,116.66876762,122.67891434)) im = np.transpose(im, (2, 0, 1)) # (H x W x C) to (C x H x W) ...
31.630769
84
0.555934
from os.path import join import cv2 import numpy as np from PIL import Image from torch.utils import data def prepare_image_PIL(im): im = im[:,:,::-1] - np.zeros_like(im) im -= np.array((104.00698793,116.66876762,122.67891434)) im = np.transpose(im, (2, 0, 1)) return im def prepare_image_cv2(im):...
true
true
1c35e2d23130e4eaecba82b03fed6a92ad07b2b7
318
py
Python
Exercicios-Python/034.py
LuizHenriqudesouza419/Exercicios-de-Python3-main
af53cc1eea1e22a304e206a453c4b24bf67615a8
[ "MIT" ]
1
2021-11-08T22:59:33.000Z
2021-11-08T22:59:33.000Z
Exercicios-Python/034.py
LuizHenriqudesouza419/Exercicios-de-Python3-main
af53cc1eea1e22a304e206a453c4b24bf67615a8
[ "MIT" ]
null
null
null
Exercicios-Python/034.py
LuizHenriqudesouza419/Exercicios-de-Python3-main
af53cc1eea1e22a304e206a453c4b24bf67615a8
[ "MIT" ]
null
null
null
#Aumento salarial salário = float(input('Qual é o seu salario ? ')) if salário <= 1250.00: novo = salário + (salário * 15 / 100) print('Seu novo salário com 15% de aumento ficou {}'.format(novo)) else: novo = salário + (salário * 10 / 100) print('Seu salário com 10% de aumento ficou {}'.format(novo))
35.333333
70
0.644654
salário = float(input('Qual é o seu salario ? ')) if salário <= 1250.00: novo = salário + (salário * 15 / 100) print('Seu novo salário com 15% de aumento ficou {}'.format(novo)) else: novo = salário + (salário * 10 / 100) print('Seu salário com 10% de aumento ficou {}'.format(novo))
true
true
1c35e3eabade235dc8728686a9d4af7050c07687
535
py
Python
creational/factory_method/product.py
pascalweiss/gof_design_patterns
d142ebf21bb1a1e7925b0e7915eb6d857df58299
[ "Apache-2.0" ]
null
null
null
creational/factory_method/product.py
pascalweiss/gof_design_patterns
d142ebf21bb1a1e7925b0e7915eb6d857df58299
[ "Apache-2.0" ]
null
null
null
creational/factory_method/product.py
pascalweiss/gof_design_patterns
d142ebf21bb1a1e7925b0e7915eb6d857df58299
[ "Apache-2.0" ]
null
null
null
# --- Product --- class Tree: def get_name(self): raise NotImplementedError # --- ConcreteProduct --- class CorkOak(Tree): def get_name(self): return "cork oak" class Olive(Tree): def get_name(self): return "olive" class Cypress(Tree): def get_name(self): return...
13.375
33
0.594393
class Tree: def get_name(self): raise NotImplementedError class CorkOak(Tree): def get_name(self): return "cork oak" class Olive(Tree): def get_name(self): return "olive" class Cypress(Tree): def get_name(self): return "cypress" class Spruce(Tree): def g...
true
true
1c35e4716c9deef36f0e17b14d4627fc149e166c
3,884
py
Python
height/curves/female_months.py
VictorArnaud/sdcurve
d5397b0193fb01e94dc93c9fad5e2db195754384
[ "MIT" ]
null
null
null
height/curves/female_months.py
VictorArnaud/sdcurve
d5397b0193fb01e94dc93c9fad5e2db195754384
[ "MIT" ]
8
2018-05-17T22:50:18.000Z
2018-05-19T01:15:26.000Z
height/curves/female_months.py
VWApplications/sdcurve
d5397b0193fb01e94dc93c9fad5e2db195754384
[ "MIT" ]
1
2018-06-27T00:18:21.000Z
2018-06-27T00:18:21.000Z
class HeightCurveFemaleMonths(object): """ Height-based growth curve for females aged 0 to 36 months """ def __init__(self): """ Growth curve based on the height of female children with Down Syndrome constructor. """ self.title = "Height-based growth curve for f...
51.105263
84
0.438723
class HeightCurveFemaleMonths(object): def __init__(self): self.title = "Height-based growth curve for females aged 0 to 36 months" self.ages = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ...
true
true
1c35e4b1e40e29f048bd365d01a0fe5a6056cdd9
3,615
py
Python
experiments/explorations/experiments/experiment_000104/repetition_000007/experiment_config.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
10
2019-10-05T16:22:11.000Z
2021-12-30T14:09:42.000Z
experiments/explorations/experiments/experiment_000104/repetition_000007/experiment_config.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
null
null
null
experiments/explorations/experiments/experiment_000104/repetition_000007/experiment_config.py
flowersteam/automated_discovery_of_lenia_patterns
97cc7cde2120fa95225d1e470e00b8aa8c034e97
[ "MIT" ]
2
2019-10-14T12:12:38.000Z
2020-09-16T11:18:26.000Z
import autodisc as ad def get_system_parameters(): system_parameters = ad.systems.Lenia.default_system_parameters() system_parameters.size_y = 256 system_parameters.size_x = 256 return system_parameters def get_explorer_config(): explorer_config = ad.explorers.GoalSpaceExplorer.default_config(...
38.457447
180
0.712033
import autodisc as ad def get_system_parameters(): system_parameters = ad.systems.Lenia.default_system_parameters() system_parameters.size_y = 256 system_parameters.size_x = 256 return system_parameters def get_explorer_config(): explorer_config = ad.explorers.GoalSpaceExplorer.default_config(...
true
true
1c35e51a479f03f6c0cb838cd0d553447b63b535
1,660
py
Python
app/ports/tests/test_filters.py
gagarine/macports-webapp
3f08a430218df89dc6cf7864482d55c156013ce4
[ "BSD-2-Clause" ]
null
null
null
app/ports/tests/test_filters.py
gagarine/macports-webapp
3f08a430218df89dc6cf7864482d55c156013ce4
[ "BSD-2-Clause" ]
2
2021-06-09T19:19:08.000Z
2021-06-10T20:33:48.000Z
app/ports/tests/test_filters.py
gagarine/macports-webapp
3f08a430218df89dc6cf7864482d55c156013ce4
[ "BSD-2-Clause" ]
null
null
null
import os from django.test import TransactionTestCase, Client from django.urls import reverse from ports.models import Port from MacPorts.config import TEST_PORTINDEX_JSON class TestDependencies(TransactionTestCase): reset_sequences = True def setUp(self): self.client = Client() Port.load(T...
29.642857
80
0.605422
import os from django.test import TransactionTestCase, Client from django.urls import reverse from ports.models import Port from MacPorts.config import TEST_PORTINDEX_JSON class TestDependencies(TransactionTestCase): reset_sequences = True def setUp(self): self.client = Client() Port.load(T...
true
true
1c35e5f10ca1d74c93cb10e6516ba3ec8ab810db
4,633
py
Python
apps/predict/src/predict.py
kikei/btc-bot-ai
cb118fa1809ebef472a2025be697c9050e948009
[ "Apache-2.0" ]
1
2020-02-02T13:53:21.000Z
2020-02-02T13:53:21.000Z
apps/predict/src/predict.py
kikei/btc-bot-ai
cb118fa1809ebef472a2025be697c9050e948009
[ "Apache-2.0" ]
null
null
null
apps/predict/src/predict.py
kikei/btc-bot-ai
cb118fa1809ebef472a2025be697c9050e948009
[ "Apache-2.0" ]
null
null
null
import datetime # Numpy import numpy as np # Matplotlib import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from Plotter import Plotter from dsp import crosszero from learningUtils import validated, to2d, zscore, loadModel from utils import readConfig, getLogger, reportTrend, loadnpy, StopWatch ...
33.330935
78
0.681416
import datetime import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from Plotter import Plotter from dsp import crosszero from learningUtils import validated, to2d, zscore, loadModel from utils import readConfig, getLogger, reportTrend, loadnpy, StopWatch logger = getLogger(...
true
true
1c35e6cd724cbfdfe8ac69884daef8626c316eeb
507
py
Python
dash/migrations/0001_initial.py
sayederfanarefin/django-test-for-dashboard
8df78db07086413b577d9767c6db5baa69580544
[ "MIT" ]
1
2022-03-06T11:30:48.000Z
2022-03-06T11:30:48.000Z
dash/migrations/0001_initial.py
sayederfanarefin/django-test-for-dashboard
8df78db07086413b577d9767c6db5baa69580544
[ "MIT" ]
3
2020-02-11T23:38:26.000Z
2021-06-10T21:07:16.000Z
dash/migrations/0001_initial.py
sayederfanarefin/django-test-for-dashboard
8df78db07086413b577d9767c6db5baa69580544
[ "MIT" ]
1
2019-11-05T06:47:58.000Z
2019-11-05T06:47:58.000Z
# Generated by Django 2.1.5 on 2019-01-19 07:57 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Document', fields=[ ('id', models.AutoField...
23.045455
114
0.575937
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Document', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize...
true
true
1c35e6ffda0c3e70cd8f9bacbc2969c4051d5b9d
10,863
py
Python
Python3/Tornado/apps/pg/PG_Collection/src/collectors/btc/btc_transfer_utils.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
24
2018-11-01T03:36:43.000Z
2022-03-28T08:20:30.000Z
Python3/Tornado/apps/pg/PG_Collection/src/collectors/btc/btc_transfer_utils.py
songning4/QBlockChainNotes
d65ede073f5a20f728f41cc6850409693820cdb1
[ "MIT" ]
57
2019-12-04T08:26:47.000Z
2022-03-08T07:35:15.000Z
Python3/Tornado/apps/pg/PG_Collection/src/collectors/btc/btc_transfer_utils.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
11
2019-01-04T08:41:57.000Z
2022-03-16T03:51:36.000Z
#!coding:utf8 #author:yqq #date:2020/7/10 0010 15:34 #description: BTC 转账工具类 from typing import Dict import json from bitcoin import SelectParams from bitcoin.core import CMutableTxIn, COutPoint, lx, CScript, Hash160, CMutableTxOut, CMutableTransaction, b2x, COIN from bitcoin.core.script import OP_DUP, OP_...
40.233333
128
0.640891
from typing import Dict import json from bitcoin import SelectParams from bitcoin.core import CMutableTxIn, COutPoint, lx, CScript, Hash160, CMutableTxOut, CMutableTransaction, b2x, COIN from bitcoin.core.script import OP_DUP, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG, SignatureHash, SIGHASH_ALL from bitcoin...
true
true
1c35e8a4968babee14c8b6baf7a4bf610c8351f4
1,573
py
Python
submissions/functional/denas/Android_malware/Scripts/stability.py
SeekingDream/fse20
c8a9199f002f947161cc7acdab5d025ab27a6598
[ "Unlicense" ]
null
null
null
submissions/functional/denas/Android_malware/Scripts/stability.py
SeekingDream/fse20
c8a9199f002f947161cc7acdab5d025ab27a6598
[ "Unlicense" ]
null
null
null
submissions/functional/denas/Android_malware/Scripts/stability.py
SeekingDream/fse20
c8a9199f002f947161cc7acdab5d025ab27a6598
[ "Unlicense" ]
null
null
null
from Android_malware.Scripts.TreeLearning import * from Android_malware.Scripts.Denasrule import * def transferRuleSet(RuleSet): NewRuleSet = set() for rule in RuleSet: str_rule = [] for r in rule: str_rule.append(r[0] * 2 + r[1]) str_rule = np.sort(str_rule) new_s ...
31.46
75
0.668786
from Android_malware.Scripts.TreeLearning import * from Android_malware.Scripts.Denasrule import * def transferRuleSet(RuleSet): NewRuleSet = set() for rule in RuleSet: str_rule = [] for r in rule: str_rule.append(r[0] * 2 + r[1]) str_rule = np.sort(str_rule) new_s ...
true
true
1c35e931e160991aed5a9c408f4337157fa81653
249
py
Python
src/pm/ompd/mtv_setup.py
raffenet/mpich-CVS
2d33e2742e8c00db4f56a373fea051cc6c0ee0d0
[ "mpich2" ]
null
null
null
src/pm/ompd/mtv_setup.py
raffenet/mpich-CVS
2d33e2742e8c00db4f56a373fea051cc6c0ee0d0
[ "mpich2" ]
null
null
null
src/pm/ompd/mtv_setup.py
raffenet/mpich-CVS
2d33e2742e8c00db4f56a373fea051cc6c0ee0d0
[ "mpich2" ]
null
null
null
#!/usr/bin/env python # # (C) 2001 by Argonne National Laboratory. # See COPYRIGHT in top-level directory. # from distutils.core import setup, Extension mtv = Extension("mtv",["mtv.c"]) setup(name="mtv", version="1.0", ext_modules=[mtv])
20.75
51
0.678715
from distutils.core import setup, Extension mtv = Extension("mtv",["mtv.c"]) setup(name="mtv", version="1.0", ext_modules=[mtv])
true
true
1c35e9ec5d77de19b495fcf3c3c14ead75e5e6c2
11,390
py
Python
modules/pymol2/make_cmd2.py
hryknkgw/pymolwin
4a1335e90497dbcbfa789f1285a7c1ad84a051f8
[ "CNRI-Python" ]
null
null
null
modules/pymol2/make_cmd2.py
hryknkgw/pymolwin
4a1335e90497dbcbfa789f1285a7c1ad84a051f8
[ "CNRI-Python" ]
null
null
null
modules/pymol2/make_cmd2.py
hryknkgw/pymolwin
4a1335e90497dbcbfa789f1285a7c1ad84a051f8
[ "CNRI-Python" ]
null
null
null
if 1: api_list = [ '_alt', '_ctrl', '_feedback', '_special', 'abort', 'accept', 'alias', 'align', 'alter', 'alter_list', 'alter_state', 'angle', 'attach', 'auto_measure', 'backw...
21.171004
73
0.440474
if 1: api_list = [ '_alt', '_ctrl', '_feedback', '_special', 'abort', 'accept', 'alias', 'align', 'alter', 'alter_list', 'alter_state', 'angle', 'attach', 'auto_measure', 'backw...
false
true
1c35eb3559160c1667dc5809cf0b63a92d7f0385
686
py
Python
app/stopwatch/apps.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
null
null
null
app/stopwatch/apps.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
1
2019-02-20T21:15:08.000Z
2019-02-20T21:15:08.000Z
app/stopwatch/apps.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2022 Simon Zigelli # # 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...
34.3
75
0.752187
from django.apps import AppConfig class StopwatchConfig(AppConfig): name = 'stopwatch'
true
true
1c35eb64f327f5e006e5a2718bbe7c5573ad0386
18,292
py
Python
venv/Lib/site-packages/IPython/core/inputtransformer.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
venv/Lib/site-packages/IPython/core/inputtransformer.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
venv/Lib/site-packages/IPython/core/inputtransformer.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
31
2019-03-10T09:51:27.000Z
2022-02-14T23:11:12.000Z
"""DEPRECATED: Input transformer classes to support IPython special syntax. This module was deprecated in IPython 7.0, in favour of inputtransformer2. This includes the machinery to recognise and transform ``%magic`` commands, ``!system`` commands, ``help?`` querying, prompt stripping, and so forth. """ import abc im...
34.063315
95
0.603597
import abc import functools import re import tokenize from tokenize import generate_tokens, untokenize, TokenError from io import StringIO from IPython.core.splitinput import LineInfo ESC_SHELL = '!' ESC_SH_CAP = '!!' ESC_HELP = '?' ESC_HELP2 = '??' ESC_MAGIC = '%' ESC_MAGIC2 = '...
true
true
1c35eb725e067bd6026041677434b57cce4af8f5
6,152
py
Python
fem/gui/vtk_widget/plotting_toolbar/_plotting_dock.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
1
2019-08-03T21:40:26.000Z
2019-08-03T21:40:26.000Z
fem/gui/vtk_widget/plotting_toolbar/_plotting_dock.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
null
null
null
fem/gui/vtk_widget/plotting_toolbar/_plotting_dock.py
mjredmond/FEMApp
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
[ "MIT" ]
null
null
null
from __future__ import print_function, absolute_import from qtpy import QtWidgets from ._plotting_ui import Ui_DockWidget from ..vtk_graphics import VTKGraphics from ..vtk_graphics.pipelines.picked import PickedSelection vtk_graphics = VTKGraphics.instance() class PlainTextEditDelegate(object): def __init__(se...
33.075269
113
0.653283
from __future__ import print_function, absolute_import from qtpy import QtWidgets from ._plotting_ui import Ui_DockWidget from ..vtk_graphics import VTKGraphics from ..vtk_graphics.pipelines.picked import PickedSelection vtk_graphics = VTKGraphics.instance() class PlainTextEditDelegate(object): def __init__(se...
true
true
1c35ebb904f3d19508064d2d7eea1e2890071729
7,721
py
Python
evaluate.py
AarthiKasirajan/transformer-kgc
4c8f34a6df9f8e6cfc0717052085eb926bfbefa2
[ "Apache-2.0" ]
4
2022-03-22T04:08:19.000Z
2022-03-30T06:44:26.000Z
evaluate.py
apoorvumang/transformer-kgc
b12e3161054e67c2f6aa5b6d4878ac2e0eb2f4f5
[ "Apache-2.0" ]
1
2022-03-30T16:29:37.000Z
2022-03-31T12:13:43.000Z
evaluate.py
apoorvumang/kgt5
d660dce63133f0fd3fa4d909c92b27dad6395153
[ "Apache-2.0" ]
2
2021-11-01T11:52:59.000Z
2022-01-09T18:43:55.000Z
import argparse import math from tqdm import tqdm from dataset import T5_Dataset from torch.utils.data import DataLoader from utils_accelerate import * import numpy as np from typing import Dict from collections import defaultdict class Evaluator: def __init__(self, dataset: T5_Dataset, model, args): ...
46.233533
107
0.58969
import argparse import math from tqdm import tqdm from dataset import T5_Dataset from torch.utils.data import DataLoader from utils_accelerate import * import numpy as np from typing import Dict from collections import defaultdict class Evaluator: def __init__(self, dataset: T5_Dataset, model, args): ...
true
true
1c35ec20f4502cb2ae323ef70a0d365e7cd2e969
2,458
py
Python
test/TestMas.py
ARKlab/Artesian.SDK-Python
79b54ad00526f5a75c400422fd1c0c8532b67436
[ "MIT" ]
2
2022-02-21T17:03:04.000Z
2022-02-24T17:14:02.000Z
test/TestMas.py
ARKlab/Artesian.SDK-Python
79b54ad00526f5a75c400422fd1c0c8532b67436
[ "MIT" ]
2
2020-02-06T10:03:35.000Z
2022-03-01T09:39:54.000Z
test/TestMas.py
ARKlab/Artesian.SDK-Python
79b54ad00526f5a75c400422fd1c0c8532b67436
[ "MIT" ]
1
2019-08-01T06:20:58.000Z
2019-08-01T06:20:58.000Z
from Artesian import * import helpers import unittest cfg = ArtesianConfig("baseaddr","apikey") qs = QueryService(cfg) class TestMas(unittest.TestCase): @helpers.TrackRequests def test_Null_Fill(self, requests): url = qs.createMarketAssessment() \ .forMarketData([100000001]) \ ...
34.138889
62
0.546786
from Artesian import * import helpers import unittest cfg = ArtesianConfig("baseaddr","apikey") qs = QueryService(cfg) class TestMas(unittest.TestCase): @helpers.TrackRequests def test_Null_Fill(self, requests): url = qs.createMarketAssessment() \ .forMarketData([100000001]) \ ...
true
true
1c35ec795e6542ac4eda2009f43a9a126cd7ef64
574
py
Python
src/main/resources/pytz/zoneinfo/Africa/Nouakchott.py
TheEin/swagger-maven-plugin
cf93dce2d5c8d3534f4cf8c612b11e2d2313871b
[ "Apache-2.0" ]
65
2015-11-14T13:46:01.000Z
2021-08-14T05:54:04.000Z
lib/pytz/zoneinfo/Africa/Nouakchott.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
13
2016-03-31T20:00:17.000Z
2021-08-20T14:52:31.000Z
lib/pytz/zoneinfo/Africa/Nouakchott.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
20
2015-03-18T08:41:37.000Z
2020-12-18T02:58:30.000Z
'''tzinfo timezone information for Africa/Nouakchott.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Nouakchott(DstTzInfo): '''Africa/Nouakchott timezone definition. See datetime.tzinfo for details''' zone = 'Africa/Noua...
21.259259
80
0.672474
from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Nouakchott(DstTzInfo): zone = 'Africa/Nouakchott' _utc_transition_times = [ d(1,1,1,0,0,0), d(1912,1,1,1,3,48), d(1934,2,26,0,0,0), d(1960,11,28,1,0,0), ] _transi...
true
true
1c35ecea6b12db0ebb681025bb6882814f532111
7,105
py
Python
InnerEye/ML/configs/segmentation/HeadAndNeckBase.py
shivp950/InnerEye-DeepLearning
014c74e34f990d9a7b2b7bf7f6f632f29be33559
[ "MIT" ]
2
2021-02-19T03:16:19.000Z
2022-02-08T01:40:09.000Z
InnerEye/ML/configs/segmentation/HeadAndNeckBase.py
shivp950/InnerEye-DeepLearning
014c74e34f990d9a7b2b7bf7f6f632f29be33559
[ "MIT" ]
null
null
null
InnerEye/ML/configs/segmentation/HeadAndNeckBase.py
shivp950/InnerEye-DeepLearning
014c74e34f990d9a7b2b7bf7f6f632f29be33559
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
53.421053
118
0.666151
import random from typing import Any import pandas as pd from InnerEye.ML.config import MixtureLossComponent, PhotometricNormalizationMethod, SegmentationLoss, \ SegmentationModelBase, SliceExclusionRule, SummedProbabilityRule, equally_weighted_classes from InnerEye.ML.deep_learning_config import OptimizerTyp...
true
true
1c35ed36cab37aaa437d965c0450acf3a9a2beb4
10,995
py
Python
3_conservative_head.py
janeloveless/mechanics-of-exploration
8a056e67490d32761cb993a64e37c2299d281c3e
[ "Unlicense" ]
null
null
null
3_conservative_head.py
janeloveless/mechanics-of-exploration
8a056e67490d32761cb993a64e37c2299d281c3e
[ "Unlicense" ]
null
null
null
3_conservative_head.py
janeloveless/mechanics-of-exploration
8a056e67490d32761cb993a64e37c2299d281c3e
[ "Unlicense" ]
null
null
null
#! /usr/bin/env python2 import time import itertools as it import numpy as np import scipy as sp import sympy as sy from sympy import S import sympy.physics.mechanics as mech import matplotlib import matplotlib.animation as animation import matplotlib.pyplot as plt import neuromech as nm """ Simulate and analyse th...
35.353698
100
0.62683
import time import itertools as it import numpy as np import scipy as sp import sympy as sy from sympy import S import sympy.physics.mechanics as mech import matplotlib import matplotlib.animation as animation import matplotlib.pyplot as plt import neuromech as nm """ Simulate and analyse the motion of the reduced...
false
true
1c35edc25fb9b1291aa6f22e1e1725263c6bf24f
5,809
py
Python
Python/DataStructures/LinkedList.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
3
2021-03-22T14:13:56.000Z
2022-03-01T03:06:22.000Z
Python/DataStructures/LinkedList.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
null
null
null
Python/DataStructures/LinkedList.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
null
null
null
#Linked List python implementation # Node class class Node: def __init__(self, value, nextNode): self.value = value self.next = nextNode #Linked List class class LinkedList: def __init__(self): self.root = None def isEmpty(self): return self.root is None # ...
29.48731
80
0.517645
class Node: def __init__(self, value, nextNode): self.value = value self.next = nextNode class LinkedList: def __init__(self): self.root = None def isEmpty(self): return self.root is None def contains(self, value): if self.isEmpty(): ...
true
true
1c35f04ddadf5cc4f1d5ffbf4e660b5a6d5f1f94
4,400
py
Python
solvers_examples.py
anguyen216/mTSP-work
47d3b59c83569e9e03c92c9b5140a549d4742bce
[ "MIT" ]
null
null
null
solvers_examples.py
anguyen216/mTSP-work
47d3b59c83569e9e03c92c9b5140a549d4742bce
[ "MIT" ]
null
null
null
solvers_examples.py
anguyen216/mTSP-work
47d3b59c83569e9e03c92c9b5140a549d4742bce
[ "MIT" ]
null
null
null
# includes examples of how to run solvers # Author: Anh Nguyen import numpy as np import matplotlib.pyplot as plt from utils import longLatDistKm, plotPath, plotMultiplePaths from tsp_solvers.dp_solver import DP_TSP from tsp_solvers.ILP_solver import ILP_TSP from tsp_solvers.opt2_solver import OPT2_TSP from cities impo...
36.666667
73
0.635682
import numpy as np import matplotlib.pyplot as plt from utils import longLatDistKm, plotPath, plotMultiplePaths from tsp_solvers.dp_solver import DP_TSP from tsp_solvers.ILP_solver import ILP_TSP from tsp_solvers.opt2_solver import OPT2_TSP from cities import WAYPOINTS, NAMES_DICT from mtsp_solvers.basic_solver impor...
true
true
1c35f11db06b0d641005dee813bcf7462e94f8d8
5,022
py
Python
members/migrations/0001_initial.py
Herrgrim0/Site
13ec1a58dece7ceedddc4fe92064aee661c90331
[ "MIT" ]
4
2017-05-01T10:06:36.000Z
2019-03-26T20:41:50.000Z
members/migrations/0001_initial.py
Herrgrim0/Site
13ec1a58dece7ceedddc4fe92064aee661c90331
[ "MIT" ]
8
2016-09-12T18:42:52.000Z
2017-12-25T14:08:22.000Z
members/migrations/0001_initial.py
Herrgrim0/Site
13ec1a58dece7ceedddc4fe92064aee661c90331
[ "MIT" ]
7
2016-08-31T14:44:28.000Z
2019-10-31T11:33:06.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-11 11:17 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('auth', ...
43.669565
132
0.570291
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), migrations.swappa...
true
true
1c35f30d3a32e33f2f27177392bb3f592d7d96c9
13,016
py
Python
rpython/jit/backend/model.py
Qointum/pypy
c0ed88efbc135a75a535f4534ca1f3baf0bf39d8
[ "Apache-2.0", "OpenSSL" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
idea2/pypyjs-3/deps/pypy/rpython/jit/backend/model.py
igormcoelho/neo-boa
c141b503183cab287744cd19be5dfd86d9bc8daf
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
idea2/pypyjs-3/deps/pypy/rpython/jit/backend/model.py
igormcoelho/neo-boa
c141b503183cab287744cd19be5dfd86d9bc8daf
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
import weakref from rpython.rlib.debug import debug_start, debug_print, debug_stop from rpython.rtyper.lltypesystem import lltype, llmemory class CPUTotalTracker(object): total_compiled_loops = 0 total_compiled_bridges = 0 total_freed_loops = 0 total_freed_bridges = 0 # for heaptracker # _all_...
38.97006
88
0.677628
import weakref from rpython.rlib.debug import debug_start, debug_print, debug_stop from rpython.rtyper.lltypesystem import lltype, llmemory class CPUTotalTracker(object): total_compiled_loops = 0 total_compiled_bridges = 0 total_freed_loops = 0 total_freed_bridges = 0 _vtable_to_descr_di...
true
true
1c35f69ad59be07090db7f3539f86ff7d6d0b4e8
4,203
py
Python
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
null
null
null
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
5
2021-03-10T14:18:45.000Z
2022-03-12T00:28:29.000Z
server/forestgame/game/test_world.py
Nick-Pearson/forestgame
8a37225adbe6da9df7851eba34ad06806da0ce48
[ "0BSD" ]
null
null
null
import unittest from forestgame.game.world import World class WorldTest(unittest.TestCase): def test_world_inits_to_empty_data(self): world = World(None, "1", "0", 0, 0, [], []) self.assertEqual(0, world.get_size_x()) self.assertEqual(0, world.get_size_y()) self.assertEqual([], world.get_tile_data(...
26.601266
66
0.610278
import unittest from forestgame.game.world import World class WorldTest(unittest.TestCase): def test_world_inits_to_empty_data(self): world = World(None, "1", "0", 0, 0, [], []) self.assertEqual(0, world.get_size_x()) self.assertEqual(0, world.get_size_y()) self.assertEqual([], world.get_tile_data(...
true
true
1c35f69f6f6e4bc9277d129538c716070d736d61
11,855
py
Python
test/python/set_view/compaction_transitions.py
vmx/couchbase-couchdb
e99e2bdcb912bcdecda10e881dc08c9292dffdf2
[ "Apache-2.0" ]
93
2015-01-19T16:36:36.000Z
2022-03-24T00:26:33.000Z
test/python/set_view/compaction_transitions.py
vmx/couchbase-couchdb
e99e2bdcb912bcdecda10e881dc08c9292dffdf2
[ "Apache-2.0" ]
4
2015-04-27T00:01:05.000Z
2021-07-26T08:16:56.000Z
test/python/set_view/compaction_transitions.py
vmx/couchbase-couchdb
e99e2bdcb912bcdecda10e881dc08c9292dffdf2
[ "Apache-2.0" ]
62
2015-01-04T13:07:15.000Z
2022-02-25T10:02:14.000Z
#!/usr/bin/python try: import simplejson as json except ImportError: import json import couchdb import httplib import urllib import time import common import unittest HOST = "localhost:5984" SET_NAME = "test_suite_set_view_compact" NUM_PARTS = 8 NUM_DOCS = 800000 DDOC = { "_id": "_design/test", "language": "...
44.735849
114
0.619739
try: import simplejson as json except ImportError: import json import couchdb import httplib import urllib import time import common import unittest HOST = "localhost:5984" SET_NAME = "test_suite_set_view_compact" NUM_PARTS = 8 NUM_DOCS = 800000 DDOC = { "_id": "_design/test", "language": "javascript", ...
true
true
1c35f6b1ff20a2f3b791fcdab1fe667fcfb56192
1,759
py
Python
arkav_is_api/competition/migrations/0016_refactor_competition_2.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
3
2018-10-01T16:30:15.000Z
2020-01-06T09:03:57.000Z
arkav_is_api/competition/migrations/0016_refactor_competition_2.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
4
2018-11-03T10:56:52.000Z
2020-04-26T06:54:16.000Z
arkav_is_api/competition/migrations/0016_refactor_competition_2.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
2
2018-09-26T16:28:01.000Z
2019-09-04T06:23:14.000Z
# Generated by Django 2.1.3 on 2018-11-08 09:32 from string import ascii_uppercase, digits from django.db import migrations from django.utils.crypto import get_random_string def generate_team_invitation_token(): return get_random_string(16, allowed_chars=ascii_uppercase + digits) def convert_team_category_to_u...
35.18
103
0.681637
from string import ascii_uppercase, digits from django.db import migrations from django.utils.crypto import get_random_string def generate_team_invitation_token(): return get_random_string(16, allowed_chars=ascii_uppercase + digits) def convert_team_category_to_use_fk(apps, schema_editor): Team = apps.get...
true
true
1c35f6d16868b76e19b08e1e6c11d9dcc39079ca
14,608
py
Python
readalongs/cli.py
joanise/ReadAlong-Studio
d68e821a10c58938216f188311f99389a3d6ca64
[ "MIT" ]
null
null
null
readalongs/cli.py
joanise/ReadAlong-Studio
d68e821a10c58938216f188311f99389a3d6ca64
[ "MIT" ]
null
null
null
readalongs/cli.py
joanise/ReadAlong-Studio
d68e821a10c58938216f188311f99389a3d6ca64
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # # cli.py # # Initializes a Command Line Interface with Click. # The main purpose of the cli is to align input files. # # CLI commands implemented in this file: # - align : main command to ...
33.972093
120
0.638896
okenized_xml_path = "%s%s" % (output_base, input_ext) if os.path.exists(tokenized_xml_path) and not kwargs["force_overwrite"]: raise click.BadParameter( "Output file %s exists already, use -f to overwrite." % tokenized_xml_path ) smil_path = output_base + ".smil" if os.path.ex...
true
true
1c35f7705579fc799bca6e671589cc6191a30340
5,131
py
Python
workflow_clues.py
erikfogh/relate-clues
aa4d34f5af2b960cc16f0e9b3462e184cadff239
[ "MIT" ]
null
null
null
workflow_clues.py
erikfogh/relate-clues
aa4d34f5af2b960cc16f0e9b3462e184cadff239
[ "MIT" ]
null
null
null
workflow_clues.py
erikfogh/relate-clues
aa4d34f5af2b960cc16f0e9b3462e184cadff239
[ "MIT" ]
null
null
null
from gwf import Workflow, AnonymousTarget import os from groups import Group os.environ['NUMEXPR_MAX_THREADS'] = '8' # to suppress a warning gwf = Workflow() # Absolute paths to various parts - possibly rewrite to use relative paths path_to_relate = "/faststorage/home/eriks/relate-clues/relate_v1.1.2_x86_64_dynamic/"...
45.8125
131
0.659131
from gwf import Workflow, AnonymousTarget import os from groups import Group os.environ['NUMEXPR_MAX_THREADS'] = '8' gwf = Workflow() path_to_relate = "/faststorage/home/eriks/relate-clues/relate_v1.1.2_x86_64_dynamic/" path_to_prepared = "/faststorage/home/eriks/relate-clues/steps/" path_to_script = "/faststorage/...
true
true
1c35f82579848e6ecb2f941bb1f17166f8aa4a9f
11,229
py
Python
bottleLdap/bottleLdap.py
zwgtdev/bottleLdap
36dd6f8978a37124fcd0d1a3970cc0fc68e8ad0f
[ "MIT" ]
null
null
null
bottleLdap/bottleLdap.py
zwgtdev/bottleLdap
36dd6f8978a37124fcd0d1a3970cc0fc68e8ad0f
[ "MIT" ]
null
null
null
bottleLdap/bottleLdap.py
zwgtdev/bottleLdap
36dd6f8978a37124fcd0d1a3970cc0fc68e8ad0f
[ "MIT" ]
null
null
null
import sys import os import json import ldap import bottle from collections import OrderedDict class AAAException(Exception): """Generic Authentication/Authorization Exception""" pass class AuthException(AAAException): """Authentication Exception: incorrect username/password pair""" pass class Use...
34.550769
153
0.609849
import sys import os import json import ldap import bottle from collections import OrderedDict class AAAException(Exception): pass class AuthException(AAAException): pass class UserExists(AAAException): pass class JsonRoleStore(object): def __init__(self, directory, filename='roles.json'): ...
true
true
1c35f8553536b7c20662b81ec1cea625e26ab5dc
58,541
py
Python
src/azure-firewall/azext_firewall/custom.py
needuv/azure-cli-extensions
58a8fe5ee4738078ca81a1ba0aae1b12a805277e
[ "MIT" ]
null
null
null
src/azure-firewall/azext_firewall/custom.py
needuv/azure-cli-extensions
58a8fe5ee4738078ca81a1ba0aae1b12a805277e
[ "MIT" ]
1
2021-05-25T20:16:59.000Z
2021-05-25T20:16:59.000Z
src/azure-firewall/azext_firewall/custom.py
needuv/azure-cli-extensions
58a8fe5ee4738078ca81a1ba0aae1b12a805277e
[ "MIT" ]
5
2020-09-08T22:46:48.000Z
2020-11-08T14:54:35.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
55.806482
174
0.649084
import copy from knack.util import CLIError from knack.log import get_logger from azure.cli.core.util import sdk_no_wait from azure.cli.core.azclierror import UserFault, ServiceError from ._client_factory import network_client_factory logger = get_logger(__name__) def _generic_list(cli_ctx, operation_name, reso...
true
true
1c35f8af4ba9ea456444a61bfa22f1df740f3718
8,365
py
Python
wagtail/wagtailimages/tests.py
ollywillans/wagtail
5f332a1ca8907172c0a5b4a6a820e17dabbb403b
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailimages/tests.py
ollywillans/wagtail
5f332a1ca8907172c0a5b4a6a820e17dabbb403b
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailimages/tests.py
ollywillans/wagtail
5f332a1ca8907172c0a5b4a6a820e17dabbb403b
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django import template from django.contrib.auth.models import User, Group, Permission from django.core.urlresolvers import reverse from wagtail.wagtailcore.models import Site from wagtail.wagtailimages.models import get_image_model from wagtail.wagtailimages.templatetags import ima...
32.297297
138
0.663957
from django.test import TestCase from django import template from django.contrib.auth.models import User, Group, Permission from django.core.urlresolvers import reverse from wagtail.wagtailcore.models import Site from wagtail.wagtailimages.models import get_image_model from wagtail.wagtailimages.templatetags import ima...
true
true
1c35f943fd50eb5f610f8e4b95f819e880e64d1e
2,049
py
Python
main/migrations/0003_auto_20201119_2033.py
vestial/vision-video-analyzer
f5c5f9c0f0522008e86641648fd1591507ca8f6b
[ "MIT" ]
1
2020-10-30T00:49:21.000Z
2020-10-30T00:49:21.000Z
main/migrations/0003_auto_20201119_2033.py
vestial/vision-video-analyzer
f5c5f9c0f0522008e86641648fd1591507ca8f6b
[ "MIT" ]
null
null
null
main/migrations/0003_auto_20201119_2033.py
vestial/vision-video-analyzer
f5c5f9c0f0522008e86641648fd1591507ca8f6b
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-19 20:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0002_auto_20201119_2021'), ] operations = [ migrations.AlterField( model_name='video', name='bit_depth', ...
33.048387
53
0.401659
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0002_auto_20201119_2021'), ] operations = [ migrations.AlterField( model_name='video', name='bit_depth', field=models.CharField(blank=True, ...
true
true
1c35f95481c364cc4083287ba3cea9fbdc4a937f
1,794
py
Python
bw2io/importers/ecospold2_biosphere.py
mfastudillo/brightway2-io
dc383ddb6003a46e78259aeb7f87b9d80965d689
[ "BSD-3-Clause" ]
null
null
null
bw2io/importers/ecospold2_biosphere.py
mfastudillo/brightway2-io
dc383ddb6003a46e78259aeb7f87b9d80965d689
[ "BSD-3-Clause" ]
null
null
null
bw2io/importers/ecospold2_biosphere.py
mfastudillo/brightway2-io
dc383ddb6003a46e78259aeb7f87b9d80965d689
[ "BSD-3-Clause" ]
null
null
null
from .base_lci import LCIImporter from ..strategies import drop_unspecified_subcategories, normalize_units, ensure_categories_are_tuples from bw2data.utils import recursive_str_to_unicode from lxml import objectify import os import json EMISSIONS_CATEGORIES = { "air": "emission", "soil": "emission", "water...
32.035714
102
0.580825
from .base_lci import LCIImporter from ..strategies import drop_unspecified_subcategories, normalize_units, ensure_categories_are_tuples from bw2data.utils import recursive_str_to_unicode from lxml import objectify import os import json EMISSIONS_CATEGORIES = { "air": "emission", "soil": "emission", "water...
true
true
1c35fa017b3576d8736302353378d401f2b55622
18,486
py
Python
src/azure-cli/azure/cli/command_modules/servicefabric/_validators.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
2
2021-03-24T21:06:25.000Z
2021-03-24T21:07:59.000Z
src/azure-cli/azure/cli/command_modules/servicefabric/_validators.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/servicefabric/_validators.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
9
2020-02-12T22:53:00.000Z
2021-06-09T18:59:41.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
58.315457
120
0.679054
from msrestazure.azure_exceptions import CloudError from knack.log import get_logger from knack.util import CLIError from azure.cli.core.azclierror import ValidationError from azure.cli.command_modules.servicefabric._sf_utils import _get_resource_group_by_name from azure.mgmt.servicefabricmanagedclusters.models im...
true
true
1c35fa2c8dfc7188123cd824fc98041bce1624bb
2,588
py
Python
RecoMuon/MuonIdentification/test/runME0MuonReco_Example.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
RecoMuon/MuonIdentification/test/runME0MuonReco_Example.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
RecoMuon/MuonIdentification/test/runME0MuonReco_Example.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("ME0SegmentMatchingLocalTest") ## Standard sequence process.load('Configuration.StandardSequences.Services_cff') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('Configurati...
38.626866
103
0.781298
import FWCore.ParameterSet.Config as cms process = cms.Process("ME0SegmentMatchingLocalTest") iguration.StandardSequences.Services_cff') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.Geometry.GeometryExtended2015MuonGEM...
true
true
1c35fb14205765059508935cc2aae125add36420
2,666
py
Python
test/jpypetest/test_synchronized.py
baztian/jpype
034d44e6c719995c25e9cd61348ebc1860030a9b
[ "Apache-2.0" ]
null
null
null
test/jpypetest/test_synchronized.py
baztian/jpype
034d44e6c719995c25e9cd61348ebc1860030a9b
[ "Apache-2.0" ]
null
null
null
test/jpypetest/test_synchronized.py
baztian/jpype
034d44e6c719995c25e9cd61348ebc1860030a9b
[ "Apache-2.0" ]
null
null
null
# ***************************************************************************** # Copyright 2017 Karl Einar Nelson # # 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...
27.204082
81
0.577644
import sys import threading import time import jpype from jpype import synchronized import common fail = False if fail: class _JMonitor(object): def __init__(self, obj): pass def __enter__(self): pass def __exit__(self, exception_type, exceptio...
true
true
1c35fb709b5cef77115f62cb652253e043a8a8ea
1,192
py
Python
figures/pipeline/logger.py
groovetch/edx-figures
a69fc1195c05176ac7dae90b337dd77f4bd9679f
[ "MIT" ]
43
2018-05-29T20:01:25.000Z
2021-12-02T09:43:17.000Z
figures/pipeline/logger.py
groovetch/edx-figures
a69fc1195c05176ac7dae90b337dd77f4bd9679f
[ "MIT" ]
330
2018-05-30T17:06:15.000Z
2022-03-16T15:52:22.000Z
figures/pipeline/logger.py
groovetch/edx-figures
a69fc1195c05176ac7dae90b337dd77f4bd9679f
[ "MIT" ]
40
2018-10-06T00:15:58.000Z
2022-02-14T12:44:45.000Z
'''This module provides baseline logging for the Figures pipeline Initial focus is on tracking exceptions for Course ''' from __future__ import absolute_import import logging import json from django.core.serializers.json import DjangoJSONEncoder from figures.models import PipelineError from figures import helpers ...
28.380952
100
0.724832
from __future__ import absolute_import import logging import json from django.core.serializers.json import DjangoJSONEncoder from figures.models import PipelineError from figures import helpers as figure_helpers default_logger = logging.getLogger(__name__) def log_error_to_db(error_data, error_type, **kwargs): ...
true
true
1c35fbbb7b76a32da0a528c1537d86f517e48518
8,335
py
Python
models/layers/norm.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
models/layers/norm.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
models/layers/norm.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
from functools import partial import torch import torch.nn as nn import torch.nn.functional as F from .registry import register @register("conditional_bn_2d") class ConditionalBatchNorm2d(nn.Module): def __init__(self, num_features, num_classes): super().__init__() self.num_features = num_feature...
36.39738
150
0.604319
from functools import partial import torch import torch.nn as nn import torch.nn.functional as F from .registry import register @register("conditional_bn_2d") class ConditionalBatchNorm2d(nn.Module): def __init__(self, num_features, num_classes): super().__init__() self.num_features = num_feature...
true
true
1c35fc9680322e27a761f00327d74d3035163235
6,755
py
Python
Django_mall/Django_mall/apps/users/serializers.py
gottuantuan/Django_shopping
a7d435fe0838bc682c4cd462778e486b5eaade08
[ "MIT" ]
null
null
null
Django_mall/Django_mall/apps/users/serializers.py
gottuantuan/Django_shopping
a7d435fe0838bc682c4cd462778e486b5eaade08
[ "MIT" ]
null
null
null
Django_mall/Django_mall/apps/users/serializers.py
gottuantuan/Django_shopping
a7d435fe0838bc682c4cd462778e486b5eaade08
[ "MIT" ]
null
null
null
from rest_framework import serializers import re from rest_framework_jwt.settings import api_settings from django_redis import get_redis_connection from goods.models import SKU from .models import User, Address from celery_tasks.email.tasks import send_verify_email class CreateUserSerializer(serializers.ModelSeriali...
26.912351
100
0.593634
from rest_framework import serializers import re from rest_framework_jwt.settings import api_settings from django_redis import get_redis_connection from goods.models import SKU from .models import User, Address from celery_tasks.email.tasks import send_verify_email class CreateUserSerializer(serializers.ModelSeriali...
true
true
1c35fd08ec6e78d76324b5a01eaaf31ac343cabd
2,495
py
Python
LHconnectivity/version.py
benjamingarzon/LHconnectivity
1c960e525ed93a056bed3eaa74db28f31212271a
[ "MIT" ]
7
2019-03-11T12:34:21.000Z
2021-05-07T14:49:23.000Z
LHconnectivity/version.py
benjamingarzon/LHconnectivity
1c960e525ed93a056bed3eaa74db28f31212271a
[ "MIT" ]
67
2018-08-20T21:49:09.000Z
2019-12-04T17:52:03.000Z
LHconnectivity/version.py
benjamingarzon/LHconnectivity
1c960e525ed93a056bed3eaa74db28f31212271a
[ "MIT" ]
6
2018-10-25T17:41:25.000Z
2020-12-26T18:09:53.000Z
from __future__ import absolute_import, division, print_function from os.path import join as pjoin # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 1 _version_micro = '' # use '' for first of series, number for 1 and above _version_extra = 'dev' # _versi...
32.828947
77
0.734269
from __future__ import absolute_import, division, print_function from os.path import join as pjoin _version_major = 0 _version_minor = 1 _version_micro = '' _version_extra = 'dev' n_minor] if _version_micro: _ver.append(_version_micro) if _version_extra: _ver.append(_version_extra) __version__ = '.'.join(m...
true
true
1c35fd99530e6e6cbcf496ac93dfdeaceb8567c3
245
py
Python
src/direpack/plot/__init__.py
zedian/direpack
507a5e21937a6e4032aa0d3e5c4a79e1349343d8
[ "MIT" ]
23
2020-04-04T20:48:25.000Z
2022-01-07T19:42:22.000Z
src/direpack/plot/__init__.py
zedian/direpack
507a5e21937a6e4032aa0d3e5c4a79e1349343d8
[ "MIT" ]
8
2020-04-26T19:24:01.000Z
2021-05-20T13:29:31.000Z
src/direpack/plot/__init__.py
zedian/direpack
507a5e21937a6e4032aa0d3e5c4a79e1349343d8
[ "MIT" ]
9
2020-04-11T11:25:16.000Z
2021-04-27T09:38:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 22 12:17:17 2018 @author: Sven Serneels, Ponalytics """ __name__ = "plot" __author__ = "Sven Serneels" __license__ = "MIT" __version__ = "0.9.0" __date__ = "2020-04-18"
13.611111
35
0.64898
__name__ = "plot" __author__ = "Sven Serneels" __license__ = "MIT" __version__ = "0.9.0" __date__ = "2020-04-18"
true
true
1c35fddf8331755623b314741d4a405baeff9969
50,118
py
Python
discord/client.py
Rayster4/discord.py-1.7.3
4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f
[ "MIT" ]
21
2021-03-29T05:49:35.000Z
2022-03-18T09:02:34.000Z
discord/client.py
Rayster4/discord.py-1.7.3
4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f
[ "MIT" ]
15
2021-04-10T11:08:09.000Z
2022-03-22T07:48:58.000Z
discord/client.py
Rayster4/discord.py-1.7.3
4a4c60a8fab7bf00eac2e9ffbb5621f68a4c6b6f
[ "MIT" ]
31
2021-03-29T05:54:57.000Z
2022-03-22T16:58:57.000Z
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
33.523746
136
0.58494
import asyncio import logging import signal import sys import traceback import aiohttp from .user import User, Profile from .invite import Invite from .template import Template from .widget import Widget from .guild import Guild from .channel import _channel_factory from .enums import ChannelType from .mentions im...
true
true
1c35fe437d43e2a44d93fc07afd57891e291470b
21,143
py
Python
resources/lib/kodi/library.py
Sopor/plugin.video.netflix-1
ecefb537cdffa368e104864b313fbcc010b44b68
[ "MIT" ]
null
null
null
resources/lib/kodi/library.py
Sopor/plugin.video.netflix-1
ecefb537cdffa368e104864b313fbcc010b44b68
[ "MIT" ]
null
null
null
resources/lib/kodi/library.py
Sopor/plugin.video.netflix-1
ecefb537cdffa368e104864b313fbcc010b44b68
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2018 Caphm (original implementation module) Copyright (C) 2020 Stefano Gottardo Kodi library integration SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ from __future...
56.381333
119
0.636002
from __future__ import absolute_import, division, unicode_literals import os from datetime import datetime from future.utils import iteritems import xbmc import resources.lib.utils.api_requests as api import resources.lib.common as common import resources.lib.kodi.nfo as nfo import resources.lib.kodi.ui as ui from...
true
true
1c35fe577ac3bf34747329de2e06ab146cad6ba1
3,220
py
Python
data/data_remote.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
data/data_remote.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
data/data_remote.py
howiemac/evoke4
5d7af36c9fb23d94766d54c9c63436343959d3a8
[ "BSD-3-Clause" ]
null
null
null
class RemoteSQLDataObject(MassProducedSQLDataObject): "a data object that will flush changes to queue for remote transmission" TRANSMISSION_DIR = '/evoke/var/tx' def flatten(self, d): "flatten out our datetime objects for marshal" for k in d: if type(d[k]) is datetime: d[k] = `d[k]` def...
31.262136
89
0.624224
class RemoteSQLDataObject(MassProducedSQLDataObject): "a data object that will flush changes to queue for remote transmission" TRANSMISSION_DIR = '/evoke/var/tx' def flatten(self, d): "flatten out our datetime objects for marshal" for k in d: if type(d[k]) is datetime: d[k] = `d[k]` def...
false
true
1c35ff148136ebc9186e9f8c778add8a0271665c
1,826
py
Python
sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35.803922
76
0.613363
from msrest.serialization import Model class CreateManagementGroupDetails(Model): _validation = { 'version': {'readonly': True}, 'updated_time': {'readonly': True}, 'updated_by': {'readonly': True}, } _attribute_map = { 'version': {'key': 'version', 'type': 'fl...
true
true
1c35ff5324a7f4991b6d4fcb399afdf907af9100
4,077
py
Python
development/tests/unit/lib/dynamodb/scans_test.py
jchrisfarris/antiope-scorecards
82a1e228f4bd23f756c1dec8c0582fcde98de564
[ "Apache-2.0" ]
1
2020-09-23T21:40:16.000Z
2020-09-23T21:40:16.000Z
development/tests/unit/lib/dynamodb/scans_test.py
jchrisfarris/antiope-scorecards
82a1e228f4bd23f756c1dec8c0582fcde98de564
[ "Apache-2.0" ]
null
null
null
development/tests/unit/lib/dynamodb/scans_test.py
jchrisfarris/antiope-scorecards
82a1e228f4bd23f756c1dec8c0582fcde98de564
[ "Apache-2.0" ]
3
2020-07-11T19:18:12.000Z
2021-08-14T17:43:06.000Z
import json from lib.dynamodb import scans_table class TestScanHandler: def test_add_error(self): scan_id = scans_table.create_new_scan_id() function_name = 'functionName' error1 = 'error1' error2 = 'error2' error3 = 'error3' error4 = { 'Cause': json.dum...
31.361538
79
0.459652
import json from lib.dynamodb import scans_table class TestScanHandler: def test_add_error(self): scan_id = scans_table.create_new_scan_id() function_name = 'functionName' error1 = 'error1' error2 = 'error2' error3 = 'error3' error4 = { 'Cause': json.dum...
true
true
1c35ff829758d033554b6548d08a829209cdca03
103,582
py
Python
tests/test_misc.py
lukechilds/lightning
9bb2b4a9098d6d3e4c19bf9ec00c7c9794cb858f
[ "MIT" ]
null
null
null
tests/test_misc.py
lukechilds/lightning
9bb2b4a9098d6d3e4c19bf9ec00c7c9794cb858f
[ "MIT" ]
null
null
null
tests/test_misc.py
lukechilds/lightning
9bb2b4a9098d6d3e4c19bf9ec00c7c9794cb858f
[ "MIT" ]
null
null
null
from bitcoin.rpc import RawProxy from decimal import Decimal from fixtures import * # noqa: F401,F403 from fixtures import LightningNode, TEST_NETWORK from flaky import flaky # noqa: F401 from pyln.client import RpcError from threading import Event from pyln.testing.utils import ( DEVELOPER, TIMEOUT, VALGRIND, DE...
42.295631
658
0.639918
from bitcoin.rpc import RawProxy from decimal import Decimal from fixtures import * from fixtures import LightningNode, TEST_NETWORK from flaky import flaky from pyln.client import RpcError from threading import Event from pyln.testing.utils import ( DEVELOPER, TIMEOUT, VALGRIND, DEPRECATED_APIS, sync_blockheig...
true
true
1c360089d6ba1e46e87b782962383ee5f96b548f
22,676
py
Python
zerver/middleware.py
guettli/zulip
d9431a5e66a97c619aecfe92c4a2cb4acc609431
[ "Apache-2.0" ]
null
null
null
zerver/middleware.py
guettli/zulip
d9431a5e66a97c619aecfe92c4a2cb4acc609431
[ "Apache-2.0" ]
null
null
null
zerver/middleware.py
guettli/zulip
d9431a5e66a97c619aecfe92c4a2cb4acc609431
[ "Apache-2.0" ]
null
null
null
import cProfile import logging import time import traceback from typing import Any, AnyStr, Callable, Dict, Iterable, List, MutableMapping, Optional, Union from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.db import connection from django.http import HttpRequest, HttpRespon...
47.045643
154
0.682925
import cProfile import logging import time import traceback from typing import Any, AnyStr, Callable, Dict, Iterable, List, MutableMapping, Optional, Union from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.db import connection from django.http import HttpRequest, HttpRespon...
true
true
1c3600a9bb030e65a2b7b15ea8f5314f024fe8ac
3,512
py
Python
HyperAPI/hdp_api/routes/dashboards.py
MarouenDevs/HyperAPI
dc9390fbb47d235669cdf0b6c1be4608ffdab83f
[ "BSD-3-Clause" ]
null
null
null
HyperAPI/hdp_api/routes/dashboards.py
MarouenDevs/HyperAPI
dc9390fbb47d235669cdf0b6c1be4608ffdab83f
[ "BSD-3-Clause" ]
null
null
null
HyperAPI/hdp_api/routes/dashboards.py
MarouenDevs/HyperAPI
dc9390fbb47d235669cdf0b6c1be4608ffdab83f
[ "BSD-3-Clause" ]
null
null
null
from HyperAPI.hdp_api.routes import Resource, Route from HyperAPI.hdp_api.routes.base.version_management import available_since class Dashboards(Resource): name = "Dashboards" class _Dashboards(Route): name = "getDashboards" httpMethod = Route.GET path = "/projects/{project_ID}/datase...
34.097087
94
0.626708
from HyperAPI.hdp_api.routes import Resource, Route from HyperAPI.hdp_api.routes.base.version_management import available_since class Dashboards(Resource): name = "Dashboards" class _Dashboards(Route): name = "getDashboards" httpMethod = Route.GET path = "/projects/{project_ID}/datase...
true
true
1c36013e2722c6858e1dc215105ee2c17bb2d760
1,744
py
Python
config/wsgi.py
kanhirun/safe-transaction-service
9bd6103be7d77469a337b6f02c8e0693e7951e4c
[ "MIT" ]
5
2021-01-28T17:41:42.000Z
2021-11-14T17:09:18.000Z
config/wsgi.py
kanhirun/safe-transaction-service
9bd6103be7d77469a337b6f02c8e0693e7951e4c
[ "MIT" ]
8
2022-03-15T18:39:45.000Z
2022-03-28T01:28:13.000Z
config/wsgi.py
kanhirun/safe-transaction-service
9bd6103be7d77469a337b6f02c8e0693e7951e4c
[ "MIT" ]
5
2021-04-06T17:20:02.000Z
2022-01-13T10:58:08.000Z
""" WSGI config for Gnosis Safe Transaction Service project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via t...
41.52381
79
0.801032
import os import sys from django.core.wsgi import get_wsgi_application app_path = os.path.abspath(os.path.join( os.path.dirname(os.path.abspath(__file__)), os.pardir)) sys.path.append(os.path.join(app_path, 'safe_transaction_service')) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.produ...
true
true
1c36018823573bb44fb59b9e5a571b4427cfb7c9
2,513
py
Python
research/serializers.py
wakaflorien/cst-research-api
4c9dfe0892f2f9211904dd566347e1edd0e34853
[ "MIT" ]
1
2021-08-10T07:48:09.000Z
2021-08-10T07:48:09.000Z
research/serializers.py
wakaflorien/cst-research-api
4c9dfe0892f2f9211904dd566347e1edd0e34853
[ "MIT" ]
null
null
null
research/serializers.py
wakaflorien/cst-research-api
4c9dfe0892f2f9211904dd566347e1edd0e34853
[ "MIT" ]
1
2021-08-16T12:31:26.000Z
2021-08-16T12:31:26.000Z
from rest_framework import serializers from .models import * class ResearchSerializer(serializers.ModelSerializer): staff = serializers.HiddenField( default = serializers.CurrentUserDefault() ) class Meta: model = Tbl_Research fields = '__all__' class ConferenceSeria...
25.907216
80
0.663351
from rest_framework import serializers from .models import * class ResearchSerializer(serializers.ModelSerializer): staff = serializers.HiddenField( default = serializers.CurrentUserDefault() ) class Meta: model = Tbl_Research fields = '__all__' class ConferenceSeria...
true
true
1c3601ee6f560ca43bd1fe942944a722f2ab0737
391
py
Python
counter/counter/asgi.py
Rajan917/Python-Django-Projects
e47ac342bf4a047931ed6a1784dbc3d4321aac59
[ "MIT" ]
3
2022-03-20T10:50:04.000Z
2022-03-20T10:50:15.000Z
counter/counter/asgi.py
Rajan917/Python-Django-Projects
e47ac342bf4a047931ed6a1784dbc3d4321aac59
[ "MIT" ]
null
null
null
counter/counter/asgi.py
Rajan917/Python-Django-Projects
e47ac342bf4a047931ed6a1784dbc3d4321aac59
[ "MIT" ]
null
null
null
""" ASGI config for counter project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'counter.settings') application = get_asgi_application()
true
true
1c360299626f54c716aa4aecbead375a80472123
2,013
py
Python
DeepJanus-BeamNG/udacity_integration/take-free-screenshot.py
TrackerSB/deepjanus
f715072645b1e6f2cc0c51ec0c3a6296cfb14a1d
[ "MIT" ]
null
null
null
DeepJanus-BeamNG/udacity_integration/take-free-screenshot.py
TrackerSB/deepjanus
f715072645b1e6f2cc0c51ec0c3a6296cfb14a1d
[ "MIT" ]
null
null
null
DeepJanus-BeamNG/udacity_integration/take-free-screenshot.py
TrackerSB/deepjanus
f715072645b1e6f2cc0c51ec0c3a6296cfb14a1d
[ "MIT" ]
null
null
null
import random import numpy as np from beamng_brewer import BeamNGBrewer from beamng_waypoint import BeamNGWaypoint from road_storage import RoadStorage from simulation_data_collector import SimulationDataCollector from beamng_tig_maps import maps random.seed(42) np.random.seed(42) maps.install_map_if_needed() def...
26.84
101
0.717834
import random import numpy as np from beamng_brewer import BeamNGBrewer from beamng_waypoint import BeamNGWaypoint from road_storage import RoadStorage from simulation_data_collector import SimulationDataCollector from beamng_tig_maps import maps random.seed(42) np.random.seed(42) maps.install_map_if_needed() def...
true
true
1c36030bb858ef30ae2b6036c5c9ce4b88c467f5
164
py
Python
notes/gammatone_filters/resrc/plot.py
bingo-todd/bingo-todd.github.io
87cafeb11e53b8633b6dd3226a2ca3d5b3b823e2
[ "CC-BY-4.0" ]
null
null
null
notes/gammatone_filters/resrc/plot.py
bingo-todd/bingo-todd.github.io
87cafeb11e53b8633b6dd3226a2ca3d5b3b823e2
[ "CC-BY-4.0" ]
null
null
null
notes/gammatone_filters/resrc/plot.py
bingo-todd/bingo-todd.github.io
87cafeb11e53b8633b6dd3226a2ca3d5b3b823e2
[ "CC-BY-4.0" ]
null
null
null
import sys sys.path.append('/home/st/Work_Space/module_st/Gammatone-filters/') from APGTF import APGTF # gtf = APGTF(fs=16e3,freq_low=80,freq_high=5e3,N_band=30)
23.428571
67
0.77439
import sys sys.path.append('/home/st/Work_Space/module_st/Gammatone-filters/') from APGTF import APGTF gtf = APGTF(fs=16e3,freq_low=80,freq_high=5e3,N_band=30)
true
true
1c36037060904220c57750babc5d5512fe96cac1
1,538
py
Python
clustering/fas_con_mat.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
1
2020-09-23T00:57:20.000Z
2020-09-23T00:57:20.000Z
clustering/fas_con_mat.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
null
null
null
clustering/fas_con_mat.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
null
null
null
from FT.weighted_tracts import * from os.path import join as pjoin from dipy.io.streamline import load_trk if __name__ == '__main__': subj = all_subj_folders names = all_subj_names index_to_text_file = r'C:\Users\hila\data\megaatlas\megaatlas2nii.txt' fig_types = ['SLF','AF'] weight_by='...
45.235294
102
0.60143
from FT.weighted_tracts import * from os.path import join as pjoin from dipy.io.streamline import load_trk if __name__ == '__main__': subj = all_subj_folders names = all_subj_names index_to_text_file = r'C:\Users\hila\data\megaatlas\megaatlas2nii.txt' fig_types = ['SLF','AF'] weight_by='...
true
true
1c3604465198644c072359ff4d494d3b339b52f9
2,720
py
Python
tools/bm_runtime/simple_pre_lag/ttypes.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
null
null
null
tools/bm_runtime/simple_pre_lag/ttypes.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
null
null
null
tools/bm_runtime/simple_pre_lag/ttypes.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
2
2018-06-06T14:10:23.000Z
2020-04-07T17:20:55.000Z
# # Autogenerated by Thrift Compiler (0.9.2) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol tr...
24.727273
188
0.665441
from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None class McOperationErrorCode: TABLE_FULL = 1 INVALID_MGID...
true
true
1c3604c1e0dee5313de62253ae2dd0020284d2a7
17,512
py
Python
docs/chapters/jep/jep-2/flow.py
abreu4/jina
d1d045e9e0933dffb3bd668cb9cfebab6cd52202
[ "Apache-2.0" ]
2
2021-06-18T11:55:15.000Z
2021-08-30T20:15:46.000Z
docs/chapters/jep/jep-2/flow.py
abreu4/jina
d1d045e9e0933dffb3bd668cb9cfebab6cd52202
[ "Apache-2.0" ]
null
null
null
docs/chapters/jep/jep-2/flow.py
abreu4/jina
d1d045e9e0933dffb3bd668cb9cfebab6cd52202
[ "Apache-2.0" ]
1
2020-08-28T09:08:29.000Z
2020-08-28T09:08:29.000Z
from typing import Union, List, Iterator from .base import BaseFlow from ..clients.base import InputFnType, CallbackFnType from ..enums import DataInputType from ..helper import deprecated_alias if False: import numpy as np class Flow(BaseFlow): @deprecated_alias(buffer='input_fn', callback='on_done', outpu...
57.042345
120
0.622887
from typing import Union, List, Iterator from .base import BaseFlow from ..clients.base import InputFnType, CallbackFnType from ..enums import DataInputType from ..helper import deprecated_alias if False: import numpy as np class Flow(BaseFlow): @deprecated_alias(buffer='input_fn', callback='on_done', outpu...
true
true
1c36053e57cf3440c729741fa2ff29e67112c592
1,695
py
Python
blobcity/utils/ProblemType.py
Bhumika0201/autoai
8a1ba4453395798cf694c49ac481ba1d37989fb4
[ "Apache-2.0" ]
null
null
null
blobcity/utils/ProblemType.py
Bhumika0201/autoai
8a1ba4453395798cf694c49ac481ba1d37989fb4
[ "Apache-2.0" ]
null
null
null
blobcity/utils/ProblemType.py
Bhumika0201/autoai
8a1ba4453395798cf694c49ac481ba1d37989fb4
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 BlobCity, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
37.666667
117
0.673156
import numpy as np class ProType: def __init__(self): pass def checkType(self,data): if(data.dtype in ['object']): return dict({'type':'Classification'}) else: target_length =len(np.unique(data)) if data.dtype in ['int64','float64','int32','float3...
true
true
1c360552de1eae163d3ff95488b65c547d6d11ea
1,480
py
Python
anonymonkey/schemas.py
hugoatease/anonymonkey
56e6465a7b58238a43c1a46c7c9c77966054153d
[ "Apache-2.0" ]
null
null
null
anonymonkey/schemas.py
hugoatease/anonymonkey
56e6465a7b58238a43c1a46c7c9c77966054153d
[ "Apache-2.0" ]
null
null
null
anonymonkey/schemas.py
hugoatease/anonymonkey
56e6465a7b58238a43c1a46c7c9c77966054153d
[ "Apache-2.0" ]
null
null
null
from flask.ext.mongoengine import MongoEngine db = MongoEngine() class User(db.Document): sub = db.StringField(required=True, primary_key=True) id_token = db.StringField(required=True) email = db.StringField(required=True) admin = db.BooleanField(required=True, default=False) first_name = db.Stri...
30.204082
102
0.739189
from flask.ext.mongoengine import MongoEngine db = MongoEngine() class User(db.Document): sub = db.StringField(required=True, primary_key=True) id_token = db.StringField(required=True) email = db.StringField(required=True) admin = db.BooleanField(required=True, default=False) first_name = db.Stri...
true
true
1c36061c9a038d7757b87b859b7bfc49c79a6ee3
184
py
Python
Lib/fontTools/ttLib/tables/G_P_O_S_.py
twardoch/fonttools-py27
75b852d3f59fc0d03c6e78581530597d4c6368a1
[ "MIT", "BSD-3-Clause" ]
240
2021-01-11T14:49:24.000Z
2022-03-29T22:33:49.000Z
Lib/fontTools/ttLib/tables/G_P_O_S_.py
twardoch/fonttools-py27
75b852d3f59fc0d03c6e78581530597d4c6368a1
[ "MIT", "BSD-3-Clause" ]
77
2021-01-12T20:23:30.000Z
2022-03-28T12:14:34.000Z
Lib/fontTools/ttLib/tables/G_P_O_S_.py
twardoch/fonttools-py27
75b852d3f59fc0d03c6e78581530597d4c6368a1
[ "MIT", "BSD-3-Clause" ]
28
2021-01-17T05:44:11.000Z
2022-01-11T19:58:46.000Z
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from .otBase import BaseTTXConverter class table_G_P_O_S_(BaseTTXConverter): pass
23
64
0.842391
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from .otBase import BaseTTXConverter class table_G_P_O_S_(BaseTTXConverter): pass
true
true
1c3606c75a682f31ea7158232187d398d2a86387
387
py
Python
python/mcap/mcap0/opcode.py
jameskuszmaul-brt/mcap
bce6560d743359288a75c709ec16cd1c450069c9
[ "Apache-2.0" ]
46
2022-02-07T18:58:11.000Z
2022-03-21T22:03:54.000Z
python/mcap/mcap0/opcode.py
jameskuszmaul-brt/mcap
bce6560d743359288a75c709ec16cd1c450069c9
[ "Apache-2.0" ]
135
2021-12-02T15:21:58.000Z
2022-03-31T17:50:23.000Z
python/mcap/mcap0/opcode.py
jameskuszmaul-brt/mcap
bce6560d743359288a75c709ec16cd1c450069c9
[ "Apache-2.0" ]
4
2022-02-20T12:56:02.000Z
2022-03-30T20:14:52.000Z
from enum import IntEnum, unique @unique class Opcode(IntEnum): ATTACHMENT = 0x09 ATTACHMENT_INDEX = 0x0A CHANNEL = 0x04 CHUNK = 0x06 CHUNK_INDEX = 0x08 DATA_END = 0x0F FOOTER = 0x02 HEADER = 0x01 MESSAGE = 0x05 MESSAGE_INDEX = 0x07 METADATA = 0x0C METADATA_INDEX = 0x0D...
18.428571
32
0.651163
from enum import IntEnum, unique @unique class Opcode(IntEnum): ATTACHMENT = 0x09 ATTACHMENT_INDEX = 0x0A CHANNEL = 0x04 CHUNK = 0x06 CHUNK_INDEX = 0x08 DATA_END = 0x0F FOOTER = 0x02 HEADER = 0x01 MESSAGE = 0x05 MESSAGE_INDEX = 0x07 METADATA = 0x0C METADATA_INDEX = 0x0D...
true
true
1c3607c7119e707f4660ea805ec23c4e91e7f6cc
451
py
Python
src/membership/s.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
src/membership/s.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
src/membership/s.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
from .membership import Membership class SMembership(Membership): def __init__(self, a, c): def func(x): if x <= a: return 0 if a < x and x <= (a + c) / 2: return 2 * ((x - a) / (c - a)) ** 2 if (a + c) / 2 < x and x < c: ...
28.1875
68
0.405765
from .membership import Membership class SMembership(Membership): def __init__(self, a, c): def func(x): if x <= a: return 0 if a < x and x <= (a + c) / 2: return 2 * ((x - a) / (c - a)) ** 2 if (a + c) / 2 < x and x < c: ...
true
true
1c360801b72157ce344e9fdfc868b4e6230f5227
430
py
Python
app/core/migrations/0005_recipe_image.py
elivjo/recipe-app-api
d534601078d8359c2722c0c58ce749f6741a3826
[ "MIT" ]
null
null
null
app/core/migrations/0005_recipe_image.py
elivjo/recipe-app-api
d534601078d8359c2722c0c58ce749f6741a3826
[ "MIT" ]
null
null
null
app/core/migrations/0005_recipe_image.py
elivjo/recipe-app-api
d534601078d8359c2722c0c58ce749f6741a3826
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-10-06 14:42 import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.AddField( model_name='recipe', name='image', ...
21.5
93
0.62093
import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.AddField( model_name='recipe', name='image', field=models.ImageField(null=True, u...
true
true
1c360883c8b9f66d32ea685e55532993e097f442
11,778
py
Python
tensorflow/python/kernel_tests/matmul_op_test.py
Kinoo2/tensorflow
e334eb2f95bdece6f0df3eff0cf9c402078fe392
[ "Apache-2.0" ]
2
2021-06-17T21:26:38.000Z
2021-06-20T18:25:57.000Z
tensorflow/python/kernel_tests/matmul_op_test.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
3
2021-08-25T15:10:14.000Z
2022-02-10T04:33:14.000Z
tensorflow/python/kernel_tests/matmul_op_test.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
3
2021-09-26T22:20:25.000Z
2021-09-26T23:07:13.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.616393
80
0.639328
from __future__ import absolute_import from __future__ import division from __future__ import print_function import operator import numpy as np from tensorflow.python import tf2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.fr...
true
true
1c3608a863d2c4a6cb5953c3e40a40492fa6ec86
2,378
py
Python
test/unit/objects/test_processorspec.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
null
null
null
test/unit/objects/test_processorspec.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
null
null
null
test/unit/objects/test_processorspec.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np import scipy from pygsti.processors import QubitProcessorSpec from pygsti.models import modelconstruction as mc from pygsti.circuits import Circuit from ..util import BaseCase, with_temp_path def save_and_load(obj, pth): obj.write(pth + ".json") return QubitProcessorSpec.r...
36.584615
103
0.56434
import unittest import numpy as np import scipy from pygsti.processors import QubitProcessorSpec from pygsti.models import modelconstruction as mc from pygsti.circuits import Circuit from ..util import BaseCase, with_temp_path def save_and_load(obj, pth): obj.write(pth + ".json") return QubitProcessorSpec.r...
true
true
1c360974e2cc8474ccbabb66f2c16d9b1f00c6a6
13,679
py
Python
examples/error_analysis.py
OsmanMutlu/pytorch-pretrained-BERT
837cde8fe82549dc5aeb34aa25b86c07c9448a46
[ "Apache-2.0" ]
null
null
null
examples/error_analysis.py
OsmanMutlu/pytorch-pretrained-BERT
837cde8fe82549dc5aeb34aa25b86c07c9448a46
[ "Apache-2.0" ]
null
null
null
examples/error_analysis.py
OsmanMutlu/pytorch-pretrained-BERT
837cde8fe82549dc5aeb34aa25b86c07c9448a46
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Random baseline for the PAN19 hyperpartisan news detection task""" # Version: 2018-09-24 # Parameters: # --inputDataset=<directory> # Directory that contains the articles XML file with the articles for which a prediction should be made. # --outputDir=<directory> # Directory to which the p...
35.622396
136
0.626362
from __future__ import division import os import sys from lxml import etree import codecs import xml.etree.ElementTree as ET import numpy as np import pandas as pd from pathlib import Path import glob import argparse import logging import datetime import random import math import torch from torch.utils.data...
true
true
1c360b20042a5456b774f7aac67b4d7304b905ab
1,975
py
Python
plot_bar.py
lauromoraes/CapsNet-promoter
9b08912648ff5d58a11ebb42225d9ad9851c61ac
[ "MIT" ]
2
2021-11-08T16:21:56.000Z
2022-03-07T01:49:26.000Z
plot_bar.py
lauromoraes/CapsNet-promoter
9b08912648ff5d58a11ebb42225d9ad9851c61ac
[ "MIT" ]
null
null
null
plot_bar.py
lauromoraes/CapsNet-promoter
9b08912648ff5d58a11ebb42225d9ad9851c61ac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jul 4 13:32:01 2018 @author: fnord """ import pandas as pd import numpy as np import matplotlib.pyplot as plt sn_a_mean1 = (.91, .97, .88, .87, .90, .88, .94) sn_a_std1 = (.01, .02, .07, .04, .02, .02, .01) sn_a_mean2 = (.94, .95, .91, .90, .90, .88, .97) sn_a_std2 ...
29.477612
135
0.569114
import pandas as pd import numpy as np import matplotlib.pyplot as plt sn_a_mean1 = (.91, .97, .88, .87, .90, .88, .94) sn_a_std1 = (.01, .02, .07, .04, .02, .02, .01) sn_a_mean2 = (.94, .95, .91, .90, .90, .88, .97) sn_a_std2 = (.0, .0, .0, .0, .0, .0, .0) sp_a_mean1 = (.96, .98, .95, .97, .98, .95, .98) ...
true
true
1c360bb7ceb0f04bc920af733bb8e3733cdbaa47
947
py
Python
thrift/compiler/py/generate/__init__.py
CacheboxInc/fbthrift
b894dd9192ea4684c0067c93bb2ba2b9547749ec
[ "Apache-2.0" ]
2
2021-06-29T13:42:22.000Z
2021-09-06T10:57:34.000Z
thrift/compiler/py/generate/__init__.py
CacheboxInc/fbthrift
b894dd9192ea4684c0067c93bb2ba2b9547749ec
[ "Apache-2.0" ]
null
null
null
thrift/compiler/py/generate/__init__.py
CacheboxInc/fbthrift
b894dd9192ea4684c0067c93bb2ba2b9547749ec
[ "Apache-2.0" ]
5
2021-06-29T13:42:26.000Z
2022-02-08T02:41:34.000Z
#!/usr/local/bin/python2.6 -tt # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (...
36.423077
61
0.782471
import t_generator import t_cpp_generator import t_schema_generator __all__ = [t_cpp_generator, t_schema_generator, t_generator]
true
true
1c360bbc8de80b967f85f36dce48094b547089c2
3,644
py
Python
bibliography/mdfiles.py
poely/website-content
2ac8dd35a4bac5536c33cf01466728c606cfeb8e
[ "MIT" ]
null
null
null
bibliography/mdfiles.py
poely/website-content
2ac8dd35a4bac5536c33cf01466728c606cfeb8e
[ "MIT" ]
null
null
null
bibliography/mdfiles.py
poely/website-content
2ac8dd35a4bac5536c33cf01466728c606cfeb8e
[ "MIT" ]
null
null
null
""" MD files """ def save_md_file(output_path, md_content): ''' save md cont to output path ''' file = open(output_path, 'w', encoding='utf-8') file.write(md_content) file.close() def create_author_md_files(author_bib_keys, list_researchers): ''' Creates md file for every author ...
43.380952
105
0.497256
def save_md_file(output_path, md_content): file = open(output_path, 'w', encoding='utf-8') file.write(md_content) file.close() def create_author_md_files(author_bib_keys, list_researchers): for name, bib_keys in author_bib_keys.items(): author_name = name.replace('_', ' ') groups =...
true
true
1c360c5395cb11877a6502a94516e1fbf35dddb6
842
py
Python
bottender/bot/base.py
stegben/bottender-py
07861e13a8c23507cbe7c783631d193d1d1951d9
[ "MIT" ]
1
2018-12-28T02:51:10.000Z
2018-12-28T02:51:10.000Z
bottender/bot/base.py
stegben/bottender-py
07861e13a8c23507cbe7c783631d193d1d1951d9
[ "MIT" ]
null
null
null
bottender/bot/base.py
stegben/bottender-py
07861e13a8c23507cbe7c783631d193d1d1951d9
[ "MIT" ]
1
2019-04-05T04:35:28.000Z
2019-04-05T04:35:28.000Z
import abc import asyncio as aio class Bot(abc.ABC): _handler = None def __init__(self, connector, session_store, loop=None): self._connector = connector self._session_store = session_store self._loop = loop def create_request_handler(self): if self._handler is None: ...
30.071429
80
0.684086
import abc import asyncio as aio class Bot(abc.ABC): _handler = None def __init__(self, connector, session_store, loop=None): self._connector = connector self._session_store = session_store self._loop = loop def create_request_handler(self): if self._handler is None: ...
true
true
1c360ce0fb1f7dec70b6d95a8302baedce513186
2,878
py
Python
examples/sparks.py
Bouncehball/pgeng
6f88991e16cfd744c8565b68b6348f313b4d75c0
[ "MIT" ]
null
null
null
examples/sparks.py
Bouncehball/pgeng
6f88991e16cfd744c8565b68b6348f313b4d75c0
[ "MIT" ]
null
null
null
examples/sparks.py
Bouncehball/pgeng
6f88991e16cfd744c8565b68b6348f313b4d75c0
[ "MIT" ]
null
null
null
import pygame, pgeng from random import uniform, randint from pygame.locals import * pygame.init() #pgeng.set_spark_attributes(side_length=0.4, back_length=2.5)# to change how it looks screen = pgeng.Screen((640, 480), SCALED | RESIZABLE, vsync=0) display = screen.get_display() clock = pygame.time.Clock() p...
34.261905
176
0.563933
import pygame, pgeng from random import uniform, randint from pygame.locals import * pygame.init() (640, 480), SCALED | RESIZABLE, vsync=0) display = screen.get_display() clock = pygame.time.Clock() pygame.mouse.set_visible(False) sparks = [] shockwaves = [] turn = False lighting = False turnnumber = 0....
true
true
1c360de1bbd0d8dd43183a8e7d04f990a1fe929a
86,855
py
Python
pyhdx/web/controllers.py
Jhsmit/PyHDX
34bf653743008508bb14f24ccca21ee39b5b25e3
[ "MIT" ]
15
2020-10-14T14:15:54.000Z
2022-03-31T17:55:36.000Z
pyhdx/web/controllers.py
Jhsmit/PyHDX
34bf653743008508bb14f24ccca21ee39b5b25e3
[ "MIT" ]
145
2020-10-01T13:32:20.000Z
2022-03-31T08:31:47.000Z
pyhdx/web/controllers.py
Jhsmit/PyHDX
34bf653743008508bb14f24ccca21ee39b5b25e3
[ "MIT" ]
3
2021-03-03T10:57:05.000Z
2021-05-24T09:11:49.000Z
import operator import urllib.request import zipfile from collections import namedtuple from io import StringIO, BytesIO from pathlib import Path import colorcet import dask import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd import panel as pn import param from numpy.lib.re...
41.657074
160
0.632307
import operator import urllib.request import zipfile from collections import namedtuple from io import StringIO, BytesIO from pathlib import Path import colorcet import dask import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd import panel as pn import param from numpy.lib.re...
true
true
1c360e04d5d93c7aa7945e000a7c9be1dceb31d0
4,681
py
Python
nrfupytesteos/nrfu_lag_status.py
wasabi222/nanog77-nrfu-tutorial
43d5cfe488c3a231f03f979b47c3e61b021f2936
[ "Apache-2.0" ]
33
2019-10-29T18:32:48.000Z
2022-03-20T19:57:59.000Z
nrfupytesteos/nrfu_lag_status.py
wasabi222/nanog77-nrfu-tutorial
43d5cfe488c3a231f03f979b47c3e61b021f2936
[ "Apache-2.0" ]
null
null
null
nrfupytesteos/nrfu_lag_status.py
wasabi222/nanog77-nrfu-tutorial
43d5cfe488c3a231f03f979b47c3e61b021f2936
[ "Apache-2.0" ]
12
2019-10-25T19:36:44.000Z
2021-12-07T10:21:07.000Z
# Copyright 2019 Jeremy Schulman, nwkautomaniac@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
27.215116
98
0.584277
from nrfupytesteos import nrfu_exc as exc TEST_CASE_NAME = "test-lag-status" def make_testcase(dut, lag_name, interfaces): return { "test-case": TEST_CASE_NAME, "dut": dut, "params": { "name": lag_name }, "expected": { "interfaces": ...
true
true
1c360f1ec159c294a3c41e64d217af5c39f22a28
1,118
py
Python
spirit/urls/topic_moderate.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
spirit/urls/topic_moderate.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
spirit/urls/topic_moderate.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import patterns, url from spirit.views.topic_moderate import TopicModerateDelete, TopicModerateUnDelete, \ TopicModerateLock, TopicModerateUnLock, TopicModeratePin, TopicModerateUnPin, \ TopicModerateGlobalPin, TopicModerat...
41.407407
104
0.690519
from __future__ import unicode_literals from django.conf.urls import patterns, url from spirit.views.topic_moderate import TopicModerateDelete, TopicModerateUnDelete, \ TopicModerateLock, TopicModerateUnLock, TopicModeratePin, TopicModerateUnPin, \ TopicModerateGlobalPin, TopicModerateGlobalUnPin urlpatte...
true
true
1c360fcb188120bdf4875fd0a5d6d490fd8a5027
3,984
py
Python
fastreid/evaluation/reid_evaluation.py
xiaomingzhid/SSKD
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
19
2021-09-10T02:16:29.000Z
2022-03-27T12:47:46.000Z
fastreid/evaluation/reid_evaluation.py
liuwuhomepage/sskd
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
5
2021-09-27T03:52:12.000Z
2021-12-29T09:13:40.000Z
fastreid/evaluation/reid_evaluation.py
liuwuhomepage/sskd
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
3
2021-12-23T16:44:44.000Z
2022-03-27T12:47:47.000Z
# encoding: utf-8 """ @author: liaoxingyu @contact: sherlockliao01@gmail.com """ import copy import logging from collections import OrderedDict import numpy as np import torch import torch.nn.functional as F from sklearn import metrics import pdb from fastreid.utils import comm from fastreid.utils.compute_dist import...
33.478992
106
0.615462
import copy import logging from collections import OrderedDict import numpy as np import torch import torch.nn.functional as F from sklearn import metrics import pdb from fastreid.utils import comm from fastreid.utils.compute_dist import build_dist from .evaluator import DatasetEvaluator from .query_expansion import ...
true
true
1c3610639e476b377d7c9d09ba251b29f5ac72d2
17,624
py
Python
anomalib/data/btech.py
dreaquil/anomalib
0199f05e09a67967c8512a923059ae0105f849a2
[ "Apache-2.0" ]
null
null
null
anomalib/data/btech.py
dreaquil/anomalib
0199f05e09a67967c8512a923059ae0105f849a2
[ "Apache-2.0" ]
null
null
null
anomalib/data/btech.py
dreaquil/anomalib
0199f05e09a67967c8512a923059ae0105f849a2
[ "Apache-2.0" ]
null
null
null
"""BTech Dataset. This script contains PyTorch Lightning DataModule for the BTech dataset. If the dataset is not on the file system, the script downloads and extracts the dataset and create PyTorch data objects. """ # Copyright (C) 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "Licen...
38.819383
120
0.611439
import logging import shutil import zipfile from pathlib import Path from typing import Dict, Optional, Tuple, Union from urllib.request import urlretrieve import albumentations as A import cv2 import numpy as np import pandas as pd from pandas.core.frame import DataFrame from pytorch_lightning.core.dat...
true
true
1c3610a6c697df7c0a2b230729dc2c1ecd527699
195,851
py
Python
src/azure-cli/azure/cli/command_modules/acs/decorator.py
susanshi/azure-cli
11270e8c69d227a56c6d9563ed22837b0f056fb4
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
susanshi/azure-cli
11270e8c69d227a56c6d9563ed22837b0f056fb4
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
susanshi/azure-cli
11270e8c69d227a56c6d9563ed22837b0f056fb4
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
44.806909
120
0.656979
import re import sys import time from distutils.version import StrictVersion from typing import Any, Dict, List, Tuple, TypeVar, Union from azure.cli.command_modules.acs._consts import ( ADDONS, CONST_ACC_SGX_QUOTE_HELPER_ENABLED, CONST_AZURE_POLICY_ADDON_NAME, CONST_CONFCOM_ADDON_NAME, CONST_...
true
true
1c36112f0d18742a298bc33e81409e565e8c442a
1,349
py
Python
day03/day03.py
ceedee666/aoc_2020
75d9527b325760b612d477e5a28452f7714d2377
[ "CC0-1.0" ]
1
2020-12-04T18:47:25.000Z
2020-12-04T18:47:25.000Z
day03/day03.py
ceedee666/aoc_2020
75d9527b325760b612d477e5a28452f7714d2377
[ "CC0-1.0" ]
null
null
null
day03/day03.py
ceedee666/aoc_2020
75d9527b325760b612d477e5a28452f7714d2377
[ "CC0-1.0" ]
null
null
null
from pathlib import Path from functools import reduce import typer TREE = '#' app = typer.Typer() def read_input_file(input_file_path): p = Path(input_file_path) with p.open() as f: lines = f.readlines() lines = list(map(lambda s: s.strip(), lines)) return lines def calculate_coordinate...
24.527273
86
0.635285
from pathlib import Path from functools import reduce import typer TREE = '#' app = typer.Typer() def read_input_file(input_file_path): p = Path(input_file_path) with p.open() as f: lines = f.readlines() lines = list(map(lambda s: s.strip(), lines)) return lines def calculate_coordinate...
true
true
1c361171936f9f279e9a12a188bd835a535cd35c
1,269
py
Python
goldeneye/public/forms.py
smartpigling/goldeneye
704ee16ca89cb0b8a9b7c23216689e04d9f07a92
[ "BSD-3-Clause" ]
null
null
null
goldeneye/public/forms.py
smartpigling/goldeneye
704ee16ca89cb0b8a9b7c23216689e04d9f07a92
[ "BSD-3-Clause" ]
null
null
null
goldeneye/public/forms.py
smartpigling/goldeneye
704ee16ca89cb0b8a9b7c23216689e04d9f07a92
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import FlaskForm from wtforms import PasswordField, StringField, BooleanField from wtforms.validators import DataRequired from goldeneye.user.models import User class LoginForm(FlaskForm): """Login form.""" username = StringField('Username', validat...
30.95122
77
0.647754
from flask_wtf import FlaskForm from wtforms import PasswordField, StringField, BooleanField from wtforms.validators import DataRequired from goldeneye.user.models import User class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()]) password = PasswordField('Password', va...
true
true
1c3612e6140a224079bc37f41e88762ab86e7638
444
py
Python
reference_fetcher/tools.py
Phyks/arxiv_metadata
2338906fec5bfdca6e4b6303b05a79856c2e8d37
[ "MIT" ]
2
2015-12-26T17:08:18.000Z
2016-10-04T21:35:50.000Z
reference_fetcher/tools.py
Phyks/arxiv_metadata
2338906fec5bfdca6e4b6303b05a79856c2e8d37
[ "MIT" ]
null
null
null
reference_fetcher/tools.py
Phyks/arxiv_metadata
2338906fec5bfdca6e4b6303b05a79856c2e8d37
[ "MIT" ]
null
null
null
""" This file contains various utility functions. """ def replaceAll(text, replace_dict): """ Replace all the ``replace_dict`` keys by their associated item in ``text``. """ for i, j in replace_dict.items(): text = text.replace(i, j) return text def clean_whitespaces(text): """ R...
22.2
79
0.617117
def replaceAll(text, replace_dict): for i, j in replace_dict.items(): text = text.replace(i, j) return text def clean_whitespaces(text): return ' '.join(text.strip().rstrip(".,").split())
true
true
1c36133b0966ccd18e0da9ba6b34a0be86bea39d
5,095
py
Python
cinder/tests/unit/volume/drivers/dell_emc/powerstore/test_volume_create_from_source.py
cloudification-io/cinder
23d76e01f2b4f3771b57fb287084a4884238b827
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/dell_emc/powerstore/test_volume_create_from_source.py
cloudification-io/cinder
23d76e01f2b4f3771b57fb287084a4884238b827
[ "Apache-2.0" ]
1
2020-12-22T20:40:20.000Z
2020-12-23T18:34:42.000Z
cinder/tests/unit/volume/drivers/dell_emc/powerstore/test_volume_create_from_source.py
cloudification-io/cinder
23d76e01f2b4f3771b57fb287084a4884238b827
[ "Apache-2.0" ]
1
2019-06-24T20:21:33.000Z
2019-06-24T20:21:33.000Z
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # 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 requi...
43.547009
77
0.666143
from unittest import mock from cinder import exception from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume from cinder.tests.unit.volume.drivers.dell_emc import powerstore class TestVolumeCreateFromSource(powerstore.TestPowerStoreDriver): @mock.patch("cinder.volum...
true
true
1c3613d8c60187cb67e66c9ddbb7856a216206f8
988
py
Python
cbmc_parser/gate_helper.py
fabian-hk/Secure-Two-Party-Computation
f7e10a0a5c1b0361dd700391d81cdcc75612666d
[ "BSD-2-Clause" ]
6
2019-05-21T18:40:50.000Z
2021-10-19T10:27:50.000Z
cbmc_parser/gate_helper.py
fabian-hk/Secure-Two-Party-Computation
f7e10a0a5c1b0361dd700391d81cdcc75612666d
[ "BSD-2-Clause" ]
null
null
null
cbmc_parser/gate_helper.py
fabian-hk/Secure-Two-Party-Computation
f7e10a0a5c1b0361dd700391d81cdcc75612666d
[ "BSD-2-Clause" ]
null
null
null
class GateHelper: def __init__(self, id, type, num_of_inputs, output_to, is_circuit_output, output_number_list): # self.id, together with the self.type forms a unique identifier (since Input Gates have ids 1 to size-of-input) self.id = id # types used are strings: INPUT, AND, OR, XOR, NOT, ...
41.166667
120
0.682186
class GateHelper: def __init__(self, id, type, num_of_inputs, output_to, is_circuit_output, output_number_list): self.id = id self.type = type self.num_of_inputs = num_of_inputs self.output_to = output_to self.is_circuit_output...
true
true
1c36146626076745b572e10e1350c4b4cd80b4f8
27
py
Python
wepppy/rhem/out/__init__.py
hwbeeson/wepppy
6358552df99853c75be8911e7ef943108ae6923e
[ "BSD-3-Clause" ]
null
null
null
wepppy/rhem/out/__init__.py
hwbeeson/wepppy
6358552df99853c75be8911e7ef943108ae6923e
[ "BSD-3-Clause" ]
null
null
null
wepppy/rhem/out/__init__.py
hwbeeson/wepppy
6358552df99853c75be8911e7ef943108ae6923e
[ "BSD-3-Clause" ]
null
null
null
from .full_output import *
13.5
26
0.777778
from .full_output import *
true
true
1c36149a8e107ddd2113e699cfc4dcdca607f882
137
py
Python
Lists/extend-operation.py
tverma332/python3
544c4ec9c726c37293c8da5799f50575cc50852d
[ "MIT" ]
3
2022-03-28T09:10:08.000Z
2022-03-29T10:47:56.000Z
Lists/extend-operation.py
tverma332/python3
544c4ec9c726c37293c8da5799f50575cc50852d
[ "MIT" ]
1
2022-03-27T11:52:58.000Z
2022-03-27T11:52:58.000Z
Lists/extend-operation.py
tverma332/python3
544c4ec9c726c37293c8da5799f50575cc50852d
[ "MIT" ]
null
null
null
# extend = Adding two lists together my_list=[3,2,4,"python",5.6] my_new_list=["hello",7] my_list.extend(my_new_list) print(my_list)
13.7
36
0.722628
my_list=[3,2,4,"python",5.6] my_new_list=["hello",7] my_list.extend(my_new_list) print(my_list)
true
true
1c3614e0b753d2dea0e0d735e88de2457cb4e21e
1,622
py
Python
modules/networkx/readwrite/tests/test_leda.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
12
2015-05-14T17:38:41.000Z
2021-04-25T17:28:28.000Z
modules/networkx/readwrite/tests/test_leda.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
71
2015-01-05T16:50:55.000Z
2020-09-30T19:17:47.000Z
modules/networkx/readwrite/tests/test_leda.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
14
2015-02-15T22:19:18.000Z
2020-09-30T18:54:54.000Z
#!/usr/bin/env python from nose.tools import * import networkx as nx import os,tempfile class TestLEDA(object): def test_parse_leda(self): data="""#header section \nLEDA.GRAPH \nstring\nint\n-1\n#nodes section\n5 \n|{v1}| \n|{v2}| \n|{v3}| \n|{v4}| \n|{v5}| \n\n#edges section\n7 \n1 2 0 |{4}| \n1 3 0 |{...
45.055556
253
0.461159
from nose.tools import * import networkx as nx import os,tempfile class TestLEDA(object): def test_parse_leda(self): data="""#header section \nLEDA.GRAPH \nstring\nint\n-1\n#nodes section\n5 \n|{v1}| \n|{v2}| \n|{v3}| \n|{v4}| \n|{v5}| \n\n#edges section\n7 \n1 2 0 |{4}| \n1 3 0 |{3}| \n2 3 0 |{2}| \n3...
true
true
1c361523bf22c5b536f7afc258a32ce1e011b425
317
py
Python
PyPractice/Q20.py
coedfetr/STTP-python
607d5c03e233dd7c6938ea2495a04701dcf5aed6
[ "Apache-2.0" ]
null
null
null
PyPractice/Q20.py
coedfetr/STTP-python
607d5c03e233dd7c6938ea2495a04701dcf5aed6
[ "Apache-2.0" ]
null
null
null
PyPractice/Q20.py
coedfetr/STTP-python
607d5c03e233dd7c6938ea2495a04701dcf5aed6
[ "Apache-2.0" ]
4
2015-12-24T05:34:46.000Z
2020-03-10T03:39:16.000Z
import re def char_freq_table(filepath): file = open(filepath) chars = file.read().lower().replace(" ", "").replace("\n", "") freqs = {key: 0 for key in chars} for char in chars: freqs[char] += 1 for word in freqs: print "%s: %s" % (word, freqs[word]) char_freq_table('Q20.txt')
24.384615
66
0.580442
import re def char_freq_table(filepath): file = open(filepath) chars = file.read().lower().replace(" ", "").replace("\n", "") freqs = {key: 0 for key in chars} for char in chars: freqs[char] += 1 for word in freqs: print "%s: %s" % (word, freqs[word]) char_freq_table('Q20.txt')
false
true
1c3615627142e743da18e285932d7e2758d44ec6
400
py
Python
docs/server.py
rohanbari/2048.wasm
9e9bd6a2a47e16f51a7f0aef641079d4307b6491
[ "MIT" ]
3
2017-04-17T19:00:38.000Z
2017-04-18T02:24:28.000Z
docs/server.py
rohanbari/2048.wasm
9e9bd6a2a47e16f51a7f0aef641079d4307b6491
[ "MIT" ]
6
2017-03-19T20:48:36.000Z
2020-08-31T22:22:45.000Z
docs/server.py
rohanbari/2048.wasm
9e9bd6a2a47e16f51a7f0aef641079d4307b6491
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler Handler.extensions_map.update({ '.wasm': 'application/wasm', }) socketserver.TCPServer.allow_reuse_address = True with socketserver.TCPServer(("", PORT), Handler) as httpd: httpd.allow_re...
22.222222
58
0.75
import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler Handler.extensions_map.update({ '.wasm': 'application/wasm', }) socketserver.TCPServer.allow_reuse_address = True with socketserver.TCPServer(("", PORT), Handler) as httpd: httpd.allow_reuse_address = True ...
true
true
1c3616143c9e4a5ae1644977cd66a796e97fd758
1,070
py
Python
app/bin/dltk/core/deployment/status.py
splunk/deep-learning-toolkit
84f9c978d9859a96f6ba566737a5c7102738d13c
[ "Apache-2.0" ]
11
2020-10-13T05:27:59.000Z
2021-09-23T02:56:32.000Z
app/bin/dltk/core/deployment/status.py
splunk/deep-learning-toolkit
84f9c978d9859a96f6ba566737a5c7102738d13c
[ "Apache-2.0" ]
48
2020-10-15T09:53:36.000Z
2021-07-05T15:33:24.000Z
app/bin/dltk/core/deployment/status.py
splunk/deep-learning-toolkit
84f9c978d9859a96f6ba566737a5c7102738d13c
[ "Apache-2.0" ]
4
2020-12-04T08:51:35.000Z
2022-03-27T09:42:20.000Z
STATUS_DEPLOYING = "deploying" STATUS_DEPLOYED = "deployed" STATUS_UNDEPLOYING = "undeploying" STATUS_DISABLING = "disabling" STATUS_DISABLED = "disabled" STATUS_ERROR = "error" class DeploymentStatus(Exception): status = None message = None def __init__(self, status, message=""): self.status = ...
22.765957
53
0.720561
STATUS_DEPLOYING = "deploying" STATUS_DEPLOYED = "deployed" STATUS_UNDEPLOYING = "undeploying" STATUS_DISABLING = "disabling" STATUS_DISABLED = "disabled" STATUS_ERROR = "error" class DeploymentStatus(Exception): status = None message = None def __init__(self, status, message=""): self.status = ...
true
true
1c36165dd976d6ca6db8448b1b180bc4cc6dca99
689
py
Python
numpy_nn/optimizers/RMSProp.py
rahuldshetty/numpy_nn
0d61b7fc47cecfd9701972de322c08ed799271b4
[ "MIT" ]
null
null
null
numpy_nn/optimizers/RMSProp.py
rahuldshetty/numpy_nn
0d61b7fc47cecfd9701972de322c08ed799271b4
[ "MIT" ]
5
2020-06-09T03:24:46.000Z
2020-06-30T07:06:01.000Z
numpy_nn/optimizers/RMSProp.py
rahuldshetty/numpy_nn
0d61b7fc47cecfd9701972de322c08ed799271b4
[ "MIT" ]
null
null
null
import numpy as np class RMSProp(): def __init__(self, lr = 0.09, beta = 0.85, epsilon=0.0005): self.lr= lr self.beta = beta self.epsilon = epsilon def set_parameters(self, params): self.parmeters = params run_values = {} for key in params.keys(): r...
28.708333
73
0.587808
import numpy as np class RMSProp(): def __init__(self, lr = 0.09, beta = 0.85, epsilon=0.0005): self.lr= lr self.beta = beta self.epsilon = epsilon def set_parameters(self, params): self.parmeters = params run_values = {} for key in params.keys(): r...
true
true