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
f77306f5517e145e7bcdd04e2dfe81a235b57f09
7,091
py
Python
cogs/control_panel.py
YouGotSchott/tcs-discord-bot
696db5da129ef42f4c5047679d289aeb6ed122a9
[ "MIT" ]
1
2021-04-30T06:38:31.000Z
2021-04-30T06:38:31.000Z
cogs/control_panel.py
YouGotSchott/tcs-discord-bot
696db5da129ef42f4c5047679d289aeb6ed122a9
[ "MIT" ]
null
null
null
cogs/control_panel.py
YouGotSchott/tcs-discord-bot
696db5da129ef42f4c5047679d289aeb6ed122a9
[ "MIT" ]
1
2019-04-28T03:33:35.000Z
2019-04-28T03:33:35.000Z
import discord from discord.ext import commands from pathlib import Path from collections import OrderedDict import json class ControlPanel(commands.Cog): def __init__(self, bot): self.bot = bot self.panel = str(Path('cogs/data/panel.json')) @commands.Cog.listener() async def on_ready(sel...
41.226744
136
0.538993
import discord from discord.ext import commands from pathlib import Path from collections import OrderedDict import json class ControlPanel(commands.Cog): def __init__(self, bot): self.bot = bot self.panel = str(Path('cogs/data/panel.json')) @commands.Cog.listener() async def on_ready(sel...
true
true
f7730701366af7ad4779753ba808a1ef8c1aba25
2,951
py
Python
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/reader/style.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/reader/style.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
80
2018-04-13T13:46:24.000Z
2022-02-16T16:01:46.000Z
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/reader/style.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
6
2018-06-06T19:55:32.000Z
2021-09-30T15:16:40.000Z
# file openpyxl/reader/style.py # Copyright (c) 2010 openpyxl # # 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 # to use, copy, m...
42.157143
79
0.716706
from ..shared.xmltools import fromstring, QName from ..shared.exc import MissingNumberFormat from ..style import Style, NumberFormat def read_style_table(xml_source): table = {} xmlns = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main' root = fromstring(xml_source) custom_num_formats = pa...
true
true
f773078f66043ae0ec3d7acfd0665c194d62c97e
1,831
py
Python
profit/dataset/splitters/base_splitter.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
null
null
null
profit/dataset/splitters/base_splitter.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
1
2021-09-15T13:13:12.000Z
2021-09-15T13:13:12.000Z
profit/dataset/splitters/base_splitter.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Any, Dict, Tuple import numpy as np class BaseSplitter(ABC): """Base class for performing splits.""" @abstractmethod def _split(self, dataset: np.ndarray, frac_train: float = 0.75, frac_valid: float = 0.1...
37.367347
83
0.476242
from abc import ABC, abstractmethod from typing import Any, Dict, Tuple import numpy as np class BaseSplitter(ABC): @abstractmethod def _split(self, dataset: np.ndarray, frac_train: float = 0.75, frac_valid: float = 0.15, frac_test: float = 0.15, ...
true
true
f77307db44d8bdd02335d479fad2d0984edd7283
1,306
py
Python
salina/__init__.py
bpiwowar/salina
f1ba5fb806e183e9b91129e22b9ca9e9f0e501a5
[ "MIT" ]
230
2021-10-18T07:39:32.000Z
2022-03-28T05:27:48.000Z
salina/__init__.py
bpiwowar/salina
f1ba5fb806e183e9b91129e22b9ca9e9f0e501a5
[ "MIT" ]
12
2021-10-21T06:19:15.000Z
2022-02-17T21:24:14.000Z
salina/__init__.py
bpiwowar/salina
f1ba5fb806e183e9b91129e22b9ca9e9f0e501a5
[ "MIT" ]
25
2021-10-19T04:10:40.000Z
2022-03-22T11:13:30.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 os from .agent import Agent, TAgent from .workspace import Workspace trace_workspace = False trace = [] trace_maximum_size = 1000...
24.185185
65
0.679173
import os from .agent import Agent, TAgent from .workspace import Workspace trace_workspace = False trace = [] trace_maximum_size = 10000 def instantiate_class(arguments): from importlib import import_module d = dict(arguments) classname = d["classname"] del d["classname"] module_path, class_n...
true
true
f77307f0cdede8a1e18412bb4b84a95a1403984b
28,127
py
Python
nltk/tag/sequential.py
wangz10/nltk
171b2cd0061955de0794db4fae5381e47bf450ae
[ "Apache-2.0" ]
1
2018-08-09T14:30:50.000Z
2018-08-09T14:30:50.000Z
nltk/tag/sequential.py
wangz10/nltk
171b2cd0061955de0794db4fae5381e47bf450ae
[ "Apache-2.0" ]
null
null
null
nltk/tag/sequential.py
wangz10/nltk
171b2cd0061955de0794db4fae5381e47bf450ae
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Sequential Backoff Taggers # # Copyright (C) 2001-2014 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> (minor additions) # Tiago Tresoldi <tresoldi@users.sf.net> (original affix tagger) # URL: <http://nltk.org/> # For license info...
37.754362
108
0.620365
from __future__ import print_function, unicode_literals import re from nltk.probability import FreqDist, ConditionalFreqDist from nltk.classify.naivebayes import NaiveBayesClassifier from nltk.compat import python_2_unicode_compatible from nltk.tag.api import TaggerI, FeaturesetTaggerI from nltk import jsontags c...
true
true
f77308984fe78bedc1370e50e8938867172aaafd
24,648
py
Python
summit/benchmarks/experiment_emulator/bnn_emulator.py
jezsadler/summit
982de7f6424bb94da2084d4d84396b4b2673eeca
[ "MIT" ]
null
null
null
summit/benchmarks/experiment_emulator/bnn_emulator.py
jezsadler/summit
982de7f6424bb94da2084d4d84396b4b2673eeca
[ "MIT" ]
null
null
null
summit/benchmarks/experiment_emulator/bnn_emulator.py
jezsadler/summit
982de7f6424bb94da2084d4d84396b4b2673eeca
[ "MIT" ]
null
null
null
import os import os.path as osp import numpy as np from summit.benchmarks.experiment_emulator.emulator import Emulator import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from blitz.modules import BayesianLinear from blitz.utils import variational_estimator from sklearn.m...
42.569948
152
0.493914
import os import os.path as osp import numpy as np from summit.benchmarks.experiment_emulator.emulator import Emulator import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from blitz.modules import BayesianLinear from blitz.utils import variational_estimator from sklearn.m...
true
true
f7730901a9d941c33614bbbaa4df1912247efe9e
48
py
Python
mooquant_formula/formula/__init__.py
bopo/mooquant_formula
8a7b5030f5bc53fe35850a8d0825f34e7d9d8660
[ "MIT" ]
null
null
null
mooquant_formula/formula/__init__.py
bopo/mooquant_formula
8a7b5030f5bc53fe35850a8d0825f34e7d9d8660
[ "MIT" ]
1
2021-03-25T21:47:29.000Z
2021-03-25T21:47:29.000Z
mooquant_formula/formula/__init__.py
bopo/mooquant_formula
8a7b5030f5bc53fe35850a8d0825f34e7d9d8660
[ "MIT" ]
null
null
null
from .standard import * # from .extend import *
16
23
0.708333
from .standard import *
true
true
f7730af4b12b6e1e75c4b465a48ffb5ebbf5740f
10,723
py
Python
tests/test_api.py
mendoncadev/merge-
c3000bae4df4aa2ae8a63903592fbf8bab3efed5
[ "MIT" ]
1
2019-06-13T17:41:28.000Z
2019-06-13T17:41:28.000Z
tests/test_api.py
mendoncadev/merge-
c3000bae4df4aa2ae8a63903592fbf8bab3efed5
[ "MIT" ]
5
2019-08-13T23:00:25.000Z
2022-03-08T21:09:42.000Z
tests/test_api.py
mendoncadev/merge-it
c3000bae4df4aa2ae8a63903592fbf8bab3efed5
[ "MIT" ]
null
null
null
import unittest import json import re from base64 import b64encode from flask import url_for from app import create_app, db from app.models import User, Role, Post, Comment class APITestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_conte...
40.161049
77
0.596195
import unittest import json import re from base64 import b64encode from flask import url_for from app import create_app, db from app.models import User, Role, Post, Comment class APITestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_conte...
true
true
f7730c891a4dc370c72e7301103bc378480c7597
4,402
py
Python
examples/quantize/quantized_fuzzer.py
johnnytheboii/TensorFuzz_2.0
d1d7ae7de26067c2a1c223dbef6d897752aa8f71
[ "Apache-2.0" ]
null
null
null
examples/quantize/quantized_fuzzer.py
johnnytheboii/TensorFuzz_2.0
d1d7ae7de26067c2a1c223dbef6d897752aa8f71
[ "Apache-2.0" ]
null
null
null
examples/quantize/quantized_fuzzer.py
johnnytheboii/TensorFuzz_2.0
d1d7ae7de26067c2a1c223dbef6d897752aa8f71
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
32.850746
79
0.731031
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from lib import fuzz_utils from lib.corpus import InputCorpus from lib.corpus import seed_corpus_from_numpy_arrays from lib.coverage_functions import raw_logit_cove...
true
true
f7730cdb5d19a2e3e1482208ccab72ad0bb4e872
14,758
py
Python
inference/priors.py
C-bowman/inference-tools
499c3c23f1b3817b4cabde21ba45f2e2c6b95f77
[ "MIT" ]
12
2019-07-05T07:46:35.000Z
2022-02-08T12:23:06.000Z
inference/priors.py
C-bowman/inference-tools
499c3c23f1b3817b4cabde21ba45f2e2c6b95f77
[ "MIT" ]
6
2020-01-22T15:54:59.000Z
2021-11-05T11:02:51.000Z
inference/priors.py
C-bowman/inference-tools
499c3c23f1b3817b4cabde21ba45f2e2c6b95f77
[ "MIT" ]
2
2020-03-17T15:17:39.000Z
2022-02-10T15:31:51.000Z
""" .. moduleauthor:: Chris Bowman <chris.bowman.physics@gmail.com> """ from typing import Union, Iterable from numpy import array, log, pi, zeros, concatenate, float64, where from numpy.random import normal, exponential, uniform from itertools import chain class JointPrior(object): """ A class which combine...
34.481308
97
0.603469
from typing import Union, Iterable from numpy import array, log, pi, zeros, concatenate, float64, where from numpy.random import normal, exponential, uniform from itertools import chain class JointPrior(object): def __init__(self, components, n_variables): if not all(isinstance(c, BasePrior) for c in co...
true
true
f7730d43fb4eb5d0eedd7cbf560686d8afde5ef0
1,172
py
Python
fmcapi/api_objects/object_services/certenrollments.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
null
null
null
fmcapi/api_objects/object_services/certenrollments.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
null
null
null
fmcapi/api_objects/object_services/certenrollments.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
null
null
null
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate import logging import warnings class CertEnrollments(APIClassTemplate): """ The CertEnrollments Object in the FMC. """ VALID_JSON_DATA = ["id", "name", "type"] VALID_FOR_KWARGS = VALID_JSON_DATA + [] URL_SUFFIX = "/object/certen...
27.904762
82
0.658703
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate import logging import warnings class CertEnrollments(APIClassTemplate): VALID_JSON_DATA = ["id", "name", "type"] VALID_FOR_KWARGS = VALID_JSON_DATA + [] URL_SUFFIX = "/object/certenrollments" def __init__(self, fmc, **kwargs): ...
true
true
f7730d62a0b8c46171661afec04cfd809aaca83f
1,636
py
Python
main.py
TheRealDarkCoder/ZoomBot
5e3e5bdb738273e9df0cd646fa8aa7ba883d3deb
[ "Unlicense" ]
null
null
null
main.py
TheRealDarkCoder/ZoomBot
5e3e5bdb738273e9df0cd646fa8aa7ba883d3deb
[ "Unlicense" ]
null
null
null
main.py
TheRealDarkCoder/ZoomBot
5e3e5bdb738273e9df0cd646fa8aa7ba883d3deb
[ "Unlicense" ]
null
null
null
import time import pyautogui import pygetwindow as gw import sys from datetime import datetime info = open('timing.txt', 'r') Lines = info.readlines() count = 0 # Strips the newline character data = [] for line in Lines: print(line) ldata = line.split(',') data = ldata print(data) ...
23.042254
57
0.586797
import time import pyautogui import pygetwindow as gw import sys from datetime import datetime info = open('timing.txt', 'r') Lines = info.readlines() count = 0 data = [] for line in Lines: print(line) ldata = line.split(',') data = ldata print(data) meeting_id = data[1] meeting_...
true
true
f7730d81401b0e30ed20aa225d3d29753987ccea
5,147
py
Python
research/object_detection/dataset_tools/create_oid_tf_record.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
null
null
null
research/object_detection/dataset_tools/create_oid_tf_record.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
null
null
null
research/object_detection/dataset_tools/create_oid_tf_record.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
1
2021-07-13T01:22:08.000Z
2021-07-13T01:22:08.000Z
# Copyright 2017 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...
43.618644
80
0.746454
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import contextlib2 import pandas as pd import tensorflow as tf from dataset_tools import oid_tfrecord_creation from dataset_tools import tf_record_creation_util from utils import label_map_util tf....
true
true
f773107956af95d679d0edda2e2b184be88938fa
776
py
Python
metaopt/core/arg/bool.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
8
2015-02-02T21:42:23.000Z
2019-06-30T18:12:43.000Z
metaopt/core/arg/bool.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
4
2015-09-24T14:12:38.000Z
2021-12-08T22:42:52.000Z
metaopt/core/arg/bool.py
cigroup-ol/metaopt
6dfd5105d3c6eaf00f96670175cae16021069514
[ "BSD-3-Clause" ]
6
2015-02-27T12:35:33.000Z
2020-10-15T21:04:02.000Z
# Future from __future__ import absolute_import, division, print_function, \ unicode_literals, with_statement # Standard Library import random # First Party from metaopt.core.arg.arg import Arg class BoolArg(Arg): def __init__(self, param, value=None): super(BoolArg, self).__init__(param=param, valu...
25.032258
70
0.673969
from __future__ import absolute_import, division, print_function, \ unicode_literals, with_statement import random from metaopt.core.arg.arg import Arg class BoolArg(Arg): def __init__(self, param, value=None): super(BoolArg, self).__init__(param=param, value=value) def random(self): re...
true
true
f77310fe68bcd693721377689d53eb59611d55e4
448
py
Python
example/blog/models.py
zmrenwu/django-mptt-comments
14c9b949d93a43c36357660282033f391195f629
[ "MIT" ]
32
2018-11-06T04:10:19.000Z
2020-08-26T02:34:48.000Z
example/blog/models.py
alice314272/django-mptt-comments
14c9b949d93a43c36357660282033f391195f629
[ "MIT" ]
2
2019-05-16T08:16:51.000Z
2020-05-14T14:43:07.000Z
example/blog/models.py
alice314272/django-mptt-comments
14c9b949d93a43c36357660282033f391195f629
[ "MIT" ]
7
2018-11-06T04:15:04.000Z
2020-09-09T10:26:58.000Z
from django.db import models from django.utils import timezone from django.urls import reverse class Post(models.Model): title = models.CharField(max_length=100) body = models.TextField() created = models.DateTimeField(default=timezone.now) class Meta: ordering = ['created'] def __str__(...
23.578947
61
0.689732
from django.db import models from django.utils import timezone from django.urls import reverse class Post(models.Model): title = models.CharField(max_length=100) body = models.TextField() created = models.DateTimeField(default=timezone.now) class Meta: ordering = ['created'] def __str__(...
true
true
f7731141cb77337d592fd5409d084bdf6f28057c
7,961
py
Python
eva-accession-clustering-automation/clustering_automation/cluster_from_mongo.py
apriltuesday/eva-accession
295ae3b99fee679b486b4a1433d46c0fd5811024
[ "Apache-2.0" ]
null
null
null
eva-accession-clustering-automation/clustering_automation/cluster_from_mongo.py
apriltuesday/eva-accession
295ae3b99fee679b486b4a1433d46c0fd5811024
[ "Apache-2.0" ]
null
null
null
eva-accession-clustering-automation/clustering_automation/cluster_from_mongo.py
apriltuesday/eva-accession
295ae3b99fee679b486b4a1433d46c0fd5811024
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 EMBL - European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
55.284722
174
0.704937
import os import argparse import sys import logging import datetime import yaml from ebi_eva_common_pyutils.metadata_utils import get_metadata_connection_handle from ebi_eva_common_pyutils.nextflow import LinearNextFlowPipeline, NextFlowProcess from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query fr...
true
true
f77311772c635629176172cc178a279af64abb79
2,338
py
Python
manage.py
AKMFCJ/flask-example
91abb959232688010e3a29536c047538f5b64040
[ "Apache-2.0" ]
null
null
null
manage.py
AKMFCJ/flask-example
91abb959232688010e3a29536c047538f5b64040
[ "Apache-2.0" ]
null
null
null
manage.py
AKMFCJ/flask-example
91abb959232688010e3a29536c047538f5b64040
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by AKM_FAN@163.com on 2017/11/6 """ 工程引导文件 开发运行 数据库创建更新 工程自定义命令 """ import os import unittest # 代码覆盖率测量库 import coverage # 自定义命令库 from flask_script import Manager # 数据库表结构迁移库(将model修改同步修改数据库表结构) from flask_migrate import Migrate, MigrateCommand COV = coverage.c...
20.690265
123
0.666809
import os import unittest import coverage from flask_script import Manager from flask_migrate import Migrate, MigrateCommand COV = coverage.coverage( branch=True, include='app/*', omit=[ 'app/tests/*', 'app/config.py', 'app/*/__init__.py' ] ) COV.start() from app import app,...
true
true
f77312714bc9bf94e5af9086cfd10c58a6e9fe1a
14,476
py
Python
BParkingNano/test/run_nano_cfg.py
gmelachr/BParkingNANO
3cfd48eede0df5783ba437f0ef3d624e13b9a0a9
[ "Apache-2.0" ]
null
null
null
BParkingNano/test/run_nano_cfg.py
gmelachr/BParkingNANO
3cfd48eede0df5783ba437f0ef3d624e13b9a0a9
[ "Apache-2.0" ]
null
null
null
BParkingNano/test/run_nano_cfg.py
gmelachr/BParkingNANO
3cfd48eede0df5783ba437f0ef3d624e13b9a0a9
[ "Apache-2.0" ]
null
null
null
from FWCore.ParameterSet.VarParsing import VarParsing import FWCore.ParameterSet.Config as cms options = VarParsing('python') options.register('isMC', False, VarParsing.multiplicity.singleton, VarParsing.varType.bool, "Run this on real data" ) options.register('globalTag', 'NOTSET', VarParsing.multipl...
48.577181
158
0.721954
from FWCore.ParameterSet.VarParsing import VarParsing import FWCore.ParameterSet.Config as cms options = VarParsing('python') options.register('isMC', False, VarParsing.multiplicity.singleton, VarParsing.varType.bool, "Run this on real data" ) options.register('globalTag', 'NOTSET', VarParsing.multipl...
true
true
f7731372231c7e073477520e67fcda85c55e4d30
350
py
Python
Uwallet/tests/test_demo.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
28
2018-04-27T08:02:18.000Z
2020-01-14T05:08:34.000Z
Uwallet/tests/test_demo.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
2
2018-05-16T08:29:20.000Z
2018-06-17T04:51:08.000Z
Uwallet/tests/test_demo.py
monotone/Ulord-platform
8ec19bbb8845db8f22df925d33b118b22dab0d0b
[ "MIT" ]
4
2018-05-14T11:43:31.000Z
2018-09-29T09:58:58.000Z
import unittest class TestClassBase(unittest.TestCase): """Test Data""" def setUp(self): pass class TestClassName(TestClassBase): """Test block hash""" def test_func_name(self): result = "" expected = "-0.00001234" self.assertEqual(expected, result) if __name__ == '_...
18.421053
42
0.625714
import unittest class TestClassBase(unittest.TestCase): def setUp(self): pass class TestClassName(TestClassBase): def test_func_name(self): result = "" expected = "-0.00001234" self.assertEqual(expected, result) if __name__ == '__main__': unittest.main()
true
true
f77314e55e2b69993fb81b9855994df00bcfcebd
3,436
py
Python
reporting/gitutil.py
97littleleaf11/mypyc-benchmarks
30661c7ffc30d6c1c4fc4e45e581e5aec4a5361c
[ "MIT" ]
13
2020-05-03T11:18:41.000Z
2021-11-22T06:42:57.000Z
reporting/gitutil.py
97littleleaf11/mypyc-benchmarks
30661c7ffc30d6c1c4fc4e45e581e5aec4a5361c
[ "MIT" ]
23
2020-05-03T11:18:35.000Z
2021-09-03T12:55:21.000Z
reporting/gitutil.py
97littleleaf11/mypyc-benchmarks
30661c7ffc30d6c1c4fc4e45e581e5aec4a5361c
[ "MIT" ]
5
2021-06-12T01:25:57.000Z
2022-03-17T17:50:46.000Z
from typing import List, Dict, Tuple import subprocess from datetime import datetime from reporting.common import split_datetime # Generic utils def checkout_commit(repo_dir: str, commit: str) -> None: subprocess.check_call(['git', 'checkout', commit], cwd=repo_dir) def get_commit_range(repo_dir: str, start_...
32.72381
92
0.678696
from typing import List, Dict, Tuple import subprocess from datetime import datetime from reporting.common import split_datetime def checkout_commit(repo_dir: str, commit: str) -> None: subprocess.check_call(['git', 'checkout', commit], cwd=repo_dir) def get_commit_range(repo_dir: str, start_commit: str, end...
true
true
f77314fbe22d43d85cb8b7466699bdd1c9f6041f
84,155
py
Python
API/src/main/resources/Lib/xlwt/antlr.py
qxo/SikuliX1
91c9513c89b75515c20416a68cb304783816c8bf
[ "MIT" ]
292
2015-09-12T14:19:32.000Z
2022-02-19T08:46:12.000Z
API/src/main/resources/Lib/xlwt/antlr.py
qxo/SikuliX1
91c9513c89b75515c20416a68cb304783816c8bf
[ "MIT" ]
55
2021-03-10T01:16:34.000Z
2022-03-14T01:27:43.000Z
API/src/main/resources/Lib/xlwt/antlr.py
qxo/SikuliX1
91c9513c89b75515c20416a68cb304783816c8bf
[ "MIT" ]
131
2015-09-14T06:32:03.000Z
2021-06-11T02:31:38.000Z
## This file is part of PyANTLR. See LICENSE.txt for license ## details..........Copyright (C) Wolfgang Haefelinger, 2004. ## This file was copied for use with xlwt from the 2.7.7 ANTLR distribution. Yes, it ## says 2.7.5 below. The 2.7.5 distribution version didn't have a ## version in it. ## Here is the contents of...
29.271304
108
0.569948
## version in it. ## Here is the contents of the ANTLR 2.7.7 LICENSE.txt referred to above. # SOFTWARE RIGHTS # # ANTLR 1989-2006 Developed by Terence Parr # Partially supported by University of San Francisco & jGuru.com # # We reserve no legal rights to the ANTLR--it is fully in the # public domain. An individual o...
false
true
f773155e0c5eccaf647c4c837def24b5b997bae9
1,985
py
Python
home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/_util.py
qwertzy-antonio-godinho/dots
65cd657f785e7da3a3ccb1a808c0fc1b8496e5b1
[ "Apache-2.0" ]
6
2021-12-26T13:34:32.000Z
2022-02-08T22:09:38.000Z
home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/_util.py
qwertzy-antonio-godinho/dots
65cd657f785e7da3a3ccb1a808c0fc1b8496e5b1
[ "Apache-2.0" ]
8
2020-07-19T23:39:31.000Z
2022-02-27T01:38:46.000Z
vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/debugpy/wheels/debugpy/_vendored/_util.py
Adespinoza/dotfiles
e2509402a7fd2623a3ea401b6f9fcbf6a372fc60
[ "CC0-1.0" ]
3
2020-08-04T02:48:32.000Z
2020-08-17T01:20:09.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals import contextlib import os @contextlib.contextmanager def cwd(dirnam...
32.016129
83
0.638791
from __future__ import absolute_import, division, print_function, unicode_literals import contextlib import os @contextlib.contextmanager def cwd(dirname): orig = os.getcwd() os.chdir(dirname) try: yield orig finally: os.chdir(orig) def iter_all_files(root, prune_d...
true
true
f77316157c4dae6469cd783acec1963ff9c62c84
78,331
py
Python
Main_Application_Target/InventoryEXDI_SMLV_GUI.py
CodexLink/InventoryEditor-Data_List_Simplier_AEMB
e14848a1ad9fc5111a17f6d1ae629866274b3b69
[ "Apache-2.0" ]
1
2021-04-02T23:27:59.000Z
2021-04-02T23:27:59.000Z
Main_Application_Target/InventoryEXDI_SMLV_GUI.py
CodexLink/InventoryEditor-Data_List_Simplier_AEMB
e14848a1ad9fc5111a17f6d1ae629866274b3b69
[ "Apache-2.0" ]
2
2019-11-14T02:28:38.000Z
2020-01-06T14:51:01.000Z
Main_Application_Target/InventoryEXDI_SMLV_GUI.py
CodexLink/InventoryEditor-Data_List_Simplier_AEMB
e14848a1ad9fc5111a17f6d1ae629866274b3b69
[ "Apache-2.0" ]
null
null
null
''' Project Name: InventoryEXT_SMV_GUI - Inventory To Simplified Model View, Code Material Design Proper Name: Excel Data Inventory To Simplified Model ListView Version: unknown.beta Authors: Janrey Tuazon Licas - App Design (Semi) Sam Matienzo (Database Worker) GUI Library Used: Kivy Base Theme: KivyMD (Ma...
70.887783
575
0.646641
from kivy.app import App from kivy.lang import Builder from kivy.metrics import dp from kivy.core.window import Window from kivy.uix.image import Image from kivy.uix.widget import Widget from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition from kivy.config import Config from kivy.logger import Logge...
true
true
f77317b16a9b09c673ef91454a93bf99134e7431
3,643
py
Python
cspaceapps/filetransfer/fileclient.py
jmcvetta/cspace
13d6be86dfa3417ac5511b1b2c15d1050fe3701d
[ "RSA-MD", "TCP-wrappers" ]
28
2015-04-24T12:04:08.000Z
2022-01-07T15:13:10.000Z
cspaceapps/filetransfer/fileclient.py
Magnus167/cspace
13d6be86dfa3417ac5511b1b2c15d1050fe3701d
[ "RSA-MD", "TCP-wrappers" ]
1
2015-12-09T10:21:59.000Z
2015-12-16T05:38:55.000Z
cspaceapps/filetransfer/fileclient.py
Magnus167/cspace
13d6be86dfa3417ac5511b1b2c15d1050fe3701d
[ "RSA-MD", "TCP-wrappers" ]
18
2015-01-01T02:16:49.000Z
2021-08-12T04:14:57.000Z
from nitro.async import AsyncOp from cspace.util.rpc import RPCConnection, RPCStub from cspaceapps.filetransfer.fileproto import validateResponse, ProtocolError class FileClient( object ) : def __init__( self, rpcConn, objectName='FileServer' ) : self.stub = RPCStub( rpcConn, objectName ) def ...
35.715686
86
0.553665
from nitro.async import AsyncOp from cspace.util.rpc import RPCConnection, RPCStub from cspaceapps.filetransfer.fileproto import validateResponse, ProtocolError class FileClient( object ) : def __init__( self, rpcConn, objectName='FileServer' ) : self.stub = RPCStub( rpcConn, objectName ) def ...
false
true
f77318a501c31cc043cc55a4b59854b1f92ea2c4
2,471
py
Python
jsb/lib/eventhandler.py
NURDspace/jsonbot
400dce602700a93db80e10707c3785a0fbdfaaeb
[ "MIT" ]
1
2019-04-12T12:20:12.000Z
2019-04-12T12:20:12.000Z
jsb/lib/eventhandler.py
Petraea/jsonbot
04a3a0c586a8a1a3b0e5316d10cda16df9be415b
[ "MIT" ]
null
null
null
jsb/lib/eventhandler.py
Petraea/jsonbot
04a3a0c586a8a1a3b0e5316d10cda16df9be415b
[ "MIT" ]
1
2020-05-06T18:46:53.000Z
2020-05-06T18:46:53.000Z
# jsb/eventhandler.py # # """ event handler. use to dispatch function in main loop. """ ## jsb imports from jsb.utils.exception import handle_exception from jsb.utils.locking import lockdec from threads import start_new_thread ## basic imports import Queue import thread import logging import time ## locks handle...
25.214286
77
0.577904
""" event handler. use to dispatch function in main loop. """ from jsb.utils.exception import handle_exception from jsb.utils.locking import lockdec from threads import start_new_thread import Queue import thread import logging import time handlerlock = thread.allocate_lock() locked = lockdec(handlerlock) clas...
false
true
f773199cdb83e558b03afa570a8a4621c60983c4
1,114
py
Python
ice/debug.py
reavessm/Ice
e78d046abfd6006b1a81d1cbdb516b7c3e141ac9
[ "MIT" ]
578
2015-01-02T12:43:52.000Z
2022-03-27T23:45:32.000Z
ice/debug.py
raphaelcastaneda/Ice
b380de7fc7830251b883fb55c46fea894058afa3
[ "MIT" ]
271
2015-01-05T01:56:38.000Z
2021-08-14T02:51:24.000Z
ice/debug.py
raphaelcastaneda/Ice
b380de7fc7830251b883fb55c46fea894058afa3
[ "MIT" ]
156
2015-01-07T15:43:20.000Z
2021-12-11T19:10:44.000Z
# encoding: utf-8 import os import pastebin import filesystem import paths import settings def debug_log_contents(): fs = filesystem.RealFilesystem() return "\n".join([ debug_string_for_file(settings.settings_file_path('config.txt', fs)), debug_string_for_file(settings.settings_file_path('consoles.txt',...
23.702128
76
0.707361
import os import pastebin import filesystem import paths import settings def debug_log_contents(): fs = filesystem.RealFilesystem() return "\n".join([ debug_string_for_file(settings.settings_file_path('config.txt', fs)), debug_string_for_file(settings.settings_file_path('consoles.txt', fs)), debug_s...
false
true
f7731ae37243340d4ebb9a0414ce7c66a3058096
1,930
py
Python
customized_tests/test_8.py
peanut-butter-jellyyy/cool-compiler-2021
63a668d435ed22cfb8dbb096bc3c82a34f09517b
[ "MIT" ]
null
null
null
customized_tests/test_8.py
peanut-butter-jellyyy/cool-compiler-2021
63a668d435ed22cfb8dbb096bc3c82a34f09517b
[ "MIT" ]
null
null
null
customized_tests/test_8.py
peanut-butter-jellyyy/cool-compiler-2021
63a668d435ed22cfb8dbb096bc3c82a34f09517b
[ "MIT" ]
null
null
null
from run_pipeline import run_pipeline from src.type_collector import TypeCollector from src.type_builder import TypeBuilder from src.type_checker import TypeChecker from src.tset_builder import TSetBuilder from src.tsets_reducer import TSetReducer from src.tset_merger import TSetMerger from src.cool_visitor import Form...
22.183908
108
0.66114
from run_pipeline import run_pipeline from src.type_collector import TypeCollector from src.type_builder import TypeBuilder from src.type_checker import TypeChecker from src.tset_builder import TSetBuilder from src.tsets_reducer import TSetReducer from src.tset_merger import TSetMerger from src.cool_visitor import Form...
true
true
f7731aeac12d0a603ede0c9b59f448b30814701d
766
py
Python
app_api/models.py
AngusChiang/MrDoc
a4f3f2eb60f1a49ceb9f63fbb95c217e7ba6b1b0
[ "MIT" ]
2
2020-04-23T01:09:58.000Z
2020-04-23T08:15:14.000Z
app_api/models.py
kisskillkiss/MrDoc
402993c9aa766db5490da40a90505e562e85fa71
[ "MIT" ]
2
2022-01-13T03:59:11.000Z
2022-02-10T12:22:37.000Z
app_api/models.py
kisskillkiss/MrDoc
402993c9aa766db5490da40a90505e562e85fa71
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Token模型 - 用于浏览器扩展 class UserToken(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) token = models.CharField(verbose_name="token值",max_length=250,unique=True) def __str__(self): return self.user ...
29.461538
80
0.71671
from django.db import models from django.contrib.auth.models import User class UserToken(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) token = models.CharField(verbose_name="token值",max_length=250,unique=True) def __str__(self): return self.user class Meta: ...
true
true
f7731bb3f7727e1e7efc3c368583275f3ddabd0f
15,186
bzl
Python
tests/unit/coursier_test.bzl
ljessendk/rules_jvm_external
9b7e4c0af92144e637ca2e81492c267cc68605c2
[ "Apache-2.0" ]
231
2019-03-11T19:17:14.000Z
2022-03-30T04:10:18.000Z
tests/unit/coursier_test.bzl
ljessendk/rules_jvm_external
9b7e4c0af92144e637ca2e81492c267cc68605c2
[ "Apache-2.0" ]
445
2019-03-11T19:05:32.000Z
2022-03-24T13:32:34.000Z
tests/unit/coursier_test.bzl
ljessendk/rules_jvm_external
9b7e4c0af92144e637ca2e81492c267cc68605c2
[ "Apache-2.0" ]
144
2019-03-12T17:30:33.000Z
2022-03-30T21:50:45.000Z
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") load( "//:coursier.bzl", "add_netrc_entries_from_mirror_urls", "compute_dependency_inputs_signature", "extract_netrc_from_auth_url", "get_coursier_cache_or_default", "get_netrc_lines_from_entries", "remove_auth_from_url", "sp...
30.190855
164
0.649677
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") load( "//:coursier.bzl", "add_netrc_entries_from_mirror_urls", "compute_dependency_inputs_signature", "extract_netrc_from_auth_url", "get_coursier_cache_or_default", "get_netrc_lines_from_entries", "remove_auth_from_url", "sp...
true
true
f7731c55bc023452e0f319f059f43687b78b2bc0
2,665
py
Python
sdk/automation/azure-mgmt-automation/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/automation/azure-mgmt-automation/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/automation/azure-mgmt-automation/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
35.533333
103
0.609006
import re import os.path from io import open from setuptools import find_packages, setup PACKAGE_NAME = "azure-mgmt-automation" PACKAGE_PPRINT_NAME = "Automation" package_folder_path = PACKAGE_NAME.replace('-', '/') namespace_name = PACKAGE_NAME.replace('-', '.') with open(os.path.join(package_folder_path, 'versio...
true
true
f7731ca15340251c81742cca06b4593672b6ca32
582
py
Python
test/test_add_user.py
chernenko-art/test_python
9eed2b91f1af8a2e753029c604137e02ec0f91e4
[ "Apache-2.0" ]
null
null
null
test/test_add_user.py
chernenko-art/test_python
9eed2b91f1af8a2e753029c604137e02ec0f91e4
[ "Apache-2.0" ]
null
null
null
test/test_add_user.py
chernenko-art/test_python
9eed2b91f1af8a2e753029c604137e02ec0f91e4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.user import User def test_create_user(app, db, json_users, check_ui): # get current user list from db user = json_users old_user_list = db.get_user_list() app.user.create(user) # get new user list from db new_user_list = db.get_user_list() # add new user ...
34.235294
115
0.706186
from model.user import User def test_create_user(app, db, json_users, check_ui): user = json_users old_user_list = db.get_user_list() app.user.create(user) new_user_list = db.get_user_list() old_user_list.append(user) assert sorted(old_user_list, key=User.id_or_max) == sorted(new_u...
true
true
f7731d6c64096f3106338637d1bc3f5726d66f5e
3,486
py
Python
utils/wordcloud.py
ericscartier/twarc
670924238395a56a782a0743b862de5844c43f6c
[ "CC0-1.0" ]
2
2016-03-24T05:00:42.000Z
2021-08-31T16:42:29.000Z
utils/wordcloud.py
ericscartier/twarc
670924238395a56a782a0743b862de5844c43f6c
[ "CC0-1.0" ]
null
null
null
utils/wordcloud.py
ericscartier/twarc
670924238395a56a782a0743b862de5844c43f6c
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import re import json import fileinput try: from urllib import urlopen # Python 2 except ImportError: from urllib.request import urlopen # Python 3 MAX_WORDS = 200 word_counts = {} stop_words = set(["a","able","about","across","after","all","almo...
35.938144
809
0.58778
from __future__ import print_function import re import json import fileinput try: from urllib import urlopen except ImportError: from urllib.request import urlopen MAX_WORDS = 200 word_counts = {} stop_words = set(["a","able","about","across","after","all","almost","also","am","among","an","and","any","ar...
true
true
f7731da1f0d9f5bc8997b9a7227784b391ea6f67
198
py
Python
pyexcelerate/tests/utils.py
scraperwiki/PyExcelerate
d28155ae66e73624916b702b662ac638a6d7b63e
[ "BSD-2-Clause" ]
null
null
null
pyexcelerate/tests/utils.py
scraperwiki/PyExcelerate
d28155ae66e73624916b702b662ac638a6d7b63e
[ "BSD-2-Clause" ]
null
null
null
pyexcelerate/tests/utils.py
scraperwiki/PyExcelerate
d28155ae66e73624916b702b662ac638a6d7b63e
[ "BSD-2-Clause" ]
null
null
null
import os import shutil def get_output_path(fn): out_dir = os.path.join(os.path.dirname(__file__), 'output') if not os.path.exists(out_dir): os.mkdir(out_dir) return os.path.join(out_dir, fn)
22
60
0.742424
import os import shutil def get_output_path(fn): out_dir = os.path.join(os.path.dirname(__file__), 'output') if not os.path.exists(out_dir): os.mkdir(out_dir) return os.path.join(out_dir, fn)
true
true
f7731f368b5ecbc9bc2aac0a8b3960909314572e
849
py
Python
felicette/utils/sys_utils.py
blac-siren/felicette
61aadea0703d217920021c199c924818cb96372d
[ "MIT" ]
1,878
2020-07-25T12:33:51.000Z
2022-03-29T06:27:38.000Z
felicette/utils/sys_utils.py
sthagen/felicette
61aadea0703d217920021c199c924818cb96372d
[ "MIT" ]
32
2020-07-25T14:41:18.000Z
2022-03-12T00:43:05.000Z
felicette/utils/sys_utils.py
sthagen/felicette
61aadea0703d217920021c199c924818cb96372d
[ "MIT" ]
84
2020-07-25T12:46:34.000Z
2022-02-01T17:59:05.000Z
import sys import os import shutil def exit_cli(print_func, message): print_func("%s" % message) sys.exit(0) def display_file(file_name): """ Open given file with default user program. """ if sys.platform.startswith("linux"): os.system("xdg-open %s" % file_name) elif sys.platfor...
25.727273
70
0.607774
import sys import os import shutil def exit_cli(print_func, message): print_func("%s" % message) sys.exit(0) def display_file(file_name): if sys.platform.startswith("linux"): os.system("xdg-open %s" % file_name) elif sys.platform.startswith("darwin"): os.system("open %s" % file_name...
true
true
f7731fb674c5572b8fb43a5d82962ccec159b31c
2,036
py
Python
synthesisdatabase/models.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
7
2017-02-28T01:01:02.000Z
2021-05-24T04:48:01.000Z
synthesisdatabase/models.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
1
2019-03-07T06:38:28.000Z
2019-04-04T18:14:38.000Z
synthesisdatabase/models.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
4
2017-05-01T18:57:39.000Z
2020-06-04T06:01:53.000Z
from base_models import (Document, BasePaper, BaseParagraph, BaseMaterial, BaseOperation, BaseDescriptor, BaseProperty, BaseAmount, BaseCondition, BaseApparatus, BaseConnection) ### PAPER AND PARAGRAPHS ### class Paper(BasePaper): structure = dict(BasePaper.structure, **{ 'operations'...
30.848485
119
0.653733
from base_models import (Document, BasePaper, BaseParagraph, BaseMaterial, BaseOperation, BaseDescriptor, BaseProperty, BaseAmount, BaseCondition, BaseApparatus, BaseConnection) class Paper(BasePaper): structure = dict(BasePaper.structure, **{ 'operations': ([BaseOperation], []), ...
true
true
f7731fc2aa57db0b6fa73f91f4109de06d3c08b4
980
py
Python
algs19_networkx_replacement/adjacency_viewer.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
algs19_networkx_replacement/adjacency_viewer.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
algs19_networkx_replacement/adjacency_viewer.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
# data associated with an edge can contain a weight WEIGHT = 'weight' class AdjacencyViewer: """ Provide object to iterate over adjacent nodes. """ def __init__(self, mat, i, neighbors): self.mat = mat self.i = i self.neighbors = neighbors def __getitem__(self, target): ...
30.625
113
0.555102
WEIGHT = 'weight' class AdjacencyViewer: def __init__(self, mat, i, neighbors): self.mat = mat self.i = i self.neighbors = neighbors def __getitem__(self, target): for j in self.neighbors: if j == target: if (self.i, j) in self.mat.weights: ...
true
true
f7731fdd2b19e7b958ad093a148b17428ad6bdb0
11,098
py
Python
alphapept/ext/bruker/timsdata.py
mschwoer/alphapept
446b3c8b2a20619a74ff872c24a01fed8b99a20a
[ "Apache-2.0" ]
97
2021-07-24T20:30:09.000Z
2022-03-30T08:33:47.000Z
alphapept/ext/bruker/timsdata.py
mschwoer/alphapept
446b3c8b2a20619a74ff872c24a01fed8b99a20a
[ "Apache-2.0" ]
93
2021-07-26T15:03:50.000Z
2022-03-16T14:37:26.000Z
alphapept/ext/bruker/timsdata.py
mschwoer/alphapept
446b3c8b2a20619a74ff872c24a01fed8b99a20a
[ "Apache-2.0" ]
17
2021-07-26T07:40:49.000Z
2022-03-15T20:04:34.000Z
# -*- coding: utf-8 -*- """Python wrapper for timsdata.dll""" import numpy as np import sqlite3 import os, sys from ctypes import * if sys.platform[:5] == "win32": libname = "timsdata.dll" elif sys.platform[:5] == "linux": libname = "libtimsdata.so" else: raise Exception("Unsupported platform.") path = ...
39.215548
119
0.667418
import numpy as np import sqlite3 import os, sys from ctypes import * if sys.platform[:5] == "win32": libname = "timsdata.dll" elif sys.platform[:5] == "linux": libname = "libtimsdata.so" else: raise Exception("Unsupported platform.") path = os.path.dirname(os.path.abspath(__file__)) libname = os.path.j...
true
true
f773203f7c61ec2063941af3c12a1ac465c1502f
14,206
py
Python
bleak/backends/corebluetooth/client.py
paoloaveri/bleak
a4ad3a9f01beac03d98623bb08c661c708431503
[ "MIT" ]
null
null
null
bleak/backends/corebluetooth/client.py
paoloaveri/bleak
a4ad3a9f01beac03d98623bb08c661c708431503
[ "MIT" ]
null
null
null
bleak/backends/corebluetooth/client.py
paoloaveri/bleak
a4ad3a9f01beac03d98623bb08c661c708431503
[ "MIT" ]
null
null
null
""" BLE Client for CoreBluetooth on macOS Created on 2019-6-26 by kevincar <kevincarrolldavis@gmail.com> """ import logging import uuid from asyncio.events import AbstractEventLoop from typing import Callable, Any, Union from Foundation import NSData, CBUUID from CoreBluetooth import CBCharacteristicWriteWithRespons...
38.814208
122
0.642123
import logging import uuid from asyncio.events import AbstractEventLoop from typing import Callable, Any, Union from Foundation import NSData, CBUUID from CoreBluetooth import CBCharacteristicWriteWithResponse, CBCharacteristicWriteWithoutResponse from bleak.backends.client import BaseBleakClient from bleak.backends...
true
true
f77322bb6772c89eca891301e3537b245fac57a4
856
py
Python
setup.py
dandiodati/python-firetv
02f9e99b7e5ff89239ce25368074cd78f02c3652
[ "MIT" ]
null
null
null
setup.py
dandiodati/python-firetv
02f9e99b7e5ff89239ce25368074cd78f02c3652
[ "MIT" ]
null
null
null
setup.py
dandiodati/python-firetv
02f9e99b7e5ff89239ce25368074cd78f02c3652
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='firetv', version='1.1.0', description='Communicate with an Amazon Fire TV device via ADB over a network.', url='https://github.com/happyleavesaoc/python-firetv/', license='MIT', author='happyleaves', author_email='happyleaves.tfr@gmail.com', pac...
30.571429
99
0.613318
from setuptools import setup setup( name='firetv', version='1.1.0', description='Communicate with an Amazon Fire TV device via ADB over a network.', url='https://github.com/happyleavesaoc/python-firetv/', license='MIT', author='happyleaves', author_email='happyleaves.tfr@gmail.com', pac...
true
true
f77322bc07fac0bec3c6e83fc4394aaa5ddafea7
416
py
Python
django_travis_setup/django_travis_setup/wsgi.py
vaibhav-singh/django-travis-setup
f39fccc88a14e23bdb5bc42f1885e3198ae3a352
[ "MIT" ]
null
null
null
django_travis_setup/django_travis_setup/wsgi.py
vaibhav-singh/django-travis-setup
f39fccc88a14e23bdb5bc42f1885e3198ae3a352
[ "MIT" ]
5
2020-06-05T17:29:56.000Z
2021-12-13T19:44:11.000Z
django_travis_setup/django_travis_setup/wsgi.py
vaibhav-singh/django-travis-setup
f39fccc88a14e23bdb5bc42f1885e3198ae3a352
[ "MIT" ]
null
null
null
""" WSGI config for django_travis_setup project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault(...
24.470588
79
0.798077
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_travis_setup.settings") application = get_wsgi_application()
true
true
f77323bf536e95b404433e1aca60697c69a923f2
635
py
Python
homeassistant/components/growatt_server/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/growatt_server/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/growatt_server/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The Growatt server PV inverter sensor integration.""" from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import PLATFORMS async def async_setup_entry( hass: HomeAssistant, entry: config_entries.ConfigEntry ) ->...
30.238095
78
0.782677
from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import PLATFORMS async def async_setup_entry( hass: HomeAssistant, entry: config_entries.ConfigEntry ) -> bool: hass.config_entries.async_setup_platforms(ent...
true
true
f77323ca9dadc49c63ec0cc59adc55f8df6dd93e
133,852
py
Python
moto/rds2/models.py
xyb/moto
c60fb068e1138423690dd9fe500e31761d40efec
[ "Apache-2.0" ]
null
null
null
moto/rds2/models.py
xyb/moto
c60fb068e1138423690dd9fe500e31761d40efec
[ "Apache-2.0" ]
null
null
null
moto/rds2/models.py
xyb/moto
c60fb068e1138423690dd9fe500e31761d40efec
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import copy import datetime import os import random import string from collections import defaultdict from boto3 import Session from jinja2 import Template from re import compile as re_compile from collections import OrderedDict from moto.core import BaseBackend, BaseModel, Clo...
73.869757
6,624
0.713034
from __future__ import unicode_literals import copy import datetime import os import random import string from collections import defaultdict from boto3 import Session from jinja2 import Template from re import compile as re_compile from collections import OrderedDict from moto.core import BaseBackend, BaseModel, Clo...
true
true
f7732534c6533873b4a00d449521d671f929e72e
825
py
Python
unleashed_py/cli.py
upOwa/unleashed-py
997a836b632212443f43caf7da7e7fea9feb9a77
[ "MIT" ]
null
null
null
unleashed_py/cli.py
upOwa/unleashed-py
997a836b632212443f43caf7da7e7fea9feb9a77
[ "MIT" ]
4
2020-03-06T14:39:40.000Z
2020-09-30T08:44:32.000Z
unleashed_py/cli.py
upOwa/unleashed-py
997a836b632212443f43caf7da7e7fea9feb9a77
[ "MIT" ]
1
2020-03-03T11:22:34.000Z
2020-03-03T11:22:34.000Z
""" Module that contains the command line app. Why does this file exist, and why not put this in __main__? You might be tempted to import things from __main__ later, but that will cause problems: the code will get executed twice: - When you run `python -munleashed_py` python will execute ``__main__.py`` as...
25.78125
80
0.678788
import sys def main(argv=sys.argv): print(argv) return 0
true
true
f77325d773b8fff6a5ddc1c680076a5ccbeb32e3
3,016
py
Python
sdk/python/lib/test/langhost/component_resource_single_provider/__main__.py
sticha/pulumi
76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b
[ "Apache-2.0" ]
12,004
2018-06-17T23:56:29.000Z
2022-03-31T18:00:09.000Z
sdk/python/lib/test/langhost/component_resource_single_provider/__main__.py
sticha/pulumi
76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b
[ "Apache-2.0" ]
6,263
2018-06-17T23:27:24.000Z
2022-03-31T19:20:35.000Z
sdk/python/lib/test/langhost/component_resource_single_provider/__main__.py
sticha/pulumi
76ee1b8ccfee815eb315d9e0e0ddfaaf505c472b
[ "Apache-2.0" ]
706
2018-06-17T23:56:50.000Z
2022-03-31T11:20:23.000Z
# Copyright 2016-2018, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.888889
95
0.744695
from pulumi import ProviderResource, CustomResource, ComponentResource, ResourceOptions class Provider(ProviderResource): def __init__(self, name, opts=None): ProviderResource.__init__(self, "test", name, {}, opts) class Resource(CustomResource): def __init__(self, name, create_children, opts=None): ...
true
true
f77325f5dad6eccb67e6dc05f625e4843ef770f2
3,131
py
Python
cfgov/scripts/initial_data.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
37
2020-08-18T19:52:39.000Z
2022-03-23T08:08:41.000Z
cfgov/scripts/initial_data.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
338
2020-08-14T20:46:36.000Z
2022-03-31T20:49:32.000Z
cfgov/scripts/initial_data.py
raft-tech/cfgov-refresh
7c63c31fd6bb95ed4f7d368f1e1252175f0c71ca
[ "CC0-1.0" ]
14
2020-10-21T15:27:03.000Z
2022-03-17T03:16:36.000Z
import logging import os from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from django.db import transaction from wagtail.core.models import Page, Site from wagtailsharing.models import SharingSite from v1.models import HomePage logger = logging.getLogger(__name__) ...
33.308511
105
0.650271
import logging import os from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from django.db import transaction from wagtail.core.models import Page, Site from wagtailsharing.models import SharingSite from v1.models import HomePage logger = logging.getLogger(__name__) ...
true
true
f77325fc392e2905c699fe6598fe492a75dae251
583
py
Python
src/cetools/__init__.py
lgw4/cetools
1d01a1e8644ced4c791bc273196cc3859e0ae065
[ "Apache-2.0" ]
null
null
null
src/cetools/__init__.py
lgw4/cetools
1d01a1e8644ced4c791bc273196cc3859e0ae065
[ "Apache-2.0" ]
null
null
null
src/cetools/__init__.py
lgw4/cetools
1d01a1e8644ced4c791bc273196cc3859e0ae065
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Leonard G. Warden IV # # 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 w...
41.642857
74
0.763293
true
true
f773261b53ceb2a6579aedf387856f8285c8f150
631
py
Python
tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial1_Solution_98f98dd2.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
2,294
2020-05-11T12:05:35.000Z
2022-03-28T21:23:34.000Z
tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial1_Solution_98f98dd2.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
629
2020-05-11T15:42:26.000Z
2022-03-29T12:23:35.000Z
tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial1_Solution_98f98dd2.py
raxosiris/course-content
6904ae919b91aeb885d73b53cb9b02e6ec73d9cd
[ "CC-BY-4.0" ]
917
2020-05-11T12:47:53.000Z
2022-03-31T12:14:41.000Z
""" The multi-reward and probabilistic reward enviroments are the same. You could simulate a probabilistic reward of 10 units, delivered 50% of the time, by having a mixture of 10 and 0 unit rewards, or vice versa. The takehome message from these last three exercises is that the *average* or expected reward is what mat...
52.583333
82
0.800317
true
true
f773267056943fde9e03844e988027a6f6b0daa7
1,778
py
Python
setup.py
TheJacksonLaboratory/scanpy_recipes
09715f66fca0ca8101757fbcd9d3244603e4dd3a
[ "BSD-3-Clause" ]
5
2018-12-18T18:46:57.000Z
2022-03-22T09:42:25.000Z
setup.py
TheJacksonLaboratory/scanpy_recipes
09715f66fca0ca8101757fbcd9d3244603e4dd3a
[ "BSD-3-Clause" ]
42
2018-12-19T20:38:26.000Z
2020-02-24T14:32:34.000Z
setup.py
TheJacksonLaboratory/scanpy_recipes
09715f66fca0ca8101757fbcd9d3244603e4dd3a
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages from pathlib import Path #import versioneer package_name = 'scanpy_recipes' req_path = Path('requirements.txt') with req_path.open() as requirements: requires = [l.strip() for l in requirements] with open('README.md', encoding='utf-8') as fin: readme = fin.read() ...
34.862745
104
0.668729
from setuptools import setup, find_packages from pathlib import Path package_name = 'scanpy_recipes' req_path = Path('requirements.txt') with req_path.open() as requirements: requires = [l.strip() for l in requirements] with open('README.md', encoding='utf-8') as fin: readme = fin.read() author = 'Bill Flyn...
true
true
f7732934a99ca04691827f11e5881de941368152
4,042
py
Python
python/bst_distance.py
samygp/leet_code
72c9912c0bdc9756e14a44a4329fc2c7d3ff2b52
[ "MIT" ]
null
null
null
python/bst_distance.py
samygp/leet_code
72c9912c0bdc9756e14a44a4329fc2c7d3ff2b52
[ "MIT" ]
null
null
null
python/bst_distance.py
samygp/leet_code
72c9912c0bdc9756e14a44a4329fc2c7d3ff2b52
[ "MIT" ]
null
null
null
class Node: def __init__(self, val): self.value = val self.right = None self.left = None self.visited = False def __str__(self): r = None if self.right is None else self.right.value l = None if self.left is None else self.left.value return f"({self.va...
29.940741
68
0.463137
class Node: def __init__(self, val): self.value = val self.right = None self.left = None self.visited = False def __str__(self): r = None if self.right is None else self.right.value l = None if self.left is None else self.left.value return f"({self.va...
true
true
f77329bda1bdeba3e3d0bd85e9093d26a2611df3
597
py
Python
cleverbot.py
MohanSha/PyTaskAutomation
a8e20d9c0ea60f01384e9a23179e41afb3f111cf
[ "MIT" ]
3
2018-02-20T10:32:34.000Z
2018-08-18T03:57:41.000Z
cleverbot.py
MohanSha/PyTaskAutomation
a8e20d9c0ea60f01384e9a23179e41afb3f111cf
[ "MIT" ]
null
null
null
cleverbot.py
MohanSha/PyTaskAutomation
a8e20d9c0ea60f01384e9a23179e41afb3f111cf
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from cleverwrap import CleverWrap import pyttsx import os os.environ["HTTPS_PROXY"] = "http://usr_name:pass@proxy:port" cw = CleverWrap("API_KEY") a='y' engine = pyttsx.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[4].id) rate = engine.getProperty('rate') engine.s...
21.321429
61
0.688442
from cleverwrap import CleverWrap import pyttsx import os os.environ["HTTPS_PROXY"] = "http://usr_name:pass@proxy:port" cw = CleverWrap("API_KEY") a='y' engine = pyttsx.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[4].id) rate = engine.getProperty('rate') engine.setProperty('rate', ...
false
true
f7732c7527bc0a21404aa5f4e7e57daa750e1eb4
1,946
py
Python
records/forms.py
Chaitya62/E-Certificates
9e46c9915d8883b41dca3111d98b6d1541fb8da2
[ "MIT" ]
3
2018-03-17T16:22:17.000Z
2020-04-20T13:36:50.000Z
records/forms.py
Chaitya62/E-Certificates
9e46c9915d8883b41dca3111d98b6d1541fb8da2
[ "MIT" ]
1
2018-04-03T17:29:06.000Z
2018-04-03T17:29:06.000Z
records/forms.py
Chaitya62/E-Certificates
9e46c9915d8883b41dca3111d98b6d1541fb8da2
[ "MIT" ]
1
2018-02-28T15:46:57.000Z
2018-02-28T15:46:57.000Z
from django import forms from .models import Event,Attendee from .utils import generate_event_url class CreateNewEvent(forms.ModelForm): class Meta(): model = Event fields = ['event_name', 'event_type', 'event_url'] widgets = { 'event_type': forms.TextInput(attrs={'class':'form-control ', }), 'event_name'...
32.983051
131
0.70298
from django import forms from .models import Event,Attendee from .utils import generate_event_url class CreateNewEvent(forms.ModelForm): class Meta(): model = Event fields = ['event_name', 'event_type', 'event_url'] widgets = { 'event_type': forms.TextInput(attrs={'class':'form-control ', }), 'event_name'...
true
true
f7732e9c73a113dc0bd1c58b7cafe7abf4319168
1,496
py
Python
multiexplorer/multiexplorer/admin.py
priestc/MultiExplorer
5c991cc55fc50155212cda6208dae744e9777d77
[ "MIT" ]
18
2016-07-12T01:22:40.000Z
2022-03-01T08:36:04.000Z
multiexplorer/multiexplorer/admin.py
priestc/MultiExplorer
5c991cc55fc50155212cda6208dae744e9777d77
[ "MIT" ]
14
2016-07-12T01:46:23.000Z
2021-09-22T17:37:41.000Z
multiexplorer/multiexplorer/admin.py
priestc/MultiExplorer
5c991cc55fc50155212cda6208dae744e9777d77
[ "MIT" ]
15
2016-07-12T20:55:14.000Z
2019-10-11T04:25:33.000Z
import datetime import json from django.contrib import admin from django.conf import settings from django.utils import timezone from .models import CachedTransaction, Memo, IPTracker from django.utils.safestring import mark_safe class CachedTransactionAdmin(admin.ModelAdmin): list_display = ("txid", 'crypto', "c...
33.244444
89
0.709893
import datetime import json from django.contrib import admin from django.conf import settings from django.utils import timezone from .models import CachedTransaction, Memo, IPTracker from django.utils.safestring import mark_safe class CachedTransactionAdmin(admin.ModelAdmin): list_display = ("txid", 'crypto', "c...
true
true
f7732ea383d6043375ef068ec3c7c28677194021
306
py
Python
pettingzoo/atari/quadrapong_v2.py
dkkim93/PettingZoo
45e9c8f202b80fbc509232a44a771fa7156b5937
[ "MIT" ]
4
2021-12-17T08:00:28.000Z
2022-02-12T12:25:24.000Z
pettingzoo/pettingzoo/atari/quadrapong_v2.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
pettingzoo/pettingzoo/atari/quadrapong_v2.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn def raw_env(**kwargs): mode = 33 num_players = 4 return BaseAtariEnv(game="pong", num_players=num_players, mode_num=mode, **kwargs) env = base_env_wrapper_fn(raw_env) parallel_env = parallel_wrapper_fn(env)
25.5
86
0.77451
from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn def raw_env(**kwargs): mode = 33 num_players = 4 return BaseAtariEnv(game="pong", num_players=num_players, mode_num=mode, **kwargs) env = base_env_wrapper_fn(raw_env) parallel_env = parallel_wrapper_fn(env)
true
true
f7732ec4c21c4e0819bc3f87d7a1502cf6362725
12,788
py
Python
tests/python/pants_test/option/test_options_bootstrapper.py
StephanErb/pants
a368267b6b4cf50138ba567f582409ed31bf5db9
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/option/test_options_bootstrapper.py
StephanErb/pants
a368267b6b4cf50138ba567f582409ed31bf5db9
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/option/test_options_bootstrapper.py
StephanErb/pants
a368267b6b4cf50138ba567f582409ed31bf5db9
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import unittest from builtins import open from textwrap import dedent from pan...
43.945017
100
0.620582
from __future__ import absolute_import, division, print_function, unicode_literals import os import unittest from builtins import open from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.option.options_bootstrapper import OptionsBootstrapper from pants.option.scope import Sc...
true
true
f7732f7d5ca126f89794e2cca1c169bb4270f10a
10,932
py
Python
client/commands/tests/kill_test.py
tahmidbintaslim/pyre-check
59d694f7733d7b160ecaddbe79d5d79cef0e83bc
[ "MIT" ]
null
null
null
client/commands/tests/kill_test.py
tahmidbintaslim/pyre-check
59d694f7733d7b160ecaddbe79d5d79cef0e83bc
[ "MIT" ]
null
null
null
client/commands/tests/kill_test.py
tahmidbintaslim/pyre-check
59d694f7733d7b160ecaddbe79d5d79cef0e83bc
[ "MIT" ]
null
null
null
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import shutil import signal import subprocess import tempfile import unittest from pathlib import Path from unittest.mock import MagicMock...
36.932432
88
0.64453
import os import shutil import signal import subprocess import tempfile import unittest from pathlib import Path from unittest.mock import MagicMock, Mock, call, patch import psutil from ... import watchman from ...analysis_directory import AnalysisDirectory from .. import kill from ..kill import Kill, _get_process_...
true
true
f7733010da672eaba2c21dae6659eab792fbb934
61,750
py
Python
nltk/tokenize/punkt.py
abimurali1993/dev
295182a75b9b6031656b5c6c10866d517a1992cf
[ "Apache-2.0" ]
null
null
null
nltk/tokenize/punkt.py
abimurali1993/dev
295182a75b9b6031656b5c6c10866d517a1992cf
[ "Apache-2.0" ]
null
null
null
nltk/tokenize/punkt.py
abimurali1993/dev
295182a75b9b6031656b5c6c10866d517a1992cf
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Punkt sentence tokenizer # # Copyright (C) 2001-2013 NLTK Project # Algorithm: Kiss & Strunk (2006) # Author: Willy <willy@csse.unimelb.edu.au> (original Python port) # Steven Bird <stevenbird1@gmail.com> (additions) # Edward Loper <edloper@gradient.cis.upenn.edu> (rewrite) #...
38.545568
118
0.577717
from __future__ import print_function, unicode_literals import re import math from collections import defaultdict from nltk.compat import unicode_repr, python_2_unicode_compatible, string_types from nltk.probability import FreqDist from nltk.tokenize.api import TokenizerI _ORTHO_BEG_UC = 1 << 1 _ORTHO_MID_UC ...
true
true
f77330e675161a7592117c015daa38ce5df18054
5,193
py
Python
python3/koans/about_strings.py
99Raul/python_koans
9a378e811581f97829a7d23c43c118407c81bc4f
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
99Raul/python_koans
9a378e811581f97829a7d23c43c118407c81bc4f
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
99Raul/python_koans
9a378e811581f97829a7d23c43c118407c81bc4f
[ "MIT" ]
null
null
null
from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' self.assertEqual(Tr...
35.326531
85
0.639707
from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' self.assertEqual(Tr...
true
true
f77331c8f9df82a3694da8d426478638852dcb4a
1,354
py
Python
backend/scrapers/alliance_for_housing_and_healing.py
hackforla/jobs-for-hope
c7b64797caec2499b5a9b97cfb4b9219e511843c
[ "MIT" ]
16
2018-08-09T03:35:36.000Z
2020-07-23T21:04:14.000Z
backend/scrapers/alliance_for_housing_and_healing.py
hackforla/jobs-for-hope
c7b64797caec2499b5a9b97cfb4b9219e511843c
[ "MIT" ]
74
2018-07-11T02:49:46.000Z
2022-01-22T04:13:16.000Z
backend/scrapers/alliance_for_housing_and_healing.py
hackforla/jobs-for-hope
c7b64797caec2499b5a9b97cfb4b9219e511843c
[ "MIT" ]
23
2018-07-18T02:35:16.000Z
2021-03-03T05:34:02.000Z
from datetime import datetime import globals from globals import get_soup, job_insert from datecleaner import month_to_num from job import Job # Alliance for Housing and Healing (Formerly the Serra Project & Aid For Aids) organization = "Alliance for Housing and Healing" url = 'https://alliancehh.org/about/jobs/' orga...
33.02439
78
0.676514
from datetime import datetime import globals from globals import get_soup, job_insert from datecleaner import month_to_num from job import Job organization = "Alliance for Housing and Healing" url = 'https://alliancehh.org/about/jobs/' organization_id = 3 def run(url): soup = get_soup(url) jobs_list = soup.f...
true
true
f773320d00096cf8dbc9555ee45f2346ba0adc45
5,927
py
Python
vnpy/trader/app/ctaStrategy/ctaBase.py
CjoneL/vnpy
5081dbe2cb929bdf9a0e512c2e480d9be22fe887
[ "MIT" ]
null
null
null
vnpy/trader/app/ctaStrategy/ctaBase.py
CjoneL/vnpy
5081dbe2cb929bdf9a0e512c2e480d9be22fe887
[ "MIT" ]
null
null
null
vnpy/trader/app/ctaStrategy/ctaBase.py
CjoneL/vnpy
5081dbe2cb929bdf9a0e512c2e480d9be22fe887
[ "MIT" ]
null
null
null
# encoding: UTF-8 ''' 本文件中包含了CTA模块中用到的一些基础设置、类和常量等。 ''' from __future__ import division print 'load ctaBase.py' # 常量定义 # CTA引擎中涉及到的交易方向类型 CTAORDER_BUY = u'买开' CTAORDER_SELL = u'卖平' CTAORDER_SHORT = u'卖开' CTAORDER_COVER = u'买平' CTAORDER_OPEN_REJECT = u'开单拒绝' CTAORDER_OPEN_FAIL = u'开单失败' CTAORDER_CLOSE_FAIL = u'平单失败'...
34.260116
117
0.52168
''' 本文件中包含了CTA模块中用到的一些基础设置、类和常量等。 ''' from __future__ import division print 'load ctaBase.py' CTAORDER_BUY = u'买开' CTAORDER_SELL = u'卖平' CTAORDER_SHORT = u'卖开' CTAORDER_COVER = u'买平' CTAORDER_OPEN_REJECT = u'开单拒绝' CTAORDER_OPEN_FAIL = u'开单失败' CTAORDER_CLOSE_FAIL = u'平单失败' STOPORDER_WAITING = u'等待中' STOPORDER_CANC...
false
true
f77333181cb404d7d5bd7bc9919fdd43ca87bce1
2,539
py
Python
fixture/orm.py
aleks21977/python_training
f3086dde4b3c5339c486fab7c53178085c6b6856
[ "Apache-2.0" ]
null
null
null
fixture/orm.py
aleks21977/python_training
f3086dde4b3c5339c486fab7c53178085c6b6856
[ "Apache-2.0" ]
null
null
null
fixture/orm.py
aleks21977/python_training
f3086dde4b3c5339c486fab7c53178085c6b6856
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from pony.orm import * from model.contact import Contact from model.group import Group from pymysql.converters import decoders class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='group_id') n...
36.797101
127
0.691217
from datetime import datetime from pony.orm import * from model.contact import Contact from model.group import Group from pymysql.converters import decoders class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='group_id') n...
true
true
f77334d9b47a87b397c972649041bdcae204d23e
26,952
py
Python
ultracart/api/chargeback_api.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
1
2018-03-15T16:56:23.000Z
2018-03-15T16:56:23.000Z
ultracart/api/chargeback_api.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
ultracart/api/chargeback_api.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and py...
44.770764
261
0.644739
from __future__ import absolute_import import re import six from ultracart.api_client import ApiClient from ultracart.configuration import Configuration class ChargebackApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_cli...
true
true
f773351accbaffedd1286814f67d4b0caa82a306
339
py
Python
zvt/factors/macd/__init__.py
alucardxh/zvt
02a2c64828146f4e15e702150f26a5ab6647a91c
[ "MIT" ]
10
2020-08-08T04:43:00.000Z
2021-07-23T05:38:11.000Z
zvt/factors/macd/__init__.py
alucardxh/zvt
02a2c64828146f4e15e702150f26a5ab6647a91c
[ "MIT" ]
1
2021-08-14T12:19:18.000Z
2021-09-30T06:44:04.000Z
zvt/factors/macd/__init__.py
alucardxh/zvt
02a2c64828146f4e15e702150f26a5ab6647a91c
[ "MIT" ]
5
2021-07-18T08:27:37.000Z
2022-03-31T14:10:21.000Z
# -*- coding: utf-8 -*- # the __all__ is generated __all__ = [] # __init__.py structure: # common code of the package # export interface in __all__ which contains __all__ of its sub modules # import all from submodule macd_factor from .macd_factor import * from .macd_factor import __all__ as _macd_factor_all __all__ ...
28.25
71
0.769912
__all__ = [] from .macd_factor import * from .macd_factor import __all__ as _macd_factor_all __all__ += _macd_factor_all
true
true
f773353873db439203854ac65502a040fb37995c
2,325
py
Python
engine/objects/entities/elasticbody.py
vityaman/Pygame2DGameEngine
a38a99dd860308abbdd3109fbaabadce075617db
[ "Apache-2.0" ]
null
null
null
engine/objects/entities/elasticbody.py
vityaman/Pygame2DGameEngine
a38a99dd860308abbdd3109fbaabadce075617db
[ "Apache-2.0" ]
null
null
null
engine/objects/entities/elasticbody.py
vityaman/Pygame2DGameEngine
a38a99dd860308abbdd3109fbaabadce075617db
[ "Apache-2.0" ]
null
null
null
from engine.objects.entities.icollidable import ICollidable from engine.objects.entities.kineticbody import KineticBody from engine.objects.primitives.drawable import IDrawable from engine.objects.primitives.icollider import ICollider from engine.objects.primitives.vector2d import Vector2D, sign class ElasticBody(Kin...
51.666667
105
0.650323
from engine.objects.entities.icollidable import ICollidable from engine.objects.entities.kineticbody import KineticBody from engine.objects.primitives.drawable import IDrawable from engine.objects.primitives.icollider import ICollider from engine.objects.primitives.vector2d import Vector2D, sign class ElasticBody(Kin...
true
true
f773354913020035eac9d46e7885dd54a6e05b84
1,729
py
Python
onadata/apps/logger/management/commands/add_id.py
childhelpline/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
1
2018-07-15T13:13:43.000Z
2018-07-15T13:13:43.000Z
onadata/apps/logger/management/commands/add_id.py
aondiaye/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
14
2018-07-10T12:48:46.000Z
2022-03-11T23:24:51.000Z
onadata/apps/logger/management/commands/add_id.py
aondiaye/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
5
2018-07-04T07:59:14.000Z
2020-01-28T07:50:18.000Z
from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy from django.core.management.base import BaseCommand from django.conf import settings from onadata.apps.logger.models import Instance, XForm from onadata.libs.utils.model_tools import queryset_iterator class Command(BaseCom...
33.901961
77
0.572007
from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy from django.core.management.base import BaseCommand from django.conf import settings from onadata.apps.logger.models import Instance, XForm from onadata.libs.utils.model_tools import queryset_iterator class Command(BaseCom...
true
true
f77336752af25054df536d0e26448a58ae016c2a
530
py
Python
cmsplugin_iframe2/conf/__init__.py
misli/cmsplugin-iframe2
4e20c89d32f8fc78f0ff8fcdd8511f222b3c7dcb
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_iframe2/conf/__init__.py
misli/cmsplugin-iframe2
4e20c89d32f8fc78f0ff8fcdd8511f222b3c7dcb
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_iframe2/conf/__init__.py
misli/cmsplugin-iframe2
4e20c89d32f8fc78f0ff8fcdd8511f222b3c7dcb
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement from django.conf import settings as wrapped_settings from . import default_settings as default_settings class LazySettings(object): def __getattr__(self, name): try: ...
26.5
125
0.722642
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement from django.conf import settings as wrapped_settings from . import default_settings as default_settings class LazySettings(object): def __getattr__(self, name): try: ...
true
true
f773379a351396409a9a3988502f7aba8db790b0
8,159
py
Python
assignment/assignment2/code/q2_parser_transitions.py
vangoran/cs224n
c44465d6cef3f20184e264012226590e6af6129d
[ "Apache-2.0" ]
null
null
null
assignment/assignment2/code/q2_parser_transitions.py
vangoran/cs224n
c44465d6cef3f20184e264012226590e6af6129d
[ "Apache-2.0" ]
null
null
null
assignment/assignment2/code/q2_parser_transitions.py
vangoran/cs224n
c44465d6cef3f20184e264012226590e6af6129d
[ "Apache-2.0" ]
null
null
null
class PartialParse(object): def __init__(self, sentence): """Initializes this partial parse. Your code should initialize the following fields: self.stack: The current stack represented as a list with the top of the stack as the last element of the list. ...
42.717277
100
0.60277
class PartialParse(object): def __init__(self, sentence): """Initializes this partial parse. Your code should initialize the following fields: self.stack: The current stack represented as a list with the top of the stack as the last element of the list. ...
false
true
f7733979c49bb4d9ecc05e0ff4b0c241e556d0b0
21,440
py
Python
enveloprint/src/enveloprint/forms.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
null
null
null
enveloprint/src/enveloprint/forms.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
1
2015-11-08T11:49:35.000Z
2015-11-08T11:49:43.000Z
enveloprint/src/enveloprint/forms.py
ProfessionalIT/customers
3dbc1989bb3494fb6de7edad67dc59b7b0385ac3
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import gae_form as form import model # Commons Validators Expressions vemail = form.regexp("^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$", "Precisa ser um endereco de e-mail válido !.") vdigito = form.regexp("\d+", "Precisa ser um di...
96.576577
440
0.663899
import gae_form as form import model vemail = form.regexp("^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$", "Precisa ser um endereco de e-mail válido !.") vdigito = form.regexp("\d+", "Precisa ser um digito") vmoeda = form.regexp("^\d{1,5}(\.\d{1,2})?$", "Precisa ser um valor ...
true
true
f7733993fb395ea7513680a6d68efe6c266c21e4
37,215
py
Python
tests/test_page.py
olbod/fbmq
4209c19d9a9fa073a82c0ff6902d6a939f94b743
[ "MIT" ]
null
null
null
tests/test_page.py
olbod/fbmq
4209c19d9a9fa073a82c0ff6902d6a939f94b743
[ "MIT" ]
null
null
null
tests/test_page.py
olbod/fbmq
4209c19d9a9fa073a82c0ff6902d6a939f94b743
[ "MIT" ]
1
2018-03-14T12:42:43.000Z
2018-03-14T12:42:43.000Z
import unittest import json import mock import responses from fbmq.fbmq import Page, LocalizedObj, SUPPORTED_API_VERS from fbmq import template as Template class MessengerAPIMock(): GET = responses.GET PUT = responses.PUT POST = responses.POST DELETE = responses.DELETE METHODS = [responses.GET, re...
39.632588
139
0.543356
import unittest import json import mock import responses from fbmq.fbmq import Page, LocalizedObj, SUPPORTED_API_VERS from fbmq import template as Template class MessengerAPIMock(): GET = responses.GET PUT = responses.PUT POST = responses.POST DELETE = responses.DELETE METHODS = [responses.GET, re...
true
true
f7733a95d64a9d1915c2d7b79a02e8f3e698dd8c
8,069
py
Python
simpletransformers/classification/multi_label_classification_model.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
2
2021-03-13T19:05:46.000Z
2021-11-07T20:03:36.000Z
simpletransformers/classification/multi_label_classification_model.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
null
null
null
simpletransformers/classification/multi_label_classification_model.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
3
2021-11-07T19:55:46.000Z
2022-01-24T15:25:33.000Z
import logging import random import warnings from multiprocessing import cpu_count import numpy as np import torch from transformers import ( WEIGHTS_NAME, AlbertConfig, AlbertTokenizer, BertConfig, BertTokenizer, DistilBertConfig, DistilBertTokenizer, ElectraConfig, ElectraTokenize...
39.169903
194
0.677159
import logging import random import warnings from multiprocessing import cpu_count import numpy as np import torch from transformers import ( WEIGHTS_NAME, AlbertConfig, AlbertTokenizer, BertConfig, BertTokenizer, DistilBertConfig, DistilBertTokenizer, ElectraConfig, ElectraTokenize...
true
true
f7733a9641cb05f08011e45929abb89da92a372d
4,792
py
Python
mezzanine/pages/migrations/0003_auto__add_field_page_site.py
gbosh/mezzanine
f6902d002a0888ed8c721659cc75cbd6d6516d15
[ "BSD-2-Clause" ]
1
2020-01-27T20:44:56.000Z
2020-01-27T20:44:56.000Z
mezzanine/pages/migrations/0003_auto__add_field_page_site.py
gbosh/mezzanine
f6902d002a0888ed8c721659cc75cbd6d6516d15
[ "BSD-2-Clause" ]
null
null
null
mezzanine/pages/migrations/0003_auto__add_field_page_site.py
gbosh/mezzanine
f6902d002a0888ed8c721659cc75cbd6d6516d15
[ "BSD-2-Clause" ]
1
2019-07-27T10:56:58.000Z
2019-07-27T10:56:58.000Z
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Page.site' db.add_column('pages_page', 'site', self.gf('django.db.models.fields.relate...
62.233766
165
0.555509
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('pages_page', 'site', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['sites.Site'...
true
true
f7733b4de3fd2350da91fc96a1a34e7851b03cf0
16,385
py
Python
projects/spin_the_planet/main.py
IDilettant/training-mini-projects
c9cbe922d4c5663d5fd87202722e248cebc2a9c2
[ "MIT" ]
null
null
null
projects/spin_the_planet/main.py
IDilettant/training-mini-projects
c9cbe922d4c5663d5fd87202722e248cebc2a9c2
[ "MIT" ]
null
null
null
projects/spin_the_planet/main.py
IDilettant/training-mini-projects
c9cbe922d4c5663d5fd87202722e248cebc2a9c2
[ "MIT" ]
null
null
null
from time import sleep def spin_the_planet(): print('\u001b[36m', """ _-o#&&*''''?d:>b\\_ _o/'`'' '',, dMF9MMMMMHo_ .o&#' `'MbHMMMMMMMMMMMHo. .o'' ' vodM*$&&HMMMMMMMMMM?. ,' $M&ood,~'`(&##MMMMMMH\\ ...
44.045699
57
0.191211
from time import sleep def spin_the_planet(): print('\u001b[36m', """ _-o#&&*''''?d:>b\\_ _o/'`'' '',, dMF9MMMMMHo_ .o&#' `'MbHMMMMMMMMMMMHo. .o'' ' vodM*$&&HMMMMMMMMMM?. ,' $M&ood,~'`(&##MMMMMMH\\ ...
true
true
f7733b5c0d339810505c64e6899249fe1bdaba2c
67
py
Python
src/Set/addingSet.py
mikeludemann/helperFunctions_Python
62b1e8279eee216f3603f55cf2d010d611e3be0e
[ "MIT" ]
null
null
null
src/Set/addingSet.py
mikeludemann/helperFunctions_Python
62b1e8279eee216f3603f55cf2d010d611e3be0e
[ "MIT" ]
null
null
null
src/Set/addingSet.py
mikeludemann/helperFunctions_Python
62b1e8279eee216f3603f55cf2d010d611e3be0e
[ "MIT" ]
null
null
null
x = set() x.add(12) print(x) x.update(["Blue", "Green"]) print(x)
9.571429
27
0.567164
x = set() x.add(12) print(x) x.update(["Blue", "Green"]) print(x)
true
true
f7733c47cfccd6b22c1e5318d07d2c6cb3c5517e
2,575
py
Python
dump_for_mysql.py
cmaclell/humanranker
5a5d2de6c8975506106b8531d38952edc687ae9e
[ "MIT" ]
null
null
null
dump_for_mysql.py
cmaclell/humanranker
5a5d2de6c8975506106b8531d38952edc687ae9e
[ "MIT" ]
null
null
null
dump_for_mysql.py
cmaclell/humanranker
5a5d2de6c8975506106b8531d38952edc687ae9e
[ "MIT" ]
1
2018-06-23T13:38:38.000Z
2018-06-23T13:38:38.000Z
#!/usr/bin/env python import re import fileinput def this_line_is_useless(line): useless_es = [ 'BEGIN TRANSACTION', 'COMMIT', 'AUTOINCREMENT', 'sqlite_sequence', 'CREATE UNIQUE INDEX', 'PRAGMA foreign_keys=OFF', ] for useless in useless_es: if re.se...
32.594937
95
0.554951
import re import fileinput def this_line_is_useless(line): useless_es = [ 'BEGIN TRANSACTION', 'COMMIT', 'AUTOINCREMENT', 'sqlite_sequence', 'CREATE UNIQUE INDEX', 'PRAGMA foreign_keys=OFF', ] for useless in useless_es: if re.search(useless, line): ...
true
true
f7733dd361df24eb8b853dd6bbfed3a0a3f489b9
2,339
py
Python
2018-2019/project/utils/evaluation.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
1
2019-04-07T03:50:57.000Z
2019-04-07T03:50:57.000Z
2018-2019/project/utils/evaluation.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
5
2018-10-16T22:46:33.000Z
2019-02-04T20:11:41.000Z
2018-2019/project/utils/evaluation.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
1
2019-04-07T03:50:42.000Z
2019-04-07T03:50:42.000Z
import config import numpy as np import tensorflow as tf def get_tp_fp_fn(a, b): a = np.equal(a, 1) not_a = np.logical_not(a) b = np.equal(b, 1) not_b = np.logical_not(b) tp = np.logical_and(a, b).sum().astype(np.float64) fp = np.logical_and(a, not_b).sum().astype(np.float64) fn = np.l...
27.517647
62
0.572894
import config import numpy as np import tensorflow as tf def get_tp_fp_fn(a, b): a = np.equal(a, 1) not_a = np.logical_not(a) b = np.equal(b, 1) not_b = np.logical_not(b) tp = np.logical_and(a, b).sum().astype(np.float64) fp = np.logical_and(a, not_b).sum().astype(np.float64) fn = np.l...
true
true
f7733f4704dbb221b16d86a691b9d7e1a567d528
1,108
py
Python
schedules/migrations/0008_auto_20180809_0226.py
dvek/scyp
0f70d6a9071edbf9e26b7cb3cfaea38905e192d1
[ "MIT" ]
null
null
null
schedules/migrations/0008_auto_20180809_0226.py
dvek/scyp
0f70d6a9071edbf9e26b7cb3cfaea38905e192d1
[ "MIT" ]
4
2020-06-05T18:27:22.000Z
2021-09-07T23:55:27.000Z
schedules/migrations/0008_auto_20180809_0226.py
dvek/scyp
0f70d6a9071edbf9e26b7cb3cfaea38905e192d1
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-08-09 06:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('schedules', '0007_auto_20180719_0054'), ] operations = [ migrations.AlterField( model_name='act...
31.657143
143
0.611011
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('schedules', '0007_auto_20180719_0054'), ] operations = [ migrations.AlterField( model_name='activity', name='day', fiel...
true
true
f7733fefa3b2357e12f6dd5c5d6f243f700f5c19
16,664
py
Python
jupyterhub/files/hub/jupyterhub_config.py
wyphan/zero-to-jupyterhub-k8s
102f40d9c6e437784a48404c40d8244572852b0b
[ "BSD-3-Clause" ]
4
2019-05-04T07:01:11.000Z
2021-01-26T08:40:26.000Z
jupyterhub/files/hub/jupyterhub_config.py
MaxMood96/zero-to-jupyterhub-k8s
4d5c9ca123927930d33a4a501f612e81bab5f7e9
[ "BSD-3-Clause" ]
96
2021-01-18T08:38:53.000Z
2022-03-25T01:59:23.000Z
jupyterhub/files/hub/jupyterhub_config.py
MaxMood96/zero-to-jupyterhub-k8s
4d5c9ca123927930d33a4a501f612e81bab5f7e9
[ "BSD-3-Clause" ]
3
2019-05-04T07:00:58.000Z
2019-05-10T07:17:27.000Z
import glob import os import re import sys from binascii import a2b_hex from tornado.httpclient import AsyncHTTPClient from kubernetes import client from jupyterhub.utils import url_path_join # Make sure that modules placed in the same directory as the jupyterhub config are added to the pythonpath configuration_dire...
35.156118
106
0.68855
import glob import os import re import sys from binascii import a2b_hex from tornado.httpclient import AsyncHTTPClient from kubernetes import client from jupyterhub.utils import url_path_join configuration_directory = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, configuration_directory) from z2jh ...
true
true
f77341139e5a83ca53f1b7b90bc5e1c7f700e2c0
38,369
bzl
Python
tensorflow/workspace.bzl
codeplaysoftware/tensorflow
37e1d028e9b552a712c37cb781221ff7d7ec33f4
[ "Apache-2.0" ]
54
2018-05-29T19:52:44.000Z
2021-11-30T10:41:12.000Z
tensorflow/workspace.bzl
codeplaysoftware/tensorflow
37e1d028e9b552a712c37cb781221ff7d7ec33f4
[ "Apache-2.0" ]
20
2017-12-06T18:20:54.000Z
2021-11-10T09:54:23.000Z
tensorflow/workspace.bzl
codeplaysoftware/tensorflow
37e1d028e9b552a712c37cb781221ff7d7ec33f4
[ "Apache-2.0" ]
9
2018-02-09T04:51:41.000Z
2020-10-05T15:41:08.000Z
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party:nccl/nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", ...
43.062851
163
0.705048
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party:nccl/nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", "mkl_repository") load("//third_party/acl:build_defs.bzl", "acl_repository...
true
true
f77342740a28b2ae8bd668e75b5311dd05846e06
74
py
Python
tests/context.py
sgbalogh/esb.py
06e8f86b94d5dadc628a0fbd396212649328864d
[ "MIT" ]
null
null
null
tests/context.py
sgbalogh/esb.py
06e8f86b94d5dadc628a0fbd396212649328864d
[ "MIT" ]
null
null
null
tests/context.py
sgbalogh/esb.py
06e8f86b94d5dadc628a0fbd396212649328864d
[ "MIT" ]
null
null
null
import os import sys sys.path.insert(0, os.path.abspath('..')) import esb
14.8
41
0.716216
import os import sys sys.path.insert(0, os.path.abspath('..')) import esb
true
true
f773435d5d01055871e1aa4475f3be1b74587a32
355
py
Python
server/directories.py
Taru-garg/my-Phone
161891afcb60f7a7f93593371f1837bbd647735d
[ "MIT" ]
2
2020-11-23T06:13:11.000Z
2021-09-21T19:39:33.000Z
server/directories.py
Taru-garg/my-Phone
161891afcb60f7a7f93593371f1837bbd647735d
[ "MIT" ]
1
2020-11-23T06:10:23.000Z
2020-11-23T06:11:00.000Z
server/directories.py
Taru-garg/my-Phone
161891afcb60f7a7f93593371f1837bbd647735d
[ "MIT" ]
3
2020-11-16T14:21:57.000Z
2021-06-09T05:31:04.000Z
import getpass """ By default Linux """ main_dir = "/storage/emulated/0/" photos_dir = [main_dir + "DCIM", main_dir + "WhatsApp/Media/WhatsApp Images"] document_dir = [main_dir + "Download", main_dir + "Documents"] music_dir = [main_dir + "Download", main_dir + "WhatsApp/Media/WhatsApp Audio"] video_dir = [main_dir ...
27.307692
79
0.71831
import getpass main_dir = "/storage/emulated/0/" photos_dir = [main_dir + "DCIM", main_dir + "WhatsApp/Media/WhatsApp Images"] document_dir = [main_dir + "Download", main_dir + "Documents"] music_dir = [main_dir + "Download", main_dir + "WhatsApp/Media/WhatsApp Audio"] video_dir = [main_dir + "WhatsApp/Media/WhatsAp...
true
true
f773437604cbeeb67992804594fd353a3d4f8b57
2,770
py
Python
generative_models_toolbox/vqvae2/sample.py
belkhir-nacim/generative_model_toolbox
573e69979a77030004afe2df216893f556225454
[ "MIT" ]
1
2020-06-18T10:27:33.000Z
2020-06-18T10:27:33.000Z
generative_models_toolbox/vqvae2/sample.py
belkhir-nacim/generative_model_toolbox
573e69979a77030004afe2df216893f556225454
[ "MIT" ]
null
null
null
generative_models_toolbox/vqvae2/sample.py
belkhir-nacim/generative_model_toolbox
573e69979a77030004afe2df216893f556225454
[ "MIT" ]
null
null
null
import argparse import os import torch import torchvision.utils from tqdm import tqdm from .vqvae import VQVAE from .pixelsnail import PixelSNAIL @torch.no_grad() def sample_model(model, device, batch, size, temperature, condition=None): row = torch.zeros(batch, *size, dtype=torch.int64).to(device) cache = ...
26.893204
94
0.607581
import argparse import os import torch import torchvision.utils from tqdm import tqdm from .vqvae import VQVAE from .pixelsnail import PixelSNAIL @torch.no_grad() def sample_model(model, device, batch, size, temperature, condition=None): row = torch.zeros(batch, *size, dtype=torch.int64).to(device) cache = ...
true
true
f773438d7adfd99dc52d07efa6fd2cd9488e53a2
6,051
py
Python
tests/test_sns/test_subscriptions.py
jonnangle/moto-1
40b4e299abb732aad7f56cc0f680c0a272a46594
[ "Apache-2.0" ]
1
2020-01-13T21:45:21.000Z
2020-01-13T21:45:21.000Z
tests/test_sns/test_subscriptions.py
jonnangle/moto-1
40b4e299abb732aad7f56cc0f680c0a272a46594
[ "Apache-2.0" ]
17
2020-08-28T12:53:56.000Z
2020-11-10T01:04:46.000Z
tests/test_sns/test_subscriptions.py
jonnangle/moto-1
40b4e299abb732aad7f56cc0f680c0a272a46594
[ "Apache-2.0" ]
2
2017-03-02T05:59:52.000Z
2020-09-03T13:25:44.000Z
from __future__ import unicode_literals import boto import sure # noqa from moto import mock_sns_deprecated from moto.sns.models import DEFAULT_PAGE_SIZE @mock_sns_deprecated def test_creating_subscription(): conn = boto.connect_sns() conn.create_topic("some-topic") topics_json = conn.get_all_topics() ...
36.896341
83
0.734589
from __future__ import unicode_literals import boto import sure from moto import mock_sns_deprecated from moto.sns.models import DEFAULT_PAGE_SIZE @mock_sns_deprecated def test_creating_subscription(): conn = boto.connect_sns() conn.create_topic("some-topic") topics_json = conn.get_all_topics() top...
true
true
f773449937f9efb8d01f86b4cd0ffffacf54a31e
642
py
Python
packstack/version.py
lkpdn/packstack
1bbc8f730afdbbca8ac3b37e90bfac4e8b480828
[ "Apache-2.0" ]
190
2015-10-18T02:55:50.000Z
2019-04-28T01:44:51.000Z
packstack/version.py
lkpdn/packstack
1bbc8f730afdbbca8ac3b37e90bfac4e8b480828
[ "Apache-2.0" ]
4
2015-11-10T15:35:10.000Z
2019-03-09T23:00:32.000Z
packstack/version.py
lkpdn/packstack
1bbc8f730afdbbca8ac3b37e90bfac4e8b480828
[ "Apache-2.0" ]
91
2015-11-10T15:29:16.000Z
2019-03-09T22:46:14.000Z
# -*- coding: utf-8 -*- # 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, software...
35.666667
69
0.753894
import pbr.version version_info = pbr.version.VersionInfo('packstack')
true
true
f77344d01c9c08c1e9c17f3c6fe19d84bc6bcffe
7,663
py
Python
optimization/idStatusManager.py
garagonc/optimization-framework
1ca57699d6a3f2f98dcaea96430e75c3f847b49f
[ "Apache-2.0" ]
null
null
null
optimization/idStatusManager.py
garagonc/optimization-framework
1ca57699d6a3f2f98dcaea96430e75c3f847b49f
[ "Apache-2.0" ]
null
null
null
optimization/idStatusManager.py
garagonc/optimization-framework
1ca57699d6a3f2f98dcaea96430e75c3f847b49f
[ "Apache-2.0" ]
null
null
null
""" Created on Mai 10 16:21 2019 @author: nishit """ import json import os import time from utils_intern.constants import Constants from utils_intern.messageLogger import MessageLogger logger = MessageLogger.get_logger_parent() class IDStatusManager: @staticmethod def read_file(): path = "/usr/src/...
38.315
110
0.465875
import json import os import time from utils_intern.constants import Constants from utils_intern.messageLogger import MessageLogger logger = MessageLogger.get_logger_parent() class IDStatusManager: @staticmethod def read_file(): path = "/usr/src/app/optimization/resources/ids_status.txt" dat...
true
true
f773454b96984b11f75ec0dd88f969e4534f5ee1
736
py
Python
USACO/Training/1.2/gift1.py
raad1masum/Competitive-Programming
f4bc58f2bd370a398c37b9fe8ffbfac548a488b2
[ "MIT" ]
null
null
null
USACO/Training/1.2/gift1.py
raad1masum/Competitive-Programming
f4bc58f2bd370a398c37b9fe8ffbfac548a488b2
[ "MIT" ]
null
null
null
USACO/Training/1.2/gift1.py
raad1masum/Competitive-Programming
f4bc58f2bd370a398c37b9fe8ffbfac548a488b2
[ "MIT" ]
null
null
null
""" ID: raadw1 LANG: PYTHON3 TASK: gift1 """ from collections import OrderedDict accounts = OrderedDict() with open('gift1.in', 'r') as fin: NP = int(fin.readline()) for i in range(NP): accounts[fin.readline()] = 0 while True: giver = fin.readline() if not giver:...
21.028571
58
0.523098
from collections import OrderedDict accounts = OrderedDict() with open('gift1.in', 'r') as fin: NP = int(fin.readline()) for i in range(NP): accounts[fin.readline()] = 0 while True: giver = fin.readline() if not giver: break money, NG = map(int, fin.readlin...
true
true
f773460998f6891b73b5b167d28f900f01dae9f0
13,008
py
Python
pyheom/pyheom.py
tatsushi-ikeda/pyheom
d069fcf791959942b7a0357cda349d9976e06313
[ "BSD-3-Clause" ]
5
2021-06-21T18:15:34.000Z
2021-12-27T08:45:59.000Z
pyheom/pyheom.py
tatsushi-ikeda/pyheom
d069fcf791959942b7a0357cda349d9976e06313
[ "BSD-3-Clause" ]
null
null
null
pyheom/pyheom.py
tatsushi-ikeda/pyheom
d069fcf791959942b7a0357cda349d9976e06313
[ "BSD-3-Clause" ]
1
2021-11-15T01:12:12.000Z
2021-11-15T01:12:12.000Z
# # LibHEOM: Copyright (c) Tatsushi Ikeda # This library is distributed under BSD 3-Clause License. # See LINCENSE.txt for licence. # ------------------------------------------------------------------------ import enum import sys import numpy as np import scipy as sp import scipy.sparse import importlib pylibheom = ...
37.059829
127
0.480781
import enum import sys import numpy as np import scipy as sp import scipy.sparse import importlib pylibheom = importlib.import_module("pylibheom") from pyheom.noise_decomposition import * version = getattr(pylibheom, 'version')() __version__ = version unit = enum.Enum('unit', '''dimensionless femtosecond p...
true
true
f773461a9d738453e688ecdc299c814acff03382
2,788
py
Python
WarframeShawzin/core/classes/Sheet.py
kent010341/warframe-shawzin-tools
b33a2cec37fd00b175adfa74e769741929c0cdb0
[ "MIT" ]
null
null
null
WarframeShawzin/core/classes/Sheet.py
kent010341/warframe-shawzin-tools
b33a2cec37fd00b175adfa74e769741929c0cdb0
[ "MIT" ]
4
2021-08-13T05:55:03.000Z
2021-11-25T08:47:58.000Z
WarframeShawzin/core/classes/Sheet.py
kent010341/warframe-shawzin-tools
b33a2cec37fd00b175adfa74e769741929c0cdb0
[ "MIT" ]
null
null
null
from ..EncoderDecoder import encode_notes_list from ..Attributes import SCALE_DICT from .Note import Note class Sheet: def __init__(self, *args): if len(args) == 1: sheet_obj = args[0] if isinstance(sheet_obj, str): self._encoded_sheet = sheet_obj # f...
34.419753
127
0.587518
from ..EncoderDecoder import encode_notes_list from ..Attributes import SCALE_DICT from .Note import Note class Sheet: def __init__(self, *args): if len(args) == 1: sheet_obj = args[0] if isinstance(sheet_obj, str): self._encoded_sheet = sheet_obj ...
true
true
f77346b8de960ca4b2c8ff8c3968f95975b75c68
2,263
py
Python
scraper/News/spiders/biznews.py
marcusinthesky/Word2Risk
0212718369f04607a1b06c009df9e6cee29fe103
[ "Apache-2.0" ]
1
2018-02-28T12:48:38.000Z
2018-02-28T12:48:38.000Z
scraper/News/spiders/biznews.py
marcusinthesky/Word2Risk
0212718369f04607a1b06c009df9e6cee29fe103
[ "Apache-2.0" ]
null
null
null
scraper/News/spiders/biznews.py
marcusinthesky/Word2Risk
0212718369f04607a1b06c009df9e6cee29fe103
[ "Apache-2.0" ]
1
2018-02-28T12:49:03.000Z
2018-02-28T12:49:03.000Z
import scrapy import pandas as pd import os import requests from bs4 import BeautifulSoup class biznewsSpider(scrapy.Spider): name = "biznews" def __init__(self, *a, **kw): super(biznewsSpider, self).__init__(*a, **kw) path = os.path.join(os.path.expanduser("~"),"Documents","NMRQL","Scrape...
44.372549
199
0.57004
import scrapy import pandas as pd import os import requests from bs4 import BeautifulSoup class biznewsSpider(scrapy.Spider): name = "biznews" def __init__(self, *a, **kw): super(biznewsSpider, self).__init__(*a, **kw) path = os.path.join(os.path.expanduser("~"),"Documents","NMRQL","Scrape...
true
true
f773470a1802f2864b79f56d38be1de030ff86dc
1,477
py
Python
sympy/physics/tests/test_paulialgebra.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2020-09-09T20:40:17.000Z
2020-09-09T20:40:17.000Z
sympy/physics/tests/test_paulialgebra.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
14
2018-02-08T10:11:03.000Z
2019-04-16T10:32:46.000Z
sympy/physics/tests/test_paulialgebra.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2022-02-04T13:50:29.000Z
2022-02-04T13:50:29.000Z
from sympy.core.numbers import I from sympy.core.symbol import symbols from sympy.physics.paulialgebra import Pauli from sympy.testing.pytest import XFAIL from sympy.physics.quantum import TensorProduct sigma1 = Pauli(1) sigma2 = Pauli(2) sigma3 = Pauli(3) tau1 = symbols("tau1", commutative = False) def test_Pauli(...
25.465517
72
0.677725
from sympy.core.numbers import I from sympy.core.symbol import symbols from sympy.physics.paulialgebra import Pauli from sympy.testing.pytest import XFAIL from sympy.physics.quantum import TensorProduct sigma1 = Pauli(1) sigma2 = Pauli(2) sigma3 = Pauli(3) tau1 = symbols("tau1", commutative = False) def test_Pauli(...
true
true
f773473428bc7dd2693de41e6ec600ccee88c3b9
7,183
py
Python
servo/drv/active_v4_device.py
neverware-mirrors/hdctools
dd7f911bb9051e615af7fcb71d921bd481f934fb
[ "BSD-3-Clause" ]
null
null
null
servo/drv/active_v4_device.py
neverware-mirrors/hdctools
dd7f911bb9051e615af7fcb71d921bd481f934fb
[ "BSD-3-Clause" ]
null
null
null
servo/drv/active_v4_device.py
neverware-mirrors/hdctools
dd7f911bb9051e615af7fcb71d921bd481f934fb
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Driver for controlling the active servo v4 device.""" import time import hw_driver class activeV4DeviceError(hw_driver.HwDriverError): """Exceptio...
39.038043
80
0.702492
import time import hw_driver class activeV4DeviceError(hw_driver.HwDriverError): class activeV4Device(hw_driver.HwDriver): V4_DEVICES = {'ccd_cr50' : False, 'servo_micro' : True, 'c2d2': True} # This is a flag in CR50 board property, which shows EC-CR50 communication # support. BOARD_EC_CR50_COMM_SU...
true
true
f773485ec2a1f31bfed9005da240aadff170a46f
18,795
py
Python
gridpath/system/policy/fuel_burn_limits/fuel_burn_limit_balance.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
null
null
null
gridpath/system/policy/fuel_burn_limits/fuel_burn_limit_balance.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
null
null
null
gridpath/system/policy/fuel_burn_limits/fuel_burn_limit_balance.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2022 Blue Marble Analytics 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 ag...
32.517301
98
0.581591
import csv import os.path from pyomo.environ import Var, Constraint, NonNegativeReals, Expression, value from db.common_functions import spin_on_database_lock from gridpath.auxiliary.db_interface import setup_results_import from gridpath.auxiliary.dynamic_components import fuel_burn_balance_components def add_mod...
true
true
f7734936f495bcbfe53fb552c569d0aa2d096a70
6,434
py
Python
mongodb_store/scripts/replicator_node.py
hawesie/mongodb_store
2fe813ddf19a82a3d31f439e7571f7c152d8c9fb
[ "BSD-3-Clause" ]
null
null
null
mongodb_store/scripts/replicator_node.py
hawesie/mongodb_store
2fe813ddf19a82a3d31f439e7571f7c152d8c9fb
[ "BSD-3-Clause" ]
null
null
null
mongodb_store/scripts/replicator_node.py
hawesie/mongodb_store
2fe813ddf19a82a3d31f439e7571f7c152d8c9fb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides a service to store ROS message objects in a mongodb database in JSON. """ import rospy import actionlib import pymongo import os import shutil import subprocess from mongodb_store_msgs.msg import MoveEntriesAction, MoveEntriesFeedback from datetime import * ...
36.146067
144
0.631023
""" Provides a service to store ROS message objects in a mongodb database in JSON. """ import rospy import actionlib import pymongo import os import shutil import subprocess from mongodb_store_msgs.msg import MoveEntriesAction, MoveEntriesFeedback from datetime import * import mongodb_store.util MongoClient = mong...
false
true
f7734a4c590f46383600f07ac60d3bc448837255
4,279
py
Python
venv/Lib/site-packages/pyrogram/methods/messages/send_dice.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/pyrogram/methods/messages/send_dice.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/pyrogram/methods/messages/send_dice.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2020 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
40.367925
209
0.596635
from typing import Union from pyrogram import raw from pyrogram import types from pyrogram.scaffold import Scaffold class SendDice(Scaffold): async def send_dice( self, chat_id: Union[int, str], emoji: str = "🎲", disable_notification: bool = None, reply_to_message_id: in...
true
true
f7734c250916a6361ca50d206fcf1eee3819a55e
6,466
py
Python
tests/test_ordering.py
tmarenko/pabot
3c7be850417d30e579dccb22d861b75cc44e935c
[ "Apache-2.0" ]
null
null
null
tests/test_ordering.py
tmarenko/pabot
3c7be850417d30e579dccb22d861b75cc44e935c
[ "Apache-2.0" ]
null
null
null
tests/test_ordering.py
tmarenko/pabot
3c7be850417d30e579dccb22d861b75cc44e935c
[ "Apache-2.0" ]
null
null
null
import os import sys import tempfile import textwrap import unittest import shutil import subprocess class PabotOrderingGroupTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp() def tearDown(self): shutil.rmtree(self.tmpdir) def _run_tests_with(self, testfile, order...
34.57754
273
0.55815
import os import sys import tempfile import textwrap import unittest import shutil import subprocess class PabotOrderingGroupTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp() def tearDown(self): shutil.rmtree(self.tmpdir) def _run_tests_with(self, testfile, order...
true
true
f7734c4fdf2394f4cfdda37c5af2b5524b3af2e5
4,022
py
Python
atomate/qchem/firetasks/tests/test_critic2.py
Zhuoying/atomate
067023f0f740d3abac47b7ae7743c1c31eff8a06
[ "BSD-3-Clause-LBNL" ]
null
null
null
atomate/qchem/firetasks/tests/test_critic2.py
Zhuoying/atomate
067023f0f740d3abac47b7ae7743c1c31eff8a06
[ "BSD-3-Clause-LBNL" ]
null
null
null
atomate/qchem/firetasks/tests/test_critic2.py
Zhuoying/atomate
067023f0f740d3abac47b7ae7743c1c31eff8a06
[ "BSD-3-Clause-LBNL" ]
null
null
null
import json import os import shutil import unittest from monty.os.path import which from pymatgen.io.qchem.outputs import QCOutput from atomate.qchem.firetasks.critic2 import ProcessCritic2, RunCritic2 from atomate.utils.testing import AtomateTest __author__ = "Samuel Blau" __email__ = "samblau1@gmail.com" module_d...
31.920635
85
0.561164
import json import os import shutil import unittest from monty.os.path import which from pymatgen.io.qchem.outputs import QCOutput from atomate.qchem.firetasks.critic2 import ProcessCritic2, RunCritic2 from atomate.utils.testing import AtomateTest __author__ = "Samuel Blau" __email__ = "samblau1@gmail.com" module_d...
true
true
f7734c5231ac20af94f98bb85eb39ca961c4eba4
2,840
py
Python
deepcell/layers/location_test.py
esgomezm/deepcell-tf
6693c9ed7e76793561e6c2281437acaf3e4fa441
[ "Apache-2.0" ]
1
2020-06-24T23:04:14.000Z
2020-06-24T23:04:14.000Z
deepcell/layers/location_test.py
esgomezm/deepcell-tf
6693c9ed7e76793561e6c2281437acaf3e4fa441
[ "Apache-2.0" ]
null
null
null
deepcell/layers/location_test.py
esgomezm/deepcell-tf
6693c9ed7e76793561e6c2281437acaf3e4fa441
[ "Apache-2.0" ]
1
2020-06-24T23:04:26.000Z
2020-06-24T23:04:26.000Z
# Copyright 2016-2019 The Van Valen Lab at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License");...
39.444444
80
0.665493
from __future__ import absolute_import from __future__ import print_function from __future__ import division from tensorflow.python.keras import keras_parameterized from tensorflow.python.platform import test from deepcell.utils import testing_utils from deepcell import layers @keras_parameterized.run_all_keras_mod...
true
true
f7734f0d441526169245bdd9512e253bdda9a036
95
py
Python
server/utils/xdata.py
KohlbacherLab/deregnet-rest
d512e04b66556fbb52a49e9da465af01ebfdd78a
[ "BSD-3-Clause" ]
null
null
null
server/utils/xdata.py
KohlbacherLab/deregnet-rest
d512e04b66556fbb52a49e9da465af01ebfdd78a
[ "BSD-3-Clause" ]
null
null
null
server/utils/xdata.py
KohlbacherLab/deregnet-rest
d512e04b66556fbb52a49e9da465af01ebfdd78a
[ "BSD-3-Clause" ]
1
2018-01-30T18:38:56.000Z
2018-01-30T18:38:56.000Z
import connexion def consumer_id(): return connexion.request.headers.get('X-Consumer-ID')
19
57
0.757895
import connexion def consumer_id(): return connexion.request.headers.get('X-Consumer-ID')
true
true
f7735006d77e368a3bb5c8448b6942c73cc144ef
5,331
py
Python
rstbx/viewer/results_base.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
2
2021-03-18T12:31:57.000Z
2022-03-14T06:27:06.000Z
rstbx/viewer/results_base.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
null
null
null
rstbx/viewer/results_base.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
1
2021-03-26T12:52:30.000Z
2021-03-26T12:52:30.000Z
from __future__ import absolute_import, division, print_function from libtbx import easy_pickle from libtbx.utils import Sorry import re import os from functools import cmp_to_key from past.builtins import cmp from six.moves import zip class result(object): def __init__(self, dir_name): self.dir_name = dir_name...
31.544379
78
0.665729
from __future__ import absolute_import, division, print_function from libtbx import easy_pickle from libtbx.utils import Sorry import re import os from functools import cmp_to_key from past.builtins import cmp from six.moves import zip class result(object): def __init__(self, dir_name): self.dir_name = dir_name...
true
true
f77350a6ae3807f4f5d9ec00f89feb7f8ddcbbb3
5,772
py
Python
visualization/conflicts_listener.py
gesiscss/wikiwho_demo
1549a63dc9714c1a813a77dcad481a69cd28dfcd
[ "MIT" ]
4
2019-04-02T12:02:37.000Z
2019-12-16T13:43:39.000Z
visualization/conflicts_listener.py
gesiscss/wikiwho_demo
1549a63dc9714c1a813a77dcad481a69cd28dfcd
[ "MIT" ]
null
null
null
visualization/conflicts_listener.py
gesiscss/wikiwho_demo
1549a63dc9714c1a813a77dcad481a69cd28dfcd
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import plotly from plotly import graph_objs class ConflictsListener(): def __init__(self, df): # time diff to seconds #df['diff_secs'] = df['time_diff'].dt.total_seconds() # conflict time diff to seconds #df['diff_secs_confl'] = np.nan ...
38.48
103
0.471414
import pandas as pd import numpy as np import plotly from plotly import graph_objs class ConflictsListener(): def __init__(self, df): self.df = df self.df_plotted = None def listen(self, _range, granularity, black, red): df = self.df ...
true
true
f77350db8f2d641a8410cf103d0e4cd59093c435
25,725
py
Python
apps/recurring_donations/migrations/0003_auto__chg_field_monthlyorder_amount__chg_field_monthlydonation_amount.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
7
2015-01-02T19:31:14.000Z
2021-03-22T17:30:23.000Z
apps/recurring_donations/migrations/0003_auto__chg_field_monthlyorder_amount__chg_field_monthlydonation_amount.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
1
2015-03-06T08:34:59.000Z
2015-03-06T08:34:59.000Z
apps/recurring_donations/migrations/0003_auto__chg_field_monthlyorder_amount__chg_field_monthlydonation_amount.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'MonthlyOrder.amount' db.alter_column(u'recurring_donations_monthlyorder', 'amount', self....
88.099315
197
0.567969
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.alter_column(u'recurring_donations_monthlyorder', 'amount', self.gf('django.db.models.fields.DecimalField')(max_digits=16, decim...
true
true
f77351b5c02a82190b90d4e462b03800d2e2cab4
6,914
py
Python
mediagoblin/tools/translate.py
odinho/mediagoblin
2c7698614da73f1e146ab5d6f499b161da1ef105
[ "CC0-1.0" ]
3
2016-12-26T02:30:07.000Z
2017-05-25T11:54:31.000Z
mediagoblin/tools/translate.py
odinho/mediagoblin
2c7698614da73f1e146ab5d6f499b161da1ef105
[ "CC0-1.0" ]
null
null
null
mediagoblin/tools/translate.py
odinho/mediagoblin
2c7698614da73f1e146ab5d6f499b161da1ef105
[ "CC0-1.0" ]
null
null
null
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
31.715596
80
0.681082
import gettext import pkg_resources from babel import localedata from babel.support import LazyProxy from mediagoblin import mg_globals AVAILABLE_LOCALES = None TRANSLATIONS_PATH = pkg_resources.resource_filename( 'mediagoblin', 'i18n') KNOWN_RTL = set(["ar", "fa", "he", "iw", "ur", "yi", "ji"]) def is_rtl(...
true
true