hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71a7ea56d84335a1f6f15af7d71e033e8ced3a1
996
py
Python
tests/test_inference.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
21
2022-01-11T14:06:25.000Z
2022-03-29T06:42:13.000Z
tests/test_inference.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
13
2022-02-15T20:05:18.000Z
2022-02-15T20:05:21.000Z
tests/test_inference.py
weiyx16/mmsegmentation
6d35d76195f173fbc6b119a7d7815e67d78024c6
[ "Apache-2.0" ]
11
2022-01-11T16:05:24.000Z
2022-03-17T01:58:52.000Z
# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import mmcv from mmseg.apis import inference_segmentor, init_segmentor def test_test_time_augmentation_on_cpu(): config_file = 'configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py' config = mmcv.Config.fromfile(config_file) # Rem...
32.129032
75
0.73494
import os.path as osp import mmcv from mmseg.apis import inference_segmentor, init_segmentor def test_test_time_augmentation_on_cpu(): config_file = 'configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py' config = mmcv.Config.fromfile(config_file) config.model.pretrained = None norm_cf...
true
true
f71a801eee241a74789c0995cf4813e2cdb9335f
19,958
py
Python
sdks/python/apache_beam/io/gcp/datastore/v1new/datastoreio.py
RusOr10n/beam
ede14d4aa7d239f74d5565a28a7c4433eaaa7d47
[ "Apache-2.0" ]
1
2019-12-05T04:36:46.000Z
2019-12-05T04:36:46.000Z
sdks/python/apache_beam/io/gcp/datastore/v1new/datastoreio.py
RusOr10n/beam
ede14d4aa7d239f74d5565a28a7c4433eaaa7d47
[ "Apache-2.0" ]
14
2020-02-12T22:20:41.000Z
2021-11-09T19:41:23.000Z
sdks/python/apache_beam/io/gcp/datastore/v1new/datastoreio.py
violalyu/beam
dd605e568d70b1a6ebea60c15b2aec3e240f3914
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
38.980469
80
0.702225
from __future__ import absolute_import from __future__ import division import logging import time from builtins import round from apache_beam import typehints from apache_beam.io.gcp.datastore.v1 import util from apache_beam.io.gcp.datastore.v1.adaptive_throttler import AdaptiveThrottler from apache_...
true
true
f71a808666b13ce290442e22bb59d1788d36b370
1,950
py
Python
tools/find_run_binary.py
pospx/external_skia
7a135275c9fc2a4b3cbdcf9a96e7102724752234
[ "BSD-3-Clause" ]
6,304
2015-01-05T23:45:12.000Z
2022-03-31T09:48:13.000Z
third_party/skia/tools/find_run_binary.py
w4454962/miniblink49
b294b6eacb3333659bf7b94d670d96edeeba14c0
[ "Apache-2.0" ]
459
2016-09-29T00:51:38.000Z
2022-03-07T14:37:46.000Z
third_party/skia/tools/find_run_binary.py
w4454962/miniblink49
b294b6eacb3333659bf7b94d670d96edeeba14c0
[ "Apache-2.0" ]
1,231
2015-01-05T03:17:39.000Z
2022-03-31T22:54:58.000Z
#!/usr/bin/python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module that finds and runs a binary by looking in the likely locations.""" import os import subprocess import sys def run_comman...
31.451613
77
0.615385
import os import subprocess import sys def run_command(args): proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = proc.communicate() if proc.returncode is not 0: raise Exception('command "%s" failed: %s' ...
true
true
f71a80a3465b00ac689f97b6980266f31c3f42cb
1,463
py
Python
medium/binary-tree-level-order-traversal.py
therealabdi2/LeetcodeQuestions
4c45ee836482a2c7b59906f7a7a99b5b3fa17317
[ "MIT" ]
null
null
null
medium/binary-tree-level-order-traversal.py
therealabdi2/LeetcodeQuestions
4c45ee836482a2c7b59906f7a7a99b5b3fa17317
[ "MIT" ]
null
null
null
medium/binary-tree-level-order-traversal.py
therealabdi2/LeetcodeQuestions
4c45ee836482a2c7b59906f7a7a99b5b3fa17317
[ "MIT" ]
null
null
null
''' Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[3],[9,20],[15,7]] Example 2: Input: root = [1] Output: [[1]] Example 3: Input: root = [] Output: [] ''' # Definition...
22.859375
87
0.548189
import collections from collections import deque from typing import Optional, List class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]:...
true
true
f71a8102f3baad74119a666239cf334a1a7047ff
23,415
py
Python
sfa_dash/conftest.py
lboeman/solarforecastarbiter_dashboard
cd4dcffa922625b548d93f83be2b7c10457e1bbe
[ "MIT" ]
4
2020-06-02T01:40:40.000Z
2021-06-01T20:15:00.000Z
sfa_dash/conftest.py
lboeman/solarforecastarbiter_dashboard
cd4dcffa922625b548d93f83be2b7c10457e1bbe
[ "MIT" ]
181
2020-05-14T15:42:55.000Z
2021-12-02T20:27:44.000Z
sfa_dash/conftest.py
lboeman/solarforecastarbiter_dashboard
cd4dcffa922625b548d93f83be2b7c10457e1bbe
[ "MIT" ]
2
2018-11-02T19:32:16.000Z
2018-11-06T17:06:28.000Z
import os import requests import pymysql import pytest from flask import url_for from solarforecastarbiter.datamodel import QualityFlagFilter as QFF from sfa_dash import create_app BASE_URL = 'http://localhost' resample_threshold = QFF.resample_threshold_percentage @pytest.fixture(scope='session') def auth_toke...
33.690647
2,216
0.658808
import os import requests import pymysql import pytest from flask import url_for from solarforecastarbiter.datamodel import QualityFlagFilter as QFF from sfa_dash import create_app BASE_URL = 'http://localhost' resample_threshold = QFF.resample_threshold_percentage @pytest.fixture(scope='session') def auth_toke...
true
true
f71a810dff951c596883e731538ad5809e7693d4
676
py
Python
pyutilscr/check.py
GoodMusic8596/pyutilscr
5965d3ab66767e2ef14ab119739b673859bbab81
[ "MIT" ]
1
2021-12-25T16:09:41.000Z
2021-12-25T16:09:41.000Z
pyutilscr/check.py
GoodMusic8596/pyutilscr
5965d3ab66767e2ef14ab119739b673859bbab81
[ "MIT" ]
null
null
null
pyutilscr/check.py
GoodMusic8596/pyutilscr
5965d3ab66767e2ef14ab119739b673859bbab81
[ "MIT" ]
null
null
null
import glob def search(directory, searchElem:list, extension = ".txt"): """Searches files in a specified directory and checks if they contain the specified elements. directory format: /home/runner/project directory type: folder element type: list extensions requirments: MUST have a period bef...
28.166667
94
0.690828
import glob def search(directory, searchElem:list, extension = ".txt"): files = glob.glob(directory+"*"+extension) files_detected = [] for file in files: sf = open(file) stored = sf.read() for elem in searchElem: if elem in stored: files_detected.append(file) return files_detected
true
true
f71a812d7ff386f03ab0d70d638640016bdd2c44
3,007
py
Python
air_pollution_death_rate_related/scripts/air_pollution/predict_aqi.py
nghitrampham/air_pollution_death_rate_related
3fd72b9684e8362de5706ba37c1d90b844d4afe0
[ "MIT" ]
null
null
null
air_pollution_death_rate_related/scripts/air_pollution/predict_aqi.py
nghitrampham/air_pollution_death_rate_related
3fd72b9684e8362de5706ba37c1d90b844d4afe0
[ "MIT" ]
15
2019-12-10T02:05:58.000Z
2022-03-12T00:06:38.000Z
air_pollution_death_rate_related/scripts/air_pollution/predict_aqi.py
nghitrampham/CSE583_FinalProject
3fd72b9684e8362de5706ba37c1d90b844d4afe0
[ "MIT" ]
1
2020-06-04T17:48:21.000Z
2020-06-04T17:48:21.000Z
""" This module is used to predict the Air Quality Index model for 2019 for all counties. """ import pickle import warnings import pandas as pd import numpy as np from keras.models import load_model import helpers warnings.filterwarnings("ignore") def main(): data2019_raw = pd.read_csv("""air_pollution_death_r...
36.228916
96
0.606252
import pickle import warnings import pandas as pd import numpy as np from keras.models import load_model import helpers warnings.filterwarnings("ignore") def main(): data2019_raw = pd.read_csv("""air_pollution_death_rate_related/data/air_pollution/ data_air_raw/daily_aqi_by_coun...
true
true
f71a8190b09e04bc1e4e8dc5cf8762becc12f3bd
2,108
py
Python
office365/directory/identities/userflows/language_configuration.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
office365/directory/identities/userflows/language_configuration.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
office365/directory/identities/userflows/language_configuration.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
from office365.directory.identities.userflows.language_page import UserFlowLanguagePage from office365.entity import Entity from office365.entity_collection import EntityCollection from office365.runtime.resource_path import ResourcePath class UserFlowLanguageConfiguration(Entity): """Allows a user flow to suppor...
41.333333
113
0.65797
from office365.directory.identities.userflows.language_page import UserFlowLanguagePage from office365.entity import Entity from office365.entity_collection import EntityCollection from office365.runtime.resource_path import ResourcePath class UserFlowLanguageConfiguration(Entity): @property def display_name...
true
true
f71a821c13b082b4b5b3c1c3dd849583b82123e0
4,830
py
Python
detect_secrets/core/baseline.py
paulo-sampaio/detect-secrets
73ffbc35a72cb316d9e1842cc131b6098cf3c36a
[ "Apache-2.0" ]
2,212
2018-04-03T20:58:42.000Z
2022-03-31T17:58:38.000Z
detect_secrets/core/baseline.py
paulo-sampaio/detect-secrets
73ffbc35a72cb316d9e1842cc131b6098cf3c36a
[ "Apache-2.0" ]
354
2018-04-03T16:29:55.000Z
2022-03-31T18:26:26.000Z
detect_secrets/core/baseline.py
paulo-sampaio/detect-secrets
73ffbc35a72cb316d9e1842cc131b6098cf3c36a
[ "Apache-2.0" ]
298
2018-04-02T19:35:15.000Z
2022-03-28T04:52:14.000Z
import json import time from typing import Any from typing import Callable from typing import cast from typing import Dict from typing import List from typing import Optional from typing import Union from . import upgrades from ..__version__ import VERSION from ..exceptions import UnableToReadBaselineError from ..sett...
32.635135
97
0.69089
import json import time from typing import Any from typing import Callable from typing import cast from typing import Dict from typing import List from typing import Optional from typing import Union from . import upgrades from ..__version__ import VERSION from ..exceptions import UnableToReadBaselineError from ..sett...
true
true
f71a825a050d1c91553d9c34bfd983037a77f740
1,367
py
Python
app/core/tests/test_admin.py
tarcisioLima/recipe-app-api
62e5dfa49c0b4bd400454e78d0c0bea673f32f58
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
tarcisioLima/recipe-app-api
62e5dfa49c0b4bd400454e78d0c0bea673f32f58
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
tarcisioLima/recipe-app-api
62e5dfa49c0b4bd400454e78d0c0bea673f32f58
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): """A funcion that executes before all tests""" def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_supe...
31.790698
68
0.640088
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='test2@test.com', ...
true
true
f71a82a3be56b6be5477fc4c0651779ed08eab77
3,249
py
Python
src/state.py
Amayas29/pyautomate
ea966348ea9d7ec153274bd7e2266bd50131cd3d
[ "MIT" ]
1
2021-03-24T21:12:56.000Z
2021-03-24T21:12:56.000Z
src/state.py
Amayas29/pyautomate
ea966348ea9d7ec153274bd7e2266bd50131cd3d
[ "MIT" ]
null
null
null
src/state.py
Amayas29/pyautomate
ea966348ea9d7ec153274bd7e2266bd50131cd3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class State : """ Classe définissant un état caractérisée par : - un identifiant - un booleen pour savoir si c'est un état initial - un booleen pour savoir si c'est un état final - un label utilisé pour les constructions ou il faut memorise...
29.536364
75
0.515851
class State : def __init__ (self, id, init, fin, label=None) : self.id = id self.init = init self.fin = fin if label == None : self.label = str(self.id) else : self.label =label def __repr__(self) : ret = str(...
true
true
f71a82c5e1e63b262c2a25dc6c75f427f5c4eea8
8,829
py
Python
deep-clustering-conv-autoencoder/main.py
positivevaib/semi-supervised-imagenet-classification
4fb6427f5a72951c1b866a1ddbc2599811bb5770
[ "MIT" ]
null
null
null
deep-clustering-conv-autoencoder/main.py
positivevaib/semi-supervised-imagenet-classification
4fb6427f5a72951c1b866a1ddbc2599811bb5770
[ "MIT" ]
null
null
null
deep-clustering-conv-autoencoder/main.py
positivevaib/semi-supervised-imagenet-classification
4fb6427f5a72951c1b866a1ddbc2599811bb5770
[ "MIT" ]
null
null
null
# import import numpy as np import sklearn as skl import sklearn.cluster as cluster import sklearn.metrics as metrics import torch import torch.distributions.kl as kl import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as data import torchvision import torchvision.d...
29.727273
79
0.581493
import numpy as np import sklearn as skl import sklearn.cluster as cluster import sklearn.metrics as metrics import torch import torch.distributions.kl as kl import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as data import torchvision import torchvision.datasets ...
true
true
f71a8324690c575db20b997daa92e561d98a87c5
21,037
py
Python
wsgidav/samples/mysql_dav_provider.py
KnoooW/wsgidav
2cf357f72d2c835f376f2c1295897cb879ef6bc1
[ "MIT" ]
1
2021-12-29T08:27:04.000Z
2021-12-29T08:27:04.000Z
wsgidav/samples/mysql_dav_provider.py
KnoooW/wsgidav
2cf357f72d2c835f376f2c1295897cb879ef6bc1
[ "MIT" ]
null
null
null
wsgidav/samples/mysql_dav_provider.py
KnoooW/wsgidav
2cf357f72d2c835f376f2c1295897cb879ef6bc1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # (c) 2009-2021 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Original PyFileServer (c) 2005 Ho Chun Wei. # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Implementation of a WebDAV provider that provides a very basic, read-...
34.657331
95
0.553216
import csv import hashlib import time from io import StringIO import MySQLdb from wsgidav import util from wsgidav.dav_error import ( HTTP_FORBIDDEN, DAVError, PRECONDITION_CODE_ProtectedProperty, ) from wsgidav.dav_provider import DAVProvider, _DAVResource __docformat__ = "reStructuredText" _logg...
true
true
f71a833507215096556a8d151f20ec58347e380e
1,804
py
Python
meraki_sdk/models/switch_profile_port_model.py
meraki/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
37
2019-04-24T14:01:33.000Z
2022-01-28T01:37:21.000Z
meraki_sdk/models/switch_profile_port_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
10
2019-07-09T16:35:11.000Z
2021-12-07T03:47:53.000Z
meraki_sdk/models/switch_profile_port_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
17
2019-04-30T23:53:21.000Z
2022-02-07T22:57:44.000Z
# -*- coding: utf-8 -*- """ meraki_sdk This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ class SwitchProfilePortModel(object): """Implementation of the 'SwitchProfilePort' model. TODO: type model description here. Attributes: ...
27.333333
95
0.583703
class SwitchProfilePortModel(object): _names = { "profile":'profile', "port_id":'portId' } def __init__(self, profile=None, port_id=None): self.profile = profile self.port_id = port_id @classmeth...
true
true
f71a8426ac96ef7e52fb2b1c74212768cb00e3c5
497
py
Python
sprites/blocker.py
ErezOr18/pygame-space-invaders
f2e129bb2e2e18470599573910e6cad34f501df8
[ "MIT" ]
null
null
null
sprites/blocker.py
ErezOr18/pygame-space-invaders
f2e129bb2e2e18470599573910e6cad34f501df8
[ "MIT" ]
null
null
null
sprites/blocker.py
ErezOr18/pygame-space-invaders
f2e129bb2e2e18470599573910e6cad34f501df8
[ "MIT" ]
null
null
null
from pygame import * class Blocker(sprite.Sprite): def __init__(self, size, color, row, column): sprite.Sprite.__init__(self) self.height = size self.width = size self.color = color self.image = Surface((self.width, self.height)) self.image.fill(self.color) ...
27.611111
55
0.607646
from pygame import * class Blocker(sprite.Sprite): def __init__(self, size, color, row, column): sprite.Sprite.__init__(self) self.height = size self.width = size self.color = color self.image = Surface((self.width, self.height)) self.image.fill(self.color) ...
true
true
f71a84f7b27fecc7c26682e691d6999bc0138353
245
py
Python
chaptertwo/famousquote2.py
cmotek/python_crashcourse
29cbdd6699cd17192bb599d235852d547630d110
[ "Apache-2.0" ]
null
null
null
chaptertwo/famousquote2.py
cmotek/python_crashcourse
29cbdd6699cd17192bb599d235852d547630d110
[ "Apache-2.0" ]
null
null
null
chaptertwo/famousquote2.py
cmotek/python_crashcourse
29cbdd6699cd17192bb599d235852d547630d110
[ "Apache-2.0" ]
null
null
null
famousauthor = "Herman Melville" print(famousauthor + ' wrote in Moby Dick, "Now then, thought I, unconsciously rolling up the sleeves of my frock, here goes a cool, collected dive at death and destruction, and the devil fetch the hindmost."')
61.25
210
0.767347
famousauthor = "Herman Melville" print(famousauthor + ' wrote in Moby Dick, "Now then, thought I, unconsciously rolling up the sleeves of my frock, here goes a cool, collected dive at death and destruction, and the devil fetch the hindmost."')
true
true
f71a8535015df8c0b0c3d55332640c315d8527a4
162,189
py
Python
jp.atcoder/abc081/arc086_b/17664033.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc081/arc086_b/17664033.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc081/arc086_b/17664033.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import itertools import math import string import sys from bisect import bisect_left as bi_l from bisect import bisect_right as bi_r from collections import Counter, defaultdict, deque from functools import lru_cache, reduce from heapq import heapify, heappop, heappush from operator import or_, xor sys.setr...
30.567094
1,217
0.35524
import itertools import math import string import sys from bisect import bisect_left as bi_l from bisect import bisect_right as bi_r from collections import Counter, defaultdict, deque from functools import lru_cache, reduce from heapq import heapify, heappop, heappush from operator import or_, xor sys.setr...
true
true
f71a85be328989ab5fd1d62bb8e59c2c2b19ba47
3,607
py
Python
src/ekpmeasure/experiments/ferroelectric/_switching/core.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
src/ekpmeasure/experiments/ferroelectric/_switching/core.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
src/ekpmeasure/experiments/ferroelectric/_switching/core.py
cjfinnell/ekpmeasure
e6611c053cad28e06f4f8a94764ebe3805cddb15
[ "MIT" ]
null
null
null
from ....control import core from ....control.instruments.berkeleynucleonics765 import stop from ..switching import preset_run_function import pandas as pd import numpy as np import os import warnings import time __all__ = ("FE",) class FE(core.experiment): """Experiment class for running pulsed Ferroelectric ...
36.806122
174
0.540061
from ....control import core from ....control.instruments.berkeleynucleonics765 import stop from ..switching import preset_run_function import pandas as pd import numpy as np import os import warnings import time __all__ = ("FE",) class FE(core.experiment): def __init__(self, pg, scope, scopetype="6604", run_...
true
true
f71a85f2c607d66f8e6260e04b8ed45d7f51a744
116
py
Python
plots/w.py
Tethik/whistleblower
56747cbf3c4eda95cee7eded36b4a853d33d6ee3
[ "MIT" ]
1
2016-06-20T12:35:42.000Z
2016-06-20T12:35:42.000Z
plots/w.py
Tethik/whistleblower
56747cbf3c4eda95cee7eded36b4a853d33d6ee3
[ "MIT" ]
null
null
null
plots/w.py
Tethik/whistleblower
56747cbf3c4eda95cee7eded36b4a853d33d6ee3
[ "MIT" ]
null
null
null
def w(j, p): return 4 * j * (1 - p) for p in [0.5, 0.75, 0.99]: print([w(j, p)*24*7 for j in [5, 20, 50]])
19.333333
46
0.448276
def w(j, p): return 4 * j * (1 - p) for p in [0.5, 0.75, 0.99]: print([w(j, p)*24*7 for j in [5, 20, 50]])
true
true
f71a8614737b2fe5ad5b8e12f3668178f8d6c600
8,334
py
Python
mindspore/ops/operations/__init__.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
mindspore/ops/operations/__init__.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
mindspore/ops/operations/__init__.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
27.78
117
0.583033
from .array_ops import (Argmax, Argmin, Cast, Concat, Pack, Unpack, Diag, DiagPart, DType, ExpandDims, Eye, Fill, GatherNd, GatherV2, InvertPermutation, IsInstance, IsSubClass, ArgMaxWithValue, OnesLike, ZerosLike, ...
true
true
f71a86b512e65c17c14cf1e55832bd7b556b892d
284,631
py
Python
tt.py
someone120/some-py
a14732b9fde52d5476e4a433e3eecea8ea3eeaec
[ "Apache-2.0" ]
null
null
null
tt.py
someone120/some-py
a14732b9fde52d5476e4a433e3eecea8ea3eeaec
[ "Apache-2.0" ]
null
null
null
tt.py
someone120/some-py
a14732b9fde52d5476e4a433e3eecea8ea3eeaec
[ "Apache-2.0" ]
null
null
null
import json a=""" [ { "_id": 1, "id": 1, "pid": 0, "city_code": "101010100", "city_name": "北京" }, { "_id": 2, "id": 2, "pid": 0, "city_code": "", "city_name": "安徽" }, { "_id": 3, "id": 3, "pid": 0, "city_code": "", "city_name": "福建" }, { "_id...
15.661439
30
0.434654
import json a=""" [ { "_id": 1, "id": 1, "pid": 0, "city_code": "101010100", "city_name": "北京" }, { "_id": 2, "id": 2, "pid": 0, "city_code": "", "city_name": "安徽" }, { "_id": 3, "id": 3, "pid": 0, "city_code": "", "city_name": "福建" }, { "_id...
true
true
f71a872cde99c049e202b8d9270f4ff266420483
3,749
gyp
Python
sync/sync.gyp
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
sync/sync.gyp
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-02-14T21:55:58.000Z
2017-02-14T21:55:58.000Z
sync/sync.gyp
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'includes': [ 'sync_android.gypi', 'sync_tests.gypi', ], 'conditions': [ # Notes: # 1...
27.77037
80
0.497999
{ 'variables': { 'chromium_code': 1, }, 'includes': [ 'sync_android.gypi', 'sync_tests.gypi', ], 'conditions': [ ['component=="static_library"', { 'targets': [ { 'target_name': 'sync', 'type': 'none',...
true
true
f71a87d374e64809b39fcfe0bfb79d5e0281482c
641
py
Python
dkey/__init__.py
NOhs/dkey
5305e0028a858d7ec7cdf4889783650b026ad4f5
[ "MIT" ]
2
2019-01-18T19:53:07.000Z
2019-02-01T12:30:45.000Z
dkey/__init__.py
NOhs/dkey
5305e0028a858d7ec7cdf4889783650b026ad4f5
[ "MIT" ]
15
2019-01-14T18:11:20.000Z
2019-03-30T14:22:35.000Z
dkey/__init__.py
NOhs/dkey
5305e0028a858d7ec7cdf4889783650b026ad4f5
[ "MIT" ]
1
2019-02-01T21:51:15.000Z
2019-02-01T21:51:15.000Z
"""Module containing tools to deprecate the use of selected keys in a given dictionary. This module provides: deprecate_keys ============== Class to wrap a dict to deprecate some keys in it. dkey ==== Function to generate deprecated keys. __version__ =========== A string indicating which version of dkey is currentl...
21.366667
87
0.74415
from ._dkey import deprecate_keys as deprecate_keys from ._dkey import dkey as dkey from pbr.version import VersionInfo _v = VersionInfo('mgen').semantic_version() __version__ = _v.release_string() version_info = _v.version_tuple()
true
true
f71a87fef420481a4397ce77f7a2bd37c708dd91
6,159
py
Python
pydec/math/kd_tree.py
hirani/pydec
0574d1148952510b0e59b1f5cb1d9a673193be7f
[ "BSD-3-Clause" ]
49
2016-07-03T14:40:48.000Z
2022-03-08T01:33:03.000Z
pydec/math/kd_tree.py
hirani/pydec
0574d1148952510b0e59b1f5cb1d9a673193be7f
[ "BSD-3-Clause" ]
4
2016-09-16T18:51:06.000Z
2020-06-20T03:53:24.000Z
pydec/math/kd_tree.py
hirani/pydec
0574d1148952510b0e59b1f5cb1d9a673193be7f
[ "BSD-3-Clause" ]
15
2015-09-26T20:06:57.000Z
2021-06-21T17:01:02.000Z
__all__ = ['kd_tree'] from math import sqrt from heapq import heappush,heappop class kd_tree: class node: def point_distance(self,point): return sqrt(sum([ (a - b)**2 for (a,b) in zip(point,self.point)])) def separator_distance(self,point): return point[self.axis] - self.p...
30.339901
102
0.539211
__all__ = ['kd_tree'] from math import sqrt from heapq import heappush,heappop class kd_tree: class node: def point_distance(self,point): return sqrt(sum([ (a - b)**2 for (a,b) in zip(point,self.point)])) def separator_distance(self,point): return point[self.axis] - self.p...
true
true
f71a88666c1fd19fd83b8b1279071950abcd31d2
3,505
py
Python
model/config.py
yhl111/PCNN
2e0967aec962d55df1eb7d149a44b91c6c751a1a
[ "Apache-2.0" ]
99
2018-05-19T03:59:47.000Z
2022-03-17T07:25:10.000Z
model/config.py
yhl111/PCNN
2e0967aec962d55df1eb7d149a44b91c6c751a1a
[ "Apache-2.0" ]
10
2018-05-21T13:16:42.000Z
2022-03-26T06:06:51.000Z
model/config.py
yhl111/PCNN
2e0967aec962d55df1eb7d149a44b91c6c751a1a
[ "Apache-2.0" ]
38
2018-05-19T10:20:57.000Z
2022-01-25T12:37:08.000Z
import os import numpy as np from .general_utils import get_logger from .data_utils import load_vocab, get_processing_word class Config(): def __init__(self, load=True): """Initialize hyperparameters and load vocabs Args: load_embeddings: (bool) if True, load embeddings into ...
31.294643
87
0.653067
import os import numpy as np from .general_utils import get_logger from .data_utils import load_vocab, get_processing_word class Config(): def __init__(self, load=True): if not os.path.exists(self.dir_output): os.makedirs(self.dir_output) self.logger = get_logger(sel...
true
true
f71a89aa8b0e3fea02389bae72a1e0206e098bc4
4,846
py
Python
tests/algorithms/test_tracking_smoothing.py
thompson318/scikit-surgerycore
22867073a5a3e87def68b4a76e70fe54d085be32
[ "BSD-3-Clause" ]
3
2020-09-26T18:19:49.000Z
2021-09-19T08:43:00.000Z
tests/algorithms/test_tracking_smoothing.py
thompson318/scikit-surgerycore
22867073a5a3e87def68b4a76e70fe54d085be32
[ "BSD-3-Clause" ]
45
2020-04-27T09:12:28.000Z
2020-04-27T09:50:49.000Z
tests/algorithms/test_tracking_smoothing.py
SciKit-Surgery/scikit-surgerycore
22867073a5a3e87def68b4a76e70fe54d085be32
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for BARD pointer module""" import math import numpy as np import pytest import sksurgerycore.algorithms.tracking_smoothing as reg def test_rvec_to_quaterion(): """ Does it convert correctly """ #a 90 degree rotation about the x axis rvec = np.array([math.pi/2.0, ...
27.691429
107
0.636401
import math import numpy as np import pytest import sksurgerycore.algorithms.tracking_smoothing as reg def test_rvec_to_quaterion(): rvec = np.array([math.pi/2.0, 0.0, 0.0]) quaternion = reg._rvec_to_quaternion(rvec) assert quaternion[0] == math.cos(math.pi/4.0) assert quaternion[1] == 1.0 *...
true
true
f71a8a1a3d48005a0ee4af6cf7d83fd52dcee595
1,223
py
Python
web/playlists/migrations/0001__initial.py
vtalks/vtalks.net
80fb19ff9684e0854c6abe5f0eef73e80ec326a6
[ "Apache-2.0" ]
1
2017-11-28T03:17:23.000Z
2017-11-28T03:17:23.000Z
web/playlists/migrations/0001__initial.py
vtalks/vtalks.net
80fb19ff9684e0854c6abe5f0eef73e80ec326a6
[ "Apache-2.0" ]
56
2018-01-14T18:03:03.000Z
2018-06-25T17:59:02.000Z
web/playlists/migrations/0001__initial.py
vtalks/vtalks.net
80fb19ff9684e0854c6abe5f0eef73e80ec326a6
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.2 on 2018-02-23 08:56 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Playlists', fields=[ ...
35.970588
114
0.578087
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Playlists', fields=[ ('id', models.AutoField(auto_created=Tru...
true
true
f71a8adea750a9a9bae32bcd140b26a2c336c2a6
3,692
py
Python
trees-and-graphs/minimal-tree.py
georgeRenard/CrackingTheCodingInterview
ba9866e8e7a8c9942464d76b13af08ea6b15f3f9
[ "MIT" ]
null
null
null
trees-and-graphs/minimal-tree.py
georgeRenard/CrackingTheCodingInterview
ba9866e8e7a8c9942464d76b13af08ea6b15f3f9
[ "MIT" ]
null
null
null
trees-and-graphs/minimal-tree.py
georgeRenard/CrackingTheCodingInterview
ba9866e8e7a8c9942464d76b13af08ea6b15f3f9
[ "MIT" ]
null
null
null
import sys def problem(): """ Minimal Tree: Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height. """ pass class BST: def __init__(self): self.count = 0 self.root = None ...
22.512195
170
0.581798
import sys def problem(): pass class BST: def __init__(self): self.count = 0 self.root = None @staticmethod def build_from_sorted_array(arr): root = BST.__build_from_sorted_array(arr) bst = BST() bst.root = root return bst @static...
true
true
f71a8bd251c72ed72e4f3105b3a56a3e0dee9bf4
14,903
py
Python
xero_python/accounting/models/repeating_invoice.py
sidtrengove/xero-python
52f1ec2232def4c8e773e8e5fd6f766c059517b2
[ "MIT" ]
1
2020-06-05T15:03:15.000Z
2020-06-05T15:03:15.000Z
xero_python/accounting/models/repeating_invoice.py
sidtrengove/xero-python
52f1ec2232def4c8e773e8e5fd6f766c059517b2
[ "MIT" ]
null
null
null
xero_python/accounting/models/repeating_invoice.py
sidtrengove/xero-python
52f1ec2232def4c8e773e8e5fd6f766c059517b2
[ "MIT" ]
null
null
null
# coding: utf-8 """ Accounting API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: 2.1.6 Contact: api@xero.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 from xero_pytho...
28.881783
124
0.609072
import re from xero_python.models import BaseModel class RepeatingInvoice(BaseModel): openapi_types = { "type": "str", "contact": "Contact", "schedule": "Schedule", "line_items": "list[LineItem]", "line_amount_types": "LineAmountTypes", "reference": "str", ...
true
true
f71a8c220df84bc1e3780600d32aac91ad2146a3
2,355
py
Python
scripts/dca.py
Fu-Om/bitbank-dca
17b24bc09bc1980b90f63113909bb8d62c8ff885
[ "MIT" ]
null
null
null
scripts/dca.py
Fu-Om/bitbank-dca
17b24bc09bc1980b90f63113909bb8d62c8ff885
[ "MIT" ]
null
null
null
scripts/dca.py
Fu-Om/bitbank-dca
17b24bc09bc1980b90f63113909bb8d62c8ff885
[ "MIT" ]
null
null
null
#!/usr/bin/env python import python_bitbankcc from math import floor from datetime import datetime import pathlib import csv from settings import BITBANK_API_KEY, BITBANK_API_SECRET class BitBankPubAPI: def __init__(self): self.pub = python_bitbankcc.public() def get_ticker(self, pair): try:...
28.719512
86
0.61104
import python_bitbankcc from math import floor from datetime import datetime import pathlib import csv from settings import BITBANK_API_KEY, BITBANK_API_SECRET class BitBankPubAPI: def __init__(self): self.pub = python_bitbankcc.public() def get_ticker(self, pair): try: value = ...
true
true
f71a8cc95351a2ae4dc1ead3b589c5eaa31f5bc7
10,419
py
Python
asanakoy/dataset.py
chritter/kaggle_carvana_segmentation
14165feadfb500c842616ecb93d9f350dd5bcf87
[ "MIT" ]
447
2017-11-18T03:13:45.000Z
2022-02-18T10:31:55.000Z
asanakoy/dataset.py
chritter/kaggle_carvana_segmentation
14165feadfb500c842616ecb93d9f350dd5bcf87
[ "MIT" ]
9
2018-07-03T13:44:10.000Z
2022-03-11T23:17:29.000Z
asanakoy/dataset.py
jayden-chua/image-mask
ce2c6a32bf13df582e7b57e506d58518258be292
[ "MIT" ]
119
2017-11-18T07:24:02.000Z
2021-11-15T12:24:08.000Z
import os from os.path import isfile, join from PIL import Image import pandas as pd import torch from torch.utils.data.dataset import Dataset from torchvision import transforms import numpy as np import matplotlib.pyplot as plt import shutil from sklearn.model_selection import KFold from sklearn.model_selection import...
38.732342
120
0.578079
import os from os.path import isfile, join from PIL import Image import pandas as pd import torch from torch.utils.data.dataset import Dataset from torchvision import transforms import numpy as np import matplotlib.pyplot as plt import shutil from sklearn.model_selection import KFold from sklearn.model_selection import...
false
true
f71a8d0e28e916e21d6205427d7bc48512999cec
15,536
py
Python
tensorflow_probability/python/distributions/deterministic.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
2
2020-12-17T20:43:24.000Z
2021-06-11T22:09:16.000Z
tensorflow_probability/python/distributions/deterministic.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
2
2021-08-25T16:14:51.000Z
2022-02-10T04:47:11.000Z
tensorflow_probability/python/distributions/deterministic.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
1
2020-12-19T13:05:15.000Z
2020-12-19T13:05:15.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
34.524444
80
0.655381
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import six import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import distribution from tensorflow_probability.python.distributions import kullback_le...
true
true
f71a8d25f1b81ca9d952d8f9624d010c487bd0bf
185
py
Python
tests/test_app/apps.py
JiriKr/django-migrate-sql
b848acb14679ce8bf472d91e52c85afcce2c5db2
[ "ISC" ]
13
2016-01-05T12:21:11.000Z
2021-08-30T05:41:39.000Z
tests/test_app/apps.py
JiriKr/django-migrate-sql
b848acb14679ce8bf472d91e52c85afcce2c5db2
[ "ISC" ]
10
2015-12-27T14:40:31.000Z
2020-04-01T11:40:36.000Z
tests/test_app/apps.py
JiriKr/django-migrate-sql
b848acb14679ce8bf472d91e52c85afcce2c5db2
[ "ISC" ]
3
2017-10-29T11:26:27.000Z
2019-01-03T17:16:54.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class TestAppConfig(AppConfig): name = 'test_app' verbose_name = 'Test App'
18.5
39
0.718919
from __future__ import unicode_literals from django.apps import AppConfig class TestAppConfig(AppConfig): name = 'test_app' verbose_name = 'Test App'
true
true
f71a8db5b96c9e6d722390a922326bcdd0e4974b
534
py
Python
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
90
2018-11-27T21:49:32.000Z
2022-03-13T08:48:51.000Z
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
12
2018-12-04T22:18:36.000Z
2021-08-15T11:41:15.000Z
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
2
2021-06-11T14:11:07.000Z
2021-08-15T06:07:28.000Z
from .iterator import Span, RawIterator class Token: def __init__(self, start, end): self.start = start.copy() self.end = end.copy() @property def raw(self): return str(Span(RawIterator(self.start), RawIterator(self.end))) def __str__(self): return str(Span(self.start...
17.8
72
0.627341
from .iterator import Span, RawIterator class Token: def __init__(self, start, end): self.start = start.copy() self.end = end.copy() @property def raw(self): return str(Span(RawIterator(self.start), RawIterator(self.end))) def __str__(self): return str(Span(self.start...
true
true
f71a8e2fb8856f94587904ef39bc7d65a4aae1c7
3,477
py
Python
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
5
2021-12-24T00:11:22.000Z
2022-01-06T23:53:10.000Z
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
null
null
null
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
null
null
null
from . import PythonExpressions class CodeBlock: def get_code(self, scope): return NotImplemented class CBAssign(CodeBlock): def __init__(self, var, value): self._var = var self._value = value def get_code(self, scope): return f"SCOPE.set_var(\"{s...
36.989362
135
0.581823
from . import PythonExpressions class CodeBlock: def get_code(self, scope): return NotImplemented class CBAssign(CodeBlock): def __init__(self, var, value): self._var = var self._value = value def get_code(self, scope): return f"SCOPE.set_var(\"{s...
true
true
f71a8fd9a5f02c00e4c48dcb982f21552d529470
4,796
py
Python
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2016-04-05T22:30:14.000Z
2016-04-05T22:30:14.000Z
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2020-12-05T05:51:09.000Z
2020-12-05T05:51:09.000Z
""" The data-file handling functions """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
37.76378
93
0.533987
from yt.utilities.io_handler import \ BaseIOHandler import numpy as np from yt.funcs import mylog, defaultdict from .data_structures import chk23 float_size = {"float":np.dtype(">f4").itemsize, "double":np.dtype(">f8").itemsize} axis_list = ["_x","_y","_z"] class IOHandlerAthena(Base...
true
true
f71a90002a6262037bfee9acd3d8a0d96e934ba0
3,017
py
Python
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
""" An example config file to train a ImageNet classifier with detectron2. Model and dataloader both come from torchvision. This shows how to use detectron2 as a general engine for any new models and tasks. To run, use the following command: python tools/lazyconfig_train_net.py --config-file configs/Misc/torchvision_...
32.793478
111
0.764667
import yaml import torch from omegaconf import OmegaConf from fvcore.common.param_scheduler import CosineParamScheduler from detectron2.solver import WarmupParamScheduler from detectron2.solver.build import get_default_optimizer_params from detectron2.config import LazyConfig, LazyCall as L from detectron2.evaluation...
true
true
f71a90ab75738523d69c347c11d6351be429b483
2,311
py
Python
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
import random import threading import pika """ 总结: """ def send(): tag = random.choice(['info', 'error', 'warn']) rb_conn = pika.BlockingConnection(pika.ConnectionParameters(host='192.168.101.129', port=5672, ...
32.549296
117
0.450887
import random import threading import pika def send(): tag = random.choice(['info', 'error', 'warn']) rb_conn = pika.BlockingConnection(pika.ConnectionParameters(host='192.168.101.129', port=5672, ...
true
true
f71a90c7288736f03f64c09624abaf7fafd6201a
2,080
py
Python
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
33
2015-03-03T08:41:56.000Z
2022-02-16T12:05:30.000Z
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
9
2015-01-09T00:29:33.000Z
2016-06-21T13:09:54.000Z
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
18
2015-01-07T22:40:45.000Z
2018-04-04T18:58:50.000Z
import os import os.path import re import sqlite3dbm from threading import RLock from hippybot.hipchat import HipChatApi from hippybot.decorators import botcmd, contentcmd CONFIG_DIR = os.path.expanduser("~/.techbot") DB = os.path.expanduser("~/.techbot/score.db") class Plugin(object): """Plugin to handle knewton re...
25.679012
66
0.639904
import os import os.path import re import sqlite3dbm from threading import RLock from hippybot.hipchat import HipChatApi from hippybot.decorators import botcmd, contentcmd CONFIG_DIR = os.path.expanduser("~/.techbot") DB = os.path.expanduser("~/.techbot/score.db") class Plugin(object): global_commands = ['scores'] ...
true
true
f71a90cbe34b2055cfe4879a68c1824ee28a3a13
8,902
py
Python
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
6
2021-01-13T05:32:14.000Z
2022-02-18T01:35:09.000Z
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
null
null
null
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
1
2021-09-27T12:56:21.000Z
2021-09-27T12:56:21.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Logchecker tool for scanning log files against YETI Threat Intelligence Repository. By LIFARS This code is licensed under MIT license (see LICENSE for details) """ __version__ = "0.8" __author__ = "LIFARS LLC" __copyright__ = "Copyright (c) 2020,2021 LIFARS LLC" __cr...
28.902597
89
0.552123
__version__ = "0.8" __author__ = "LIFARS LLC" __copyright__ = "Copyright (c) 2020,2021 LIFARS LLC" __credits__ = ["LIFARS LLC"] __license__ = "MIT" __maintainer__ = "LIFARS LLC" __status__ = "Production" import argparse import collections import configparser import csv import json import os import re import sys i...
true
true
f71a912403bfab59958931030305960d9f1ae9a4
1,594
py
Python
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
1
2020-05-12T10:41:12.000Z
2020-05-12T10:41:12.000Z
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
null
null
null
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
null
null
null
################################################################################ # # Copyright (c) 2019, the Perspective Authors. # # This file is part of the Perspective library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from enum import Enum clas...
31.254902
80
0.617942
true
true
f71a913f37c249d4a0288dfa1a5ae20fc0e63d6e
275
py
Python
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
#Explicit function def digitSum(n): dsum=0 for ele in str(n): dsum+=int (ele) return dsum #Initializing list List=[367,111,562,945,6726,873] #Using the function on odd element of the list newList=[digitSum(i) for i in List if i & 1] print(newList)
25
46
0.665455
def digitSum(n): dsum=0 for ele in str(n): dsum+=int (ele) return dsum List=[367,111,562,945,6726,873] newList=[digitSum(i) for i in List if i & 1] print(newList)
true
true
f71a9211a58e7ed7bd817495b5f5893f861323b7
19,870
py
Python
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
2
2022-01-25T12:28:21.000Z
2022-01-25T12:29:05.000Z
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
null
null
null
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
null
null
null
# resnet34.py COPYRIGHT Fujitsu Limited 2022 import torch.nn as nn import torch.nn.functional as F def zero_padding(x1, x2): num_ch1 = x1.size()[1] num_ch2 = x2.size()[1] ch_diff = num_ch1 - num_ch2 # path1 < path2 : zero padding to path1 tensor if num_ch1 < num_ch2: ch_diff = -1 * ch_diff...
35.230496
115
0.48767
import torch.nn as nn import torch.nn.functional as F def zero_padding(x1, x2): num_ch1 = x1.size()[1] num_ch2 = x2.size()[1] ch_diff = num_ch1 - num_ch2 if num_ch1 < num_ch2: ch_diff = -1 * ch_diff if ch_diff%2 ==0: x1 = F.pad(x1[:, :, :, :], (0, 0, 0, 0, ch_diff//2,...
true
true
f71a921e657b6f695c22749f6d1c6b756adc0c9a
5,837
py
Python
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
16
2016-05-20T09:03:32.000Z
2020-09-13T14:23:06.000Z
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
2
2016-05-24T01:44:14.000Z
2016-06-17T22:19:45.000Z
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
2
2016-10-10T16:14:19.000Z
2020-10-26T00:17:02.000Z
from mock import patch, MagicMock, call from allegation.factories import ( DownloadFactory, OfficerAllegationFactory, AllegationFactory, ComplainingWitnessFactory, OfficerFactory) from allegation.services.download_allegations import AllegationsDownload from api.models import Setting from common.tests.core import S...
50.318966
108
0.714922
from mock import patch, MagicMock, call from allegation.factories import ( DownloadFactory, OfficerAllegationFactory, AllegationFactory, ComplainingWitnessFactory, OfficerFactory) from allegation.services.download_allegations import AllegationsDownload from api.models import Setting from common.tests.core import S...
true
true
f71a9246d59e712669453737c400d746d8277d54
1,433
py
Python
stream_alert/rule_processor/main.py
ashmere/streamalert
5a03d3d272a8e4e4b1ee71567fad1d7e185bb903
[ "Apache-2.0" ]
1
2018-11-18T12:13:44.000Z
2018-11-18T12:13:44.000Z
stream_alert/rule_processor/main.py
GSA/streamalert
57d78157c76c19b9a0fe5bd6deae541cda928914
[ "Apache-2.0" ]
110
2019-02-13T05:32:07.000Z
2021-07-29T05:42:01.000Z
stream_alert/rule_processor/main.py
ashmere/streamalert
5a03d3d272a8e4e4b1ee71567fad1d7e185bb903
[ "Apache-2.0" ]
1
2019-11-01T01:03:47.000Z
2019-11-01T01:03:47.000Z
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
35.825
89
0.728542
import importlib import os from stream_alert.rule_processor.handler import StreamAlert modules_to_import = set() for folder in ('matchers', 'rules'): for root, dirs, files in os.walk(folder): filtered_files = [rule_file for rule_file in files if not (rule_file.startswith(( '.', '__init__')) o...
true
true
f71a9251405f51578902104c3076923ed80a68f2
666
py
Python
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
1
2018-12-09T11:56:53.000Z
2018-12-09T11:56:53.000Z
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
null
null
null
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
2
2019-09-05T01:31:56.000Z
2019-09-17T09:09:16.000Z
from eth_typing import BlockNumber # https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md MAINNET_CHAIN_ID = 1 # Fork Blocks listed in ascending order # # Homestead Block # HOMESTEAD_MAINNET_BLOCK = BlockNumber(1150000) # # DAO Block # DAO_FORK_MAINNET_BLOCK = BlockNumber(1920000) DAO_FORK_MAINNET_EXTRA...
14.8
62
0.78979
from eth_typing import BlockNumber MAINNET_CHAIN_ID = 1 HOMESTEAD_MAINNET_BLOCK = BlockNumber(1150000) DAO_FORK_MAINNET_BLOCK = BlockNumber(1920000) DAO_FORK_MAINNET_EXTRA_DATA = b'dao-hard-fork' TANGERINE_WHISTLE_MAINNET_BLOCK = BlockNumber(2463000) SPURIOUS_DRAGON_MAINNET_BLOCK = BlockNumber...
true
true
f71a929b94aaa07c53b09d5b18de47578263ba83
6,430
py
Python
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
null
null
null
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
1
2021-06-27T17:20:11.000Z
2021-06-27T17:20:11.000Z
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # GRR documentation build configuration file, created by # sphinx-quickstart on Wed Nov 22 17:54:03 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
29.768519
81
0.657387
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.mathjax', 'recommonmark', ] templates_path = ['_templates'] master_doc = 'index' project = u'GRR' copyright = u'2021, GRR team' author = u'GRR team' # |version| and |release|, also used in var...
true
true
f71a931bbfeddaef6760880c9e0d84b9e3ce6a96
3,111
py
Python
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
from kafka import KafkaProducer, KafkaConsumer from resend_kafka_message.setting import ( KafkaProducerConfig, KafkaConsumerConfig, ) import json from kafka.structs import TopicPartition from resend_kafka_message.utils.logger import logger class KafkaBackupProducer: def __init__(self) -> None: sel...
36.6
79
0.68306
from kafka import KafkaProducer, KafkaConsumer from resend_kafka_message.setting import ( KafkaProducerConfig, KafkaConsumerConfig, ) import json from kafka.structs import TopicPartition from resend_kafka_message.utils.logger import logger class KafkaBackupProducer: def __init__(self) -> None: sel...
true
true
f71a939f803f8836cd5408d397bbd195ac54e34a
394
py
Python
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- name = 'powershell' version = '6.0.2' author = ['microsoft'] tools = ["pwsh"] requires = [] variants = [ ['platform-windows'], ] def commands(): import os applications_path = os.environ["APPLICATIONS_PATH"] env.PATH.append(os.path.joi...
13.586207
101
0.560914
name = 'powershell' version = '6.0.2' author = ['microsoft'] tools = ["pwsh"] requires = [] variants = [ ['platform-windows'], ] def commands(): import os applications_path = os.environ["APPLICATIONS_PATH"] env.PATH.append(os.path.join(applications_path, "p...
true
true
f71a94dc26cb028f050610ac6539dd762ba81156
1,020
py
Python
dataset_utils.py
wzkkzw12345/NIPS2019DeepGamblers
0d1b595611a8bc653fddfdf1419bd8dbde153532
[ "MIT" ]
25
2019-10-24T02:18:37.000Z
2021-10-10T05:40:39.000Z
dataset_utils.py
wzkkzw12345/NIPS2019DeepGamblers
0d1b595611a8bc653fddfdf1419bd8dbde153532
[ "MIT" ]
1
2019-10-28T03:30:25.000Z
2019-12-16T09:50:04.000Z
dataset_utils.py
wzkkzw12345/NIPS2019DeepGamblers
0d1b595611a8bc653fddfdf1419bd8dbde153532
[ "MIT" ]
11
2019-11-25T05:00:38.000Z
2022-01-18T21:27:23.000Z
import os import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms.functional as F from torchvision import transforms, utils from PIL import Image class resized_dataset(Dataset): def __init__(self, dataset, transform=None, start=None, end=None, resize=None): self.data=[] ...
34
105
0.611765
import os import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms.functional as F from torchvision import transforms, utils from PIL import Image class resized_dataset(Dataset): def __init__(self, dataset, transform=None, start=None, end=None, resize=None): self.data=[] ...
false
true
f71a96389c5ecde338aa29ef1117227f29df61b8
1,098
py
Python
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param inorder : A list of integers that inorder traversal of a tree @param postorder : A list of integers that postorder traversal of a tree ...
32.294118
76
0.583789
class Solution: def buildTree(self, inorder, postorder): def genTree(inorder,postorder): if len(inorder)==0: return None root_val = postorder[-1] root = TreeNode(root_val) n = inorder.index(root_val) left_inorder = inorder[:n] ...
true
true
f71a974a3093e8096614977acf39bdfa59c13911
6,492
py
Python
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
from itertools import combinations import pandas as pd from utils.utils import * def load_etf(): etf_data = pd.read_csv( "data/etf_data.csv", encoding="euc_kr", parse_dates=["tdate"] ) etf_ohlcv = etf_data.set_index(["tdate", "etf_code", "data_name"])[ "value" ].unstack() etf_clos...
40.074074
119
0.611214
from itertools import combinations import pandas as pd from utils.utils import * def load_etf(): etf_data = pd.read_csv( "data/etf_data.csv", encoding="euc_kr", parse_dates=["tdate"] ) etf_ohlcv = etf_data.set_index(["tdate", "etf_code", "data_name"])[ "value" ].unstack() etf_clos...
true
true
f71a97da98a14131d787d14e3647b6eaf3f98b88
8,968
py
Python
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
1
2018-12-07T02:05:16.000Z
2018-12-07T02:05:16.000Z
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
null
null
null
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: UTF-8 -*- import string from neko.Common import Threat from neko.Common.CLSID import CLSID_NULL, LOW_RISK_LEVEL_OBJECTS, HIGH_RISK_LEVEL_OBJECTS from neko.Common.DataStructures.OLE1 import LengthPrefixedByteArray from neko.Common.DataStructures.OLE2 import OLEStream, SOAPMoniker, CompositeMoniker, Fi...
41.327189
145
0.492975
import string from neko.Common import Threat from neko.Common.CLSID import CLSID_NULL, LOW_RISK_LEVEL_OBJECTS, HIGH_RISK_LEVEL_OBJECTS from neko.Common.DataStructures.OLE1 import LengthPrefixedByteArray from neko.Common.DataStructures.OLE2 import OLEStream, SOAPMoniker, CompositeMoniker, FileMoniker, UrlMoniker fro...
true
true
f71a97f2cf8061f969605f468dcddb25a7b8ae82
1,596
py
Python
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
1
2019-11-03T21:10:01.000Z
2019-11-03T21:10:01.000Z
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
null
null
null
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
2
2019-12-23T20:05:32.000Z
2019-12-23T20:10:27.000Z
# From https://stackoverflow.com/a/34325723 _prev_str_length = None # Print iterations progress def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=18, fill='█'): """ Call in a loop to create terminal progress bar @params: iteration - Required : current iteration (Int) total ...
31.294118
123
0.641604
_prev_str_length = None def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=18, fill='█'): percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total))) filledLength = int(length * iteration // total) bar = fill * filledLength + '-' * (length - filledLength) s ...
true
true
f71a984be3f40ce7973e0b35ea72325af786a392
3,517
py
Python
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
6
2021-02-02T22:52:41.000Z
2022-03-12T00:37:30.000Z
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from app.entity.MineBeneficiation import * import json import pandas as pd from app.graph.Graph import Edge class NodeJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Node): return o.moniker() if isinstance(o, pd.core.series.Series): ...
27.476563
131
0.59056
from app.entity.MineBeneficiation import * import json import pandas as pd from app.graph.Graph import Edge class NodeJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Node): return o.moniker() if isinstance(o, pd.core.series.Series): return o.to_dic...
true
true
f71a987a8a837ab3584bf058b3896b72ab4cd67f
33,495
py
Python
third_party/scons/scons-local/SCons/Builder.py
rwatson/chromium-capsicum
b03da8e897f897c6ad2cda03ceda217b760fd528
[ "BSD-3-Clause" ]
11
2015-03-20T04:08:08.000Z
2021-11-15T15:51:36.000Z
third_party/scons/scons-local/SCons/Builder.py
changbai1980/chromium
c4625eefca763df86471d798ee5a4a054b4716ae
[ "BSD-3-Clause" ]
null
null
null
third_party/scons/scons-local/SCons/Builder.py
changbai1980/chromium
c4625eefca763df86471d798ee5a4a054b4716ae
[ "BSD-3-Clause" ]
null
null
null
"""SCons.Builder Builder object subsystem. A Builder object is a callable that encapsulates information about how to execute actions to create a target Node (file) from source Nodes (files), and how to create those dependencies for tracking. The main entry point here is the Builder() factory method. This provides a...
38.812283
178
0.604986
"""SCons.Builder Builder object subsystem. A Builder object is a callable that encapsulates information about how to execute actions to create a target Node (file) from source Nodes (files), and how to create those dependencies for tracking. The main entry point here is the Builder() factory method. This provides a...
false
true
f71a9945ebfc1939e5f3b7f7596845dbf01070cf
2,311
py
Python
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
7
2020-04-20T19:32:23.000Z
2021-08-03T16:50:15.000Z
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
null
null
null
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
5
2019-04-20T06:35:25.000Z
2021-12-12T12:25:08.000Z
print("String example") s = "this is a test String" print(f"String: {s}") print(f"String Capitalized: {s.capitalize()}") print(f"String Finding index: {s.find('e')}") print(f"String Lowercase: {s.lower()}") print(f"String Uppercase: {s.upper()}") print(f"String Length: {len(s)}") print(f"String Replace: {s.replace('thi...
28.182927
60
0.633059
print("String example") s = "this is a test String" print(f"String: {s}") print(f"String Capitalized: {s.capitalize()}") print(f"String Finding index: {s.find('e')}") print(f"String Lowercase: {s.lower()}") print(f"String Uppercase: {s.upper()}") print(f"String Length: {len(s)}") print(f"String Replace: {s.replace('thi...
true
true
f71a9a29fc9f435c927a8cf78515482f4439afa0
105
py
Python
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
null
null
null
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
2
2022-03-28T19:03:21.000Z
2022-03-29T00:03:34.000Z
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
null
null
null
# coding: utf-8 import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent))
26.25
53
0.771429
import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent))
true
true
f71a9a81693d0910320d55fb9df477edf8edac0a
209,992
py
Python
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
39.524186
79
0.574789
import collections import copy import ddt import json import mock import re import tempfile import unittest from xml.dom import minidom from cinder import context from cinder import exception from cinder import test from cinder.tests.unit.consistencygroup import fake_cgsnapshot from cinder.tests.unit.con...
true
true
f71a9b18087b06ded86cb08a3f7326b177d08f3e
60,291
py
Python
presubmit_support.py
AndersonYangOh/depot_tools
7d9d9233cb657e968831238346917b0b64abb4c1
[ "BSD-3-Clause" ]
null
null
null
presubmit_support.py
AndersonYangOh/depot_tools
7d9d9233cb657e968831238346917b0b64abb4c1
[ "BSD-3-Clause" ]
null
null
null
presubmit_support.py
AndersonYangOh/depot_tools
7d9d9233cb657e968831238346917b0b64abb4c1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Enables directory-specific presubmit checks to run at upload and/or commit. """ __version__ = '1.8.0' # TODO(joi) Add caching ...
35.675148
80
0.675209
"""Enables directory-specific presubmit checks to run at upload and/or commit. """ __version__ = '1.8.0' import ast import cpplint import cPickle import cStringIO import contextlib import fnmatch import glob import inspect import itertools import json import logging import marshal import multipro...
false
true
f71a9b3881862c5eb958a16f5a70f95f5060726c
5,616
py
Python
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
20
2019-12-03T06:06:58.000Z
2022-02-23T21:49:03.000Z
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
9
2020-06-15T14:56:38.000Z
2022-02-12T13:09:38.000Z
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
8
2020-07-27T14:00:37.000Z
2022-02-20T17:59:04.000Z
from __future__ import absolute_import import time import os import unittest import tempfile import shutil from io import StringIO from . import punc from .punc import Punctuator, download_model class Tests(unittest.TestCase): samples = [ ( 'mary had a little lamb its fleece was white as sn...
36.705882
146
0.570691
from __future__ import absolute_import import time import os import unittest import tempfile import shutil from io import StringIO from . import punc from .punc import Punctuator, download_model class Tests(unittest.TestCase): samples = [ ( 'mary had a little lamb its fleece was white as sn...
true
true
f71a9c2559fc2833e574b56aa245554739a58e09
8,913
py
Python
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
1
2015-09-04T05:52:45.000Z
2015-09-04T05:52:45.000Z
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
null
null
null
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
null
null
null
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import ssl import logging from sleekxmpp.util import sasl from sleekxmpp.util.stringprep_profiles import StringPrepError from sleekxmpp.stanza ...
36.679012
83
0.58151
import ssl import logging from sleekxmpp.util import sasl from sleekxmpp.util.stringprep_profiles import StringPrepError from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin from sleekxmpp.plugins import BasePlugin from sleekxmpp.xmlstream.matcher import Ma...
true
true
f71a9c42ba701b954c3fcb36fd4b72ea81d1eb78
7,255
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,...
38.590426
421
0.513853
def findDecision(obj): if obj[8]>1: if obj[11]<=3: if obj[5]>0: if obj[18]<=0: if obj[12]>1: if obj[14]<=2.0: if obj[16]>1.0: if obj[13]<=6: if obj[17]<=1.0: if obj[0]<=1: if o...
true
true
f71a9c674644f0d53c2687dddfa077e5ece93d13
62
py
Python
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
from __future__ import print_function from .Photostim import *
31
37
0.854839
from __future__ import print_function from .Photostim import *
true
true
f71a9cbf524b1e94c7bb76e86a3a25344ade1dab
21,169
py
Python
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
null
null
null
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
7
2019-06-06T15:47:56.000Z
2019-06-15T18:09:30.000Z
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 #-*- coding: iso-8859-1 -*- ################################################################################ # # This module contains an implementation of XMLRPC interface/resource. # # Sample XMLRPC interface configuration (config_interface_xmlrpc_1.py): # # config = dict \ # ( # protocol = "xml...
41.184825
125
0.544003
true
true
f71a9d6ee5b89554965ee5cfb0da2b1898c17923
529
py
Python
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
15
2017-08-30T13:43:14.000Z
2022-03-29T07:04:30.000Z
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
11
2017-08-28T11:23:18.000Z
2022-03-28T23:48:11.000Z
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
9
2017-09-30T08:28:42.000Z
2022-03-12T19:11:43.000Z
import sys from ingenialink.ethernet.network import EthernetNetwork, NET_TRANS_PROT def connection_example(): net = EthernetNetwork() servo = net.connect_to_slave("192.168.2.22", "../../resources/dictionaries/eve-net-c_eth_1.8.1.xdf", 1061, ...
25.190476
88
0.597353
import sys from ingenialink.ethernet.network import EthernetNetwork, NET_TRANS_PROT def connection_example(): net = EthernetNetwork() servo = net.connect_to_slave("192.168.2.22", "../../resources/dictionaries/eve-net-c_eth_1.8.1.xdf", 1061, ...
true
true
f71a9e181df7b219ef25d20d2a8f66302f4a6696
355
py
Python
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/9010.c') procedure('kernel_heat_3d') loop(0) known('n>3') tile(0,2,8,2) tile(0,4,64...
25.357143
116
0.752113
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/9010.c') procedure('kernel_heat_3d') loop(0) known('n>3') tile(0,2,8,2) tile(0,4,64...
true
true
f71aa1575b68c457900ef0939ac431d1293e82a4
2,733
py
Python
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
14
2019-03-30T02:11:29.000Z
2021-11-16T12:06:32.000Z
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
1
2019-09-13T15:10:18.000Z
2019-09-13T21:05:46.000Z
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
10
2019-03-31T08:35:29.000Z
2021-09-01T06:28:43.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
32.152941
80
0.726674
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags import numpy as np import png import six import tensorflow as tf FLAGS = flags.FLAGS flags.DEFINE_integer("resolution", 64, "Resolution of the video...
true
true
f71aa2e9fb55e8ff5df09593abc82b3ea64662a2
3,133
py
Python
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
1
2021-06-26T00:31:08.000Z
2021-06-26T00:31:08.000Z
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
1
2020-03-02T21:05:42.000Z
2020-03-03T07:09:51.000Z
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
32.978947
79
0.719757
from __future__ import absolute_import from __future__ import unicode_literals from core.platform import models from google.appengine.ext import ndb (base_models,) = models.Registry.import_models([models.NAMES.base_model]) TOPIC_SIMILARITIES_ID = 'topics' class ExplorationRecommendationsModel...
true
true
f71aa357327a98795cb190e3909dda5f261e7b6a
25,206
py
Python
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
from warnings import simplefilter simplefilter(action='ignore', category=FutureWarning) import numpy as np import argparse import pandas as pd from tqdm.auto import tqdm from datetime import datetime from sklearn.metrics import log_loss import seaborn as sns import matplotlib.pyplot as plt from utils.functions import...
63.491184
134
0.519281
from warnings import simplefilter simplefilter(action='ignore', category=FutureWarning) import numpy as np import argparse import pandas as pd from tqdm.auto import tqdm from datetime import datetime from sklearn.metrics import log_loss import seaborn as sns import matplotlib.pyplot as plt from utils.functions import...
true
true
f71aa447e93126ff1ef79e05d8bb36f39e9bc2a4
4,210
py
Python
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
97.906977
3,380
0.791211
from __future__ import absolute_import import os import sys import unittest import openshift.client from kubernetes.client.rest import ApiException from openshift.client.models.v1_load_balancer_ingress import V1LoadBalancerIngress class TestV1LoadBalancerIngress(unittest.TestCase): def setUp(self): ...
true
true
f71aa5297e2e652741a2be68088de722b87d9713
3,419
py
Python
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.763441
84
0.664814
import unittest from testcase.utils.ComThread import ComThread from yat.test import Node from yat.test import macro from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger class Tools(unittest.TestCase): def setUp(self): self.logger = ...
true
true
f71aa56817ca77eba5df4a2dd11cb0c4a9a7ea1c
3,699
py
Python
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
22,617
2015-06-03T20:26:05.000Z
2022-03-31T22:25:42.000Z
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
1,230
2015-06-03T13:56:41.000Z
2022-03-30T06:03:12.000Z
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
1,445
2015-06-03T14:01:33.000Z
2022-03-29T14:41:52.000Z
import atexit from threading import Event, Thread, current_thread from time import time from warnings import warn __all__ = ["TMonitor", "TqdmSynchronisationWarning"] class TqdmSynchronisationWarning(RuntimeWarning): """tqdm multi-thread/-process errors which may cause incorrect nesting but otherwise no adve...
38.53125
83
0.575561
import atexit from threading import Event, Thread, current_thread from time import time from warnings import warn __all__ = ["TMonitor", "TqdmSynchronisationWarning"] class TqdmSynchronisationWarning(RuntimeWarning): pass class TMonitor(Thread): _test = {} def __init__(self, tqdm_cls, sleep_interval...
true
true
f71aa6cb7d4d15f3ea5cab82e19b2bc1a59ef4a5
3,466
py
Python
tests/get_bst_feature_api_ct.py
r-cc-c/ops-broadview
b9002fab5fe1f27628bfd403631840ff4a118cf2
[ "Apache-2.0" ]
null
null
null
tests/get_bst_feature_api_ct.py
r-cc-c/ops-broadview
b9002fab5fe1f27628bfd403631840ff4a118cf2
[ "Apache-2.0" ]
null
null
null
tests/get_bst_feature_api_ct.py
r-cc-c/ops-broadview
b9002fab5fe1f27628bfd403631840ff4a118cf2
[ "Apache-2.0" ]
1
2021-09-10T08:19:29.000Z
2021-09-10T08:19:29.000Z
''' * * (C) Copyright Broadcom Corporation 2015 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
35.367347
188
0.648586
''' * * (C) Copyright Broadcom Corporation 2015 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
false
true
f71aa6cce65ae0f1ec42a02146d24feaa44f2307
98
py
Python
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
n=int(100) for i in range(n): for j in range(10): print("*", end="") print()
16.333333
27
0.459184
n=int(100) for i in range(n): for j in range(10): print("*", end="") print()
true
true
f71aa81665c674b5cc3278ea94c533b98549fe90
935
py
Python
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
"""Given a linked list, swap every two adjacent nodes and return its head. Example 1: Input: head = [1,2,3,4] Output: [2,1,4,3] Example 2: Input: head = [] Output: [] Example 3: Input: head = [1] Output: [1] Constraints: The number of nodes in the list is in the range [0, 100]. 0 <= Node.val <= 100 Follow up: Ca...
21.744186
119
0.640642
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def swapPairs(self, head: ListNode) -> ListNode: if head is None or head.next is None: return head first = head.next second = head.next.next first....
true
true
f71aa89acd39eaae1c4ded0a372a3dc7b494d67c
189
py
Python
blueapps/account/components/bk_token/forms.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
42
2021-06-16T12:06:03.000Z
2022-03-29T13:18:00.000Z
blueapps/account/components/bk_token/forms.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
3
2020-06-05T20:56:09.000Z
2021-06-10T21:29:05.000Z
blueapps/account/components/bk_token/forms.py
wangzishuo111/bk_prometheus
c6aa16d8a547a3d00fbca317f6846ad35b1297ea
[ "MIT" ]
16
2021-07-13T01:17:57.000Z
2022-03-01T12:39:32.000Z
# -*- coding: utf-8 -*- from django import forms class AuthenticationForm(forms.Form): # bk_token format: KH7P4-VSFi_nOEoV3kj0ytcs0uZnGOegIBLV-eM3rw8 bk_token = forms.CharField()
23.625
66
0.740741
from django import forms class AuthenticationForm(forms.Form): bk_token = forms.CharField()
true
true
f71aa8c11ea59751ae59caa6184f21489f218f12
422
py
Python
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
25
2020-07-07T20:07:41.000Z
2021-12-17T11:27:36.000Z
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
26
2020-07-04T00:06:25.000Z
2022-02-10T03:28:35.000Z
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
11
2020-07-02T21:39:59.000Z
2022-01-17T22:09:46.000Z
current_iteration = iteration ########################################################################## ### GAN-TTS : HIGH FIDELITY SPEECH SYNTHESIS WITH ADVERSARIAL NETWORKS ### ########################################################################## # Learning Rate / Optimization decay_start = 99999999 A_ = 0.2e-...
28.133333
74
0.490521
current_iteration = iteration
true
true
f71aa8d7c382bafc56b06793ddb3976f1a195ca1
11,480
py
Python
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
1
2021-08-05T05:41:50.000Z
2021-08-05T05:41:50.000Z
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
null
null
null
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
1
2021-07-10T09:50:47.000Z
2021-07-10T09:50:47.000Z
# coding=utf-8 # Copyleft 2019 project LXRT. import os import collections import torch import torch.nn as nn import logging from torch.utils.data.dataloader import DataLoader from tqdm import tqdm from param import args from lxrt.qa_answer_table import load_lxmert_qa from tasks.vqa_model import VQAModel from tasks.v...
38.394649
129
0.567334
import os import collections import torch import torch.nn as nn import logging from torch.utils.data.dataloader import DataLoader from tqdm import tqdm from param import args from lxrt.qa_answer_table import load_lxmert_qa from tasks.vqa_model import VQAModel from tasks.vqa_data import VQADataset, VQATorchDataset,...
true
true
f71aa988a5098b28bbada6d39c5173f2c7f1034c
1,683
py
Python
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
# Create a function that implements a basic compression algorithm by counting the chars # thtat are present in a string, if the result string is longer than input # then return original input. # # Examples: # aaabcccccaaa: a3b1c5a3 # abcdef: abcdef # aaaaaaaaaaba: a10b1a1 ### Note: Don't use extra space import unit...
25.892308
87
0.618538
ress2(s1): newStr = [] count = 0 for i in range(len(s1)): # Explanation # the i != 0 is used to deal with the first character. # we could have done but requirs extra code: # char = s1[0] # requires to check if the s1 is not empty # - or - # char = '' # requires to check if char !...
true
true
f71aaa4225770dc4b16e09cec972c3086fd80ff7
291
py
Python
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
11
2019-05-02T22:27:01.000Z
2020-10-30T08:43:02.000Z
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
null
null
null
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
3
2019-11-01T01:35:01.000Z
2020-01-11T18:00:39.000Z
def find_subsets(nums): subsets = [] # TODO: Write your code here subsets.append([]) for i in range(len(nums)): storeLen = len(subsets) for j in range(0,storeLen): currSet = list(subsets[j]) currSet.append(nums[i]) subsets.append(currSet) return subsets
22.384615
32
0.639175
def find_subsets(nums): subsets = [] subsets.append([]) for i in range(len(nums)): storeLen = len(subsets) for j in range(0,storeLen): currSet = list(subsets[j]) currSet.append(nums[i]) subsets.append(currSet) return subsets
true
true
f71aaa5221fcf2fa717ae33f34cf3b565947d0e8
6,099
py
Python
lib/models/spin.py
ziniuwan/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
145
2021-08-15T13:22:08.000Z
2022-03-29T13:37:19.000Z
lib/models/spin.py
vkirilenko/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
9
2021-09-17T14:58:15.000Z
2022-03-29T07:43:08.000Z
lib/models/spin.py
vkirilenko/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
17
2021-08-15T13:22:10.000Z
2022-01-17T02:34:14.000Z
""" This script is brought from https://github.com/nkolot/SPIN Adhere to their licence to use this script """ import math import torch import numpy as np import os.path as osp import torch.nn as nn from lib.core.config import DATA_DIR from lib.utils.geometry import rotation_matrix_to_angle_axis, rot6d_to_rotmat from ...
38.601266
132
0.620102
import math import torch import numpy as np import os.path as osp import torch.nn as nn from lib.core.config import DATA_DIR from lib.utils.geometry import rotation_matrix_to_angle_axis, rot6d_to_rotmat from lib.models.smpl import SMPL, SMPL_MODEL_DIR, H36M_TO_J17, SMPL_MEAN_PARAMS class Regressor(nn.Module): d...
true
true
f71aabf71da050ef5d5829467e28176e4164c3ea
8,924
py
Python
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
1
2021-02-19T20:57:36.000Z
2021-02-19T20:57:36.000Z
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
null
null
null
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
null
null
null
from typing import Optional from typing import Union from collections.abc import Callable import numpy as np from .typing import RandomStateType from .typing import Literal class DictionaryLearning: components_: np.ndarray error_: np.ndarray n_iter_: int def __init__( self, n_compon...
27.12462
80
0.584043
from typing import Optional from typing import Union from collections.abc import Callable import numpy as np from .typing import RandomStateType from .typing import Literal class DictionaryLearning: components_: np.ndarray error_: np.ndarray n_iter_: int def __init__( self, n_compon...
true
true
f71aac40a529a6f8ae2786769f649c443c11c279
8,926
py
Python
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
# Databricks notebook source # MAGIC %md # MAGIC ## Model Monitoring # COMMAND ---------- # MAGIC %run ./includes/utilities # COMMAND ---------- # MAGIC %run ./includes/configuration # COMMAND ---------- # grab the station information (system wide) stationDF=get_bike_stations()[['name','station_id','lat','lon']] ...
31.652482
164
0.720816
ons()[['name','station_id','lat','lon']] stationsOfInterestDF = spark.sql("""select distinct(station_id) from from citibike.forecast_regression_timeweather;""").toPandas() stationDF = stationDF[stationDF['station_id'].apply(lambda x: int(x) in list(stationsOfInterestDF.values.flatten()))] from datetime import da...
true
true
f71aac54f88d8ccd203f824b5e35a7cfb34c929b
15,156
py
Python
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
1
2022-02-12T06:28:15.000Z
2022-02-12T06:28:15.000Z
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
null
null
null
""" Canon Log Encodings =================== Defines the *Canon Log* encodings: - :func:`colour.models.log_encoding_CanonLog` - :func:`colour.models.log_decoding_CanonLog` - :func:`colour.models.log_encoding_CanonLog2` - :func:`colour.models.log_decoding_CanonLog2` - :func:`colour.models.log_encoding_CanonLo...
29.202312
105
0.490433
from __future__ import annotations import numpy as np from colour.hints import ( Boolean, FloatingOrArrayLike, FloatingOrNDArray, Integer, ) from colour.models.rgb.transfer_functions import full_to_legal, legal_to_full from colour.utilities import ( as_float, domain_range_scale, from_rang...
true
true
f71aad03581521af34e46f4263fc80abdb4a99c3
6,135
py
Python
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="insert_list_online_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a c...
49.08
255
0.669927
import json from six.moves.urllib.parse import quote from asposewordscloud import * from asposewordscloud.models import * from asposewordscloud.models.requests import * from asposewordscloud.models.responses import * class InsertListOnlineRequest(BaseRequestObject): def __init__(self, do...
true
true
f71aad2d5eeb4c38a35396239e2ecb41a34883a8
1,177
py
Python
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
8
2020-09-25T08:57:31.000Z
2022-02-02T18:52:09.000Z
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
2
2021-09-05T11:19:36.000Z
2021-09-08T00:13:48.000Z
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
1
2020-09-25T08:56:25.000Z
2020-09-25T08:56:25.000Z
from test.utilities.env_vars import set_env_vars from test.utilities.excel import Excel def test_simple_script_for_addition(xll_addin_path): with set_env_vars('basic_functions'): with Excel() as excel: excel.register_xll(xll_addin_path) ( excel.new_workbook() ...
31.810811
104
0.548853
from test.utilities.env_vars import set_env_vars from test.utilities.excel import Excel def test_simple_script_for_addition(xll_addin_path): with set_env_vars('basic_functions'): with Excel() as excel: excel.register_xll(xll_addin_path) ( excel.new_workbook() ...
true
true
f71aad9b00e3ad94ed69d13f4f8b2c42d39eda6d
2,324
py
Python
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
2
2015-08-13T00:07:49.000Z
2020-08-07T06:38:44.000Z
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2015 NEC Corporation. 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 ...
36.3125
78
0.711274
from tempest.lib.services.compute import tenant_networks_client from tempest.tests.lib import fake_auth_provider from tempest.tests.lib.services import base class TestTenantNetworksClient(base.BaseServiceTest): FAKE_NETWORK = { "cidr": "None", "id": "c2329eb4-cc8e-4439-ac4c-93236930...
true
true
f71aadd3961afa04dc66e19d75c3c36540a1b948
1,264
py
Python
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
null
null
null
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
1
2022-03-31T03:16:16.000Z
2022-03-31T03:16:16.000Z
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
null
null
null
# Generated by Django 3.2.3 on 2021-05-21 04:17 from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FAQ', ...
38.30303
147
0.613924
from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FAQ', fields=[ ('id', models.BigAut...
true
true
f71aaddfd333847ace11e0163cb2a3644b0168e0
49,007
py
Python
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The crypt module manages all of the cryptography functions for minions and masters, encrypting and decrypting payloads, preparing messages, and authenticating peers ''' # Import python libs from __future__ import absolute_import, print_function import os import sys import copy import time im...
40.568709
114
0.576061
from __future__ import absolute_import, print_function import os import sys import copy import time import hmac import base64 import hashlib import logging import stat import traceback import binascii import weakref import salt.ext.six as six from salt.ext.six.moves import zip try: from Crypto.Cipher import A...
true
true
f71aae58eb581c2971eaadde48b721f1d5ace501
396
py
Python
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
""" WSGI config for booktrade 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.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
23.294118
78
0.787879
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "booktrade.settings") application = get_wsgi_application()
true
true
f71aae7b0231777a5578550493465da27589a5fd
12,552
py
Python
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
48
2018-05-15T12:46:36.000Z
2021-03-11T09:34:10.000Z
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
1
2018-10-28T21:11:47.000Z
2018-10-31T20:31:09.000Z
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
6
2018-07-03T01:28:41.000Z
2020-01-23T13:25:49.000Z
from __future__ import division, print_function from conllu.parser import parse, parse_tree from tags import Tags, Tag, Label import os import re import math import numpy as np import itertools import pdb import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import torch from torch.aut...
27.769912
120
0.634242
from __future__ import division, print_function from conllu.parser import parse, parse_tree from tags import Tags, Tag, Label import os import re import math import numpy as np import itertools import pdb import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import torch from torch.aut...
true
true
f71aaf4aad518c6d9db764a08f3d7f8432489eb7
32,580
py
Python
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
"""This module defines miscellaneous utility functions that is public to users.""" import numpy as np from numpy import unique, linalg, diag, sqrt, dot from Bio.Phylo.BaseTree import Tree, Clade from prody import PY3K from .misctools import addEnds, interpY, index, isListLike from .checkers import checkCoords from ....
33.449692
122
0.594045
import numpy as np from numpy import unique, linalg, diag, sqrt, dot from Bio.Phylo.BaseTree import Tree, Clade from prody import PY3K from .misctools import addEnds, interpY, index, isListLike from .checkers import checkCoords from .logger import LOGGER __all__ = ['calcTree', 'clusterMatrix', 'showLines', 'showMa...
true
true
f71aaf817439b642121452efbd2e412d462ce2b5
38,772
py
Python
rpython/rtyper/test/test_rdict.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
rpython/rtyper/test/test_rdict.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
rpython/rtyper/test/test_rdict.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
from rpython.translator.translator import TranslationContext from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper import rint from rpython.rtyper.lltypesystem import rdict, rstr from rpython.rtyper.test.tool import BaseRtypingTest from rpython.rlib.objectmodel import r_dict from rpython.rlib.rarithm...
29.824615
85
0.464562
from rpython.translator.translator import TranslationContext from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper import rint from rpython.rtyper.lltypesystem import rdict, rstr from rpython.rtyper.test.tool import BaseRtypingTest from rpython.rlib.objectmodel import r_dict from rpython.rlib.rarithm...
false
true
f71ab0cfdecb4656998e375e331065ba5d5988ae
15,809
py
Python
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
null
null
null
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
null
null
null
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
1
2018-11-27T03:39:41.000Z
2018-11-27T03:39:41.000Z
# ROS/IOP Bridge # Copyright (c) 2017 Fraunhofer # # This program is dual licensed; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation, or # enter into a proprietary license agreement with the copyright # holder. # # This...
41.712401
171
0.656335
import os from python_qt_binding import loadUi from python_qt_binding.QtCore import QObject, Signal, Qt from python_qt_binding.QtGui import QIcon try: from python_qt_binding.QtGui import QWidget, QDialog, QTreeWidget, QTreeWidgetItem except: from python_qt_binding.QtWidgets import QWidget, ...
true
true
f71ab0e75e50d66af2bfe69ef2fd8400a56a4fd4
1,903
py
Python
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
1
2020-05-17T03:28:17.000Z
2020-05-17T03:28:17.000Z
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np def stockUp(priceFile): # read the file infile = open(priceFile, "r") date = [] stock = [] # store only the dates and closing price day = 1 firstLine = True for line in infile: if firstLine: firstLin...
27.185714
89
0.543878
import matplotlib.pyplot as plt import numpy as np def stockUp(priceFile): infile = open(priceFile, "r") date = [] stock = [] day = 1 firstLine = True for line in infile: if firstLine: firstLine = False else: count_item = 0 ...
true
true
f71ab0f98895a9582d987bf35cfa556cbf1224e1
694
py
Python
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: %(Mikel Val Calvo)s @email: %(mikel1982mail@gmail.com) @institution: %(Dpto. de Inteligencia Artificial, Universidad Nacional de Educación a Distancia (UNED)) @DOI: 10.5281/zenodo.3759306 """ #%% class SlotsManager: # Inicializa la lista de callbacks def __init__(self): ...
23.931034
103
0.628242
class SlotsManager: def __init__(self): self.callbacks = [] def trigger(self): for callback in self.callbacks: callback() print(callback) def append(self, slot): self.callbacks.append(slot) print(slot)
true
true
f71ab3032781cd41199cec50632738defd8f52ca
116,626
py
Python
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
import itertools import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import lateral from sqlalchemy import literal...
34.041448
79
0.563099
import itertools import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import lateral from sqlalchemy import literal...
true
true
f71ab4470632fb3e14e414c8dba8614f764a6ebe
8,218
py
Python
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
1
2021-06-29T03:57:26.000Z
2021-06-29T03:57:26.000Z
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
4
2021-06-18T10:45:03.000Z
2021-09-13T22:12:45.000Z
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
2
2021-04-29T03:27:19.000Z
2021-09-13T21:44:39.000Z
"""Command line wrapper to serve one or more named Bokeh scripts or folders.""" import logging import os import re import pathlib import tempfile from typing import Any, Dict, Tuple import bokeh.server.views import click from bokeh.application.application import Application from bokeh.command.util import build_single_...
35.886463
118
0.643344
import logging import os import re import pathlib import tempfile from typing import Any, Dict, Tuple import bokeh.server.views import click from bokeh.application.application import Application from bokeh.command.util import build_single_handler_application from bokeh.server.server import Server as _BkServer from bok...
true
true
f71ab48c915466e77fb663ba45f13600446b8c5f
1,481
py
Python
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
null
null
null
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
6
2020-06-05T19:09:26.000Z
2022-01-13T00:54:56.000Z
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
null
null
null
from django_filters import rest_framework as filters from rest_framework import viewsets from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.permissions import IsAuthenticated, BasePermission from invoices.api.serializers import InvoiceSerializer from invoices.models import Invoice cl...
35.261905
105
0.748143
from django_filters import rest_framework as filters from rest_framework import viewsets from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.permissions import IsAuthenticated, BasePermission from invoices.api.serializers import InvoiceSerializer from invoices.models import Invoice cl...
true
true