hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71636a88b0788c3dada5a4ba2b8c2dd70710a74
334
py
Python
projects/forms.py
18F/projects
e8c6bef7f3a6308dbad8c772cc45ddb6d0f50dec
[ "CC0-1.0" ]
9
2016-05-10T21:33:09.000Z
2019-12-07T05:49:08.000Z
projects/forms.py
18F/projects
e8c6bef7f3a6308dbad8c772cc45ddb6d0f50dec
[ "CC0-1.0" ]
38
2016-05-10T19:15:36.000Z
2016-07-13T15:04:37.000Z
projects/forms.py
18F/projects
e8c6bef7f3a6308dbad8c772cc45ddb6d0f50dec
[ "CC0-1.0" ]
4
2016-06-03T20:12:21.000Z
2021-02-15T10:19:36.000Z
from dal import autocomplete from django import forms from .models import Project class ProjectForm(forms.ModelForm): class Meta: model = Project fields = ('__all__') widgets = { 'client': autocomplete.ModelSelect2( url='projects:client-autocomplete' ...
18.555556
48
0.595808
from dal import autocomplete from django import forms from .models import Project class ProjectForm(forms.ModelForm): class Meta: model = Project fields = ('__all__') widgets = { 'client': autocomplete.ModelSelect2( url='projects:client-autocomplete' ...
true
true
f716376a1e682052bb9b284fd666fd0f58de3a38
1,994
py
Python
php/python/DatabaseManager.py
the16bitgamer/YourflixMkII
3be2407b214b8553e0a83af04b463cd99c04cf32
[ "MIT" ]
null
null
null
php/python/DatabaseManager.py
the16bitgamer/YourflixMkII
3be2407b214b8553e0a83af04b463cd99c04cf32
[ "MIT" ]
null
null
null
php/python/DatabaseManager.py
the16bitgamer/YourflixMkII
3be2407b214b8553e0a83af04b463cd99c04cf32
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb _connectedDb = None _dbCursor = None def ConnectToDb(self, userID, userPassword): if self._connectedDb is not None: DisconnectDb(self) self._connectedDb = MySQLdb.connect(host="localhost", user = userID, passwd=userPassword) self._dbCursor = self._co...
33.233333
114
0.604313
import MySQLdb _connectedDb = None _dbCursor = None def ConnectToDb(self, userID, userPassword): if self._connectedDb is not None: DisconnectDb(self) self._connectedDb = MySQLdb.connect(host="localhost", user = userID, passwd=userPassword) self._dbCursor = self._connectedDb.cursor() return "Connected to Datab...
true
true
f716384515c52a1f9ca6af89058c342de1fc5533
4,424
py
Python
symphony/cli/tests/pyinventory_tests/test_service_type.py
omnicate/magma
e1e6c244f9e8bd000587a3dad3c54f4e64ada222
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/tests/pyinventory_tests/test_service_type.py
omnicate/magma
e1e6c244f9e8bd000587a3dad3c54f4e64ada222
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/tests/pyinventory_tests/test_service_type.py
omnicate/magma
e1e6c244f9e8bd000587a3dad3c54f4e64ada222
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2004-present Facebook All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from pyinventory.api.equipment_type import add_equipment_type from pyinventory.api.service import add_service from pyinventory.api.serv...
36.262295
88
0.631103
from pyinventory.api.equipment_type import add_equipment_type from pyinventory.api.service import add_service from pyinventory.api.service_type import ( _populate_service_types, add_service_type, delete_service_type, delete_service_type_with_services, edit_service_type, get_service_type, ) from...
true
true
f71639222fd2734617fde428e4935406b4096eab
2,925
py
Python
photoslib/fields.py
ivan-sysoi/django-photoslib
ffab2a7c238bcfec709a2db31fdd3b40757cf730
[ "MIT" ]
null
null
null
photoslib/fields.py
ivan-sysoi/django-photoslib
ffab2a7c238bcfec709a2db31fdd3b40757cf730
[ "MIT" ]
11
2020-04-05T17:46:46.000Z
2022-02-12T05:11:38.000Z
photoslib/fields.py
ivan-sysoi/django-photoslib
ffab2a7c238bcfec709a2db31fdd3b40757cf730
[ "MIT" ]
null
null
null
from io import BytesIO from PIL import Image from django.conf import settings from django.db import models from pilkit.processors import ProcessorPipeline from pilkit.utils import save_image from sortedm2m.fields import SortedManyToManyField from .forms import PhotoFieldWidget __all__ = ('PhotoField', 'ManyPhotosFie...
41.785714
120
0.704274
from io import BytesIO from PIL import Image from django.conf import settings from django.db import models from pilkit.processors import ProcessorPipeline from pilkit.utils import save_image from sortedm2m.fields import SortedManyToManyField from .forms import PhotoFieldWidget __all__ = ('PhotoField', 'ManyPhotosFie...
true
true
f7163953b4e98f271c1d184f936ad3281be2de7f
13,990
py
Python
src/olympia/amo/sitemap.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
src/olympia/amo/sitemap.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
src/olympia/amo/sitemap.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
import datetime import math import os from collections import namedtuple from urllib.parse import urlparse from django.conf import settings from django.contrib.sitemaps import Sitemap as DjangoSitemap from django.db.models import Count, Max, Q from django.template import loader from django.utils.functional import cach...
32.917647
92
0.59757
import datetime import math import os from collections import namedtuple from urllib.parse import urlparse from django.conf import settings from django.contrib.sitemaps import Sitemap as DjangoSitemap from django.db.models import Count, Max, Q from django.template import loader from django.utils.functional import cach...
true
true
f71639dc7301c19e856134c3182b0033b000fd73
9,078
py
Python
app.py
andrius-siup/recipe-book
e08b4bd00bf2e79d65623e6a62d865535695afb2
[ "W3C" ]
null
null
null
app.py
andrius-siup/recipe-book
e08b4bd00bf2e79d65623e6a62d865535695afb2
[ "W3C" ]
null
null
null
app.py
andrius-siup/recipe-book
e08b4bd00bf2e79d65623e6a62d865535695afb2
[ "W3C" ]
1
2021-06-06T19:21:07.000Z
2021-06-06T19:21:07.000Z
import os from flask import ( Flask, flash, render_template, redirect, request, session, url_for) from flask_pymongo import PyMongo from bson.objectid import ObjectId from werkzeug.security import generate_password_hash, check_password_hash if os.path.exists("env.py"): import env app = Flask(__name__) app.c...
33.498155
79
0.630205
import os from flask import ( Flask, flash, render_template, redirect, request, session, url_for) from flask_pymongo import PyMongo from bson.objectid import ObjectId from werkzeug.security import generate_password_hash, check_password_hash if os.path.exists("env.py"): import env app = Flask(__name__) app.c...
true
true
f7163ae8d9b4b8ad1f3485dbb15b35d439655fb7
7,944
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/maximum-students-taking-exam.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/maximum-students-taking-exam.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/maximum-students-taking-exam.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(m * n * sqrt(m * n)) # Space: O(m * n) # the problem is the same as google codejam 2008 round 3 problem C # https://github.com/kamyu104/GoogleCodeJam-2008/blob/master/Round%203/no_cheating.py import collections from functools import partial # Time: O(E * sqrt(V)) # Space: O(V) # Source code from http:/...
35.783784
96
0.463746
import collections from functools import partial def bipartiteMatch(graph): matching = {} for u in graph: for v in graph[u]: if v not in matching: matching[v] = u break while 1: preds = {} ...
true
true
f7163b255379b5cf9193461da5b080f53d6d16ab
3,775
py
Python
tests/settings.py
ShreeshaRelysys/openwisp-utils
7c0b5f249b0e8e1f3af7bf1942b6543c9375dd75
[ "BSD-3-Clause" ]
null
null
null
tests/settings.py
ShreeshaRelysys/openwisp-utils
7c0b5f249b0e8e1f3af7bf1942b6543c9375dd75
[ "BSD-3-Clause" ]
1
2022-01-25T17:46:52.000Z
2022-01-25T17:46:52.000Z
tests/settings.py
ShreeshaRelysys/openwisp-utils
7c0b5f249b0e8e1f3af7bf1942b6543c9375dd75
[ "BSD-3-Clause" ]
null
null
null
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^' SELENIUM_HEADLESS = True if os.environ.get('SELENIUM_HEADLESS', False) else False DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'django.contrib.auth', 'dj...
28.816794
84
0.668344
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^' SELENIUM_HEADLESS = True if os.environ.get('SELENIUM_HEADLESS', False) else False DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'django.contrib.auth', 'dj...
true
true
f7163cfff64ff8625e0a556e900a1ef0e9f60f52
13,630
py
Python
mpe/environment.py
semitable/multiagent-particle-envs
2cef12f72a9192a819ef289646526801c39fb909
[ "MIT" ]
null
null
null
mpe/environment.py
semitable/multiagent-particle-envs
2cef12f72a9192a819ef289646526801c39fb909
[ "MIT" ]
null
null
null
mpe/environment.py
semitable/multiagent-particle-envs
2cef12f72a9192a819ef289646526801c39fb909
[ "MIT" ]
2
2022-01-12T17:51:03.000Z
2022-03-31T07:31:31.000Z
import gym from gym import spaces from gym.envs.registration import EnvSpec import numpy as np from mpe.multi_discrete import MultiDiscrete import copy # environment for all agents in the multiagent world # currently code assumes that no agents will be created/destroyed at runtime! class MultiAgentEnv(gym.Env): me...
37.651934
124
0.574101
import gym from gym import spaces from gym.envs.registration import EnvSpec import numpy as np from mpe.multi_discrete import MultiDiscrete import copy class MultiAgentEnv(gym.Env): metadata = { 'render.modes' : ['human', 'rgb_array'] } def __init__(self, world, reset_callback=None, reward_callbac...
true
true
f7163d24a95dcc2a6bddc0e3154afb84cd313c70
53
py
Python
python/tevreden/__init__.py
lhengstmengel/tevreden-sdk
704b575b264f72954a7bb3afc57a9db94f1e273b
[ "MIT" ]
null
null
null
python/tevreden/__init__.py
lhengstmengel/tevreden-sdk
704b575b264f72954a7bb3afc57a9db94f1e273b
[ "MIT" ]
null
null
null
python/tevreden/__init__.py
lhengstmengel/tevreden-sdk
704b575b264f72954a7bb3afc57a9db94f1e273b
[ "MIT" ]
null
null
null
from tevreden.apiclient import APIClient
8.833333
40
0.679245
from tevreden.apiclient import APIClient
true
true
f7163d273bf82ffe2219a42636d894ab274c7014
1,758
py
Python
code--Django/MulVAL_BAG/venv/lib/python3.7/site-packages/parse/parse.py
MekAkUActOR/BAG_MulVAL
e0ba159f2eba0a1aaaa3176363d88cadedd90222
[ "MIT" ]
7
2020-10-10T03:25:20.000Z
2022-02-21T10:02:33.000Z
code--Django/MulVAL_BAG/venv/lib/python3.7/site-packages/parse/parse.py
bestwishCT/BAG_MulVAL
e0ba159f2eba0a1aaaa3176363d88cadedd90222
[ "MIT" ]
2
2021-06-22T00:06:31.000Z
2022-03-29T06:24:50.000Z
code--Django/MulVAL_BAG/venv/lib/python3.7/site-packages/parse/parse.py
bestwishCT/BAG_MulVAL
e0ba159f2eba0a1aaaa3176363d88cadedd90222
[ "MIT" ]
3
2021-07-25T11:05:07.000Z
2022-01-08T08:46:24.000Z
# -*- coding: utf-8 -*- """ Created on Wed May 08 16:11:28 2013 @author: kshmirko """ import re from ios.readMeteoBlock import readMeteoFile, readMeteoCtx import StringIO from datetime import datetime, timedelta class ParserException(Exception): def __init__(self, text): super(ParserException, self).__in...
24.416667
129
0.597838
""" Created on Wed May 08 16:11:28 2013 @author: kshmirko """ import re from ios.readMeteoBlock import readMeteoFile, readMeteoCtx import StringIO from datetime import datetime, timedelta class ParserException(Exception): def __init__(self, text): super(ParserException, self).__init__(text) regex = re.c...
false
true
f7163d55c4d7ee055eddf4948ff15e01024bdcbf
2,574
py
Python
wstools/scan_download.py
inductiveload/wstools
b354a642b10a8d1bfa2a7683d2270c42512cb25d
[ "MIT" ]
null
null
null
wstools/scan_download.py
inductiveload/wstools
b354a642b10a8d1bfa2a7683d2270c42512cb25d
[ "MIT" ]
null
null
null
wstools/scan_download.py
inductiveload/wstools
b354a642b10a8d1bfa2a7683d2270c42512cb25d
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import argparse import logging from xlsx2csv import Xlsx2csv from io import StringIO import csv import os import subprocess import utils.ht_source def parse_header_row(hr): mapping = {} for i, col in enumerate(hr): mapping[col.lower()] = i return mapping def handle_r...
26
83
0.612665
import argparse import logging from xlsx2csv import Xlsx2csv from io import StringIO import csv import os import subprocess import utils.ht_source def parse_header_row(hr): mapping = {} for i, col in enumerate(hr): mapping[col.lower()] = i return mapping def handle_row(r, args): print(...
true
true
f7163da8393455426f9f86eb28054d4db2ae3791
657
py
Python
tests/test_vt100_output.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
tests/test_vt100_output.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
tests/test_vt100_output.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
from prompt_toolkit.output.vt100 import _get_closest_ansi_color def test_get_closest_ansi_color(): # White assert _get_closest_ansi_color(255, 255, 255) == "ansiwhite" assert _get_closest_ansi_color(250, 250, 250) == "ansiwhite" # Black assert _get_closest_ansi_color(0, 0, 0) == "ansiblack" a...
34.578947
67
0.724505
from prompt_toolkit.output.vt100 import _get_closest_ansi_color def test_get_closest_ansi_color(): assert _get_closest_ansi_color(255, 255, 255) == "ansiwhite" assert _get_closest_ansi_color(250, 250, 250) == "ansiwhite" assert _get_closest_ansi_color(0, 0, 0) == "ansiblack" assert _get_close...
true
true
f7163dec326b34497f296ba51ed9239979207054
27,795
py
Python
decompiler/magic.py
Gouvernathor/unrpyc
25f4470ea1612ecacec578efcecc3054a59098c8
[ "MIT" ]
490
2015-01-02T19:37:41.000Z
2022-03-27T09:26:53.000Z
decompiler/magic.py
Gouvernathor/unrpyc
25f4470ea1612ecacec578efcecc3054a59098c8
[ "MIT" ]
114
2015-01-02T06:14:15.000Z
2022-03-31T23:24:39.000Z
decompiler/magic.py
Gouvernathor/unrpyc
25f4470ea1612ecacec578efcecc3054a59098c8
[ "MIT" ]
123
2015-01-02T18:17:53.000Z
2022-03-29T13:25:17.000Z
# Copyright (c) 2015 CensoredUsername # This module provides tools for safely analyizing pickle files programmatically import sys PY3 = sys.version_info >= (3, 0) PY2 = not PY3 import types import pickle import struct if PY3: from io import BytesIO as StringIO else: from cStringIO import StringIO __all__ ...
41.177778
122
0.673862
import sys PY3 = sys.version_info >= (3, 0) PY2 = not PY3 import types import pickle import struct if PY3: from io import BytesIO as StringIO else: from cStringIO import StringIO __all__ = [ "load", "loads", "safe_load", "safe_loads", "safe_dump", "safe_dumps", "fake_package", "remove_fake_package...
true
true
f7163f09627011e16f710ab47f0b28e594f76ff4
466
py
Python
livebot/migrations/0012_auto_20170731_2013.py
bsquidwrd/Live-Bot
f28f028ddc371b86e19df6f603aa3b14bab93533
[ "MIT" ]
1
2019-02-27T10:38:46.000Z
2019-02-27T10:38:46.000Z
livebot/migrations/0012_auto_20170731_2013.py
bsquidwrd/Live-Bot
f28f028ddc371b86e19df6f603aa3b14bab93533
[ "MIT" ]
21
2017-08-03T01:01:31.000Z
2020-06-05T18:02:20.000Z
livebot/migrations/0012_auto_20170731_2013.py
bsquidwrd/Live-Bot
f28f028ddc371b86e19df6f603aa3b14bab93533
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 03:13 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('livebot', '0011_auto_20170731_2011'), ] operations = [ migrations.AlterModelOptions...
23.3
93
0.643777
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('livebot', '0011_auto_20170731_2011'), ] operations = [ migrations.AlterModelOptions( name='notification', options={'verbose_name': '...
true
true
f7163fa0dee4221d901279b0ac5dae6527bc823c
4,872
py
Python
model_zoo/official/nlp/lstm/eval.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "Apache-2.0" ]
null
null
null
model_zoo/official/nlp/lstm/eval.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "Apache-2.0" ]
null
null
null
model_zoo/official/nlp/lstm/eval.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "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...
46.4
107
0.631773
import argparse import os import numpy as np from src.config import lstm_cfg as cfg, lstm_cfg_ascend from src.dataset import lstm_create_dataset, convert_to_mindrecord from src.lr_schedule import get_lr from src.lstm import SentimentNet from mindspore import Tensor, nn, Model, context from mindspore.nn import Accurac...
true
true
f7163ffb1d48a4c69218cceb0d24ae429e4459db
2,248
py
Python
specifications/auto_grader.py
fusiongyro/contest-automata
388a38baae98bbb8dc9f70e7a428f3b60e7380bb
[ "BSD-3-Clause" ]
null
null
null
specifications/auto_grader.py
fusiongyro/contest-automata
388a38baae98bbb8dc9f70e7a428f3b60e7380bb
[ "BSD-3-Clause" ]
null
null
null
specifications/auto_grader.py
fusiongyro/contest-automata
388a38baae98bbb8dc9f70e7a428f3b60e7380bb
[ "BSD-3-Clause" ]
null
null
null
## # This is the auto-grader for the project. ## import sys, shutil, os, dfaParser ## # Given the teamname and the input (DFA) file name, converts user input # file into haskell file and execute the file. The output is piped # to out.dat. ## def compileRun(teamname, dfa): os.system("python dfaParser.py " + dfa) ...
27.084337
84
0.702847
import sys, shutil, os, dfaParser def compileRun(teamname, dfa): os.system("python dfaParser.py " + dfa) os.system("ghc " + teamname + ".nfa.hs") os.system("./" + teamname + ".nfa > out.dat") def checkAnswer(teamname): resultFile = "result." + teamname + ".dat" os.system("diff out.dat solution > " + resultFi...
false
true
f71640025ffae92102ad3de901450b81ff6e14af
2,741
py
Python
examples/charts/file/hover_span.py
pyjsdev/googlemap_flask
9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5
[ "BSD-3-Clause" ]
2
2019-05-24T14:07:33.000Z
2019-05-24T14:36:19.000Z
examples/charts/file/hover_span.py
pyjsdev/googlemap_flask
9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5
[ "BSD-3-Clause" ]
null
null
null
examples/charts/file/hover_span.py
pyjsdev/googlemap_flask
9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5
[ "BSD-3-Clause" ]
1
2021-09-09T03:33:04.000Z
2021-09-09T03:33:04.000Z
import pandas as pd from bokeh.charts import Line, Scatter, show, output_file, defaults from bokeh.layouts import gridplot from bokeh.models import HoverTool from bokeh.sampledata.degrees import data defaults.width = 500 defaults.height = 300 TOOLS='box_zoom,box_select,hover,crosshair,reset' TOOLTIPS = [ ("y", "$~y...
31.872093
86
0.676395
import pandas as pd from bokeh.charts import Line, Scatter, show, output_file, defaults from bokeh.layouts import gridplot from bokeh.models import HoverTool from bokeh.sampledata.degrees import data defaults.width = 500 defaults.height = 300 TOOLS='box_zoom,box_select,hover,crosshair,reset' TOOLTIPS = [ ("y", "$~y...
true
true
f716411cdba7b9542f41d46f5963695af627aed2
732
py
Python
integrationtest/vm/vm_offering/test_hotplugin_memory_c7.py
bgerxx/woodpecker
fdc51245945cc9be4d1f028988079213eb99b2ad
[ "Apache-2.0" ]
null
null
null
integrationtest/vm/vm_offering/test_hotplugin_memory_c7.py
bgerxx/woodpecker
fdc51245945cc9be4d1f028988079213eb99b2ad
[ "Apache-2.0" ]
null
null
null
integrationtest/vm/vm_offering/test_hotplugin_memory_c7.py
bgerxx/woodpecker
fdc51245945cc9be4d1f028988079213eb99b2ad
[ "Apache-2.0" ]
null
null
null
''' @author: FangSun ''' import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import functools _config_ = { 'timeout' : 1000, 'noparallel' : True } test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_state.TestStateDict() ''' def test() This ...
23.612903
58
0.625683
import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import functools _config_ = { 'timeout' : 1000, 'noparallel' : True } test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_state.TestStateDict() test = functools.partial(test_stub.vm_offeri...
true
true
f716454730d5c1602c8d8bf63c6dfeaee57d2e2c
5,725
py
Python
evepraisal/views.py
fucema/evepraisal
9e35803118928696e17bd82510a1331724b3a00e
[ "Unlicense" ]
null
null
null
evepraisal/views.py
fucema/evepraisal
9e35803118928696e17bd82510a1331724b3a00e
[ "Unlicense" ]
null
null
null
evepraisal/views.py
fucema/evepraisal
9e35803118928696e17bd82510a1331724b3a00e
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ An Eve Online Cargo Scanner """ import time import json from flask import ( g, flash, request, render_template, url_for, redirect, session, send_from_directory, abort) from sqlalchemy import desc import evepaste from helpers import login_required from estimate import get_market...
29.663212
78
0.608559
import time import json from flask import ( g, flash, request, render_template, url_for, redirect, session, send_from_directory, abort) from sqlalchemy import desc import evepaste from helpers import login_required from estimate import get_market_prices from models import Appraisals, Users, appraisal_count fr...
true
true
f71645634067780989b528d6dbd814017009be67
1,620
py
Python
Toolkits/Discovery/meta/searx/searx/engines/blekko_images.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/Discovery/meta/searx/searx/engines/blekko_images.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/Discovery/meta/searx/searx/engines/blekko_images.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
""" Blekko (Images) @website https://blekko.com @provide-api yes (inofficial) @using-api yes @results JSON @stable yes @parse url, title, img_src """ from json import loads from searx.url_utils import urlencode # engine dependent config categories = ['images'] paging = True safesearch = ...
22.816901
84
0.571605
from json import loads from searx.url_utils import urlencode categories = ['images'] paging = True safesearch = True base_url = 'https://blekko.com' search_url = '/api/images?{query}&c={c}' safesearch_types = {2: '1', 1: '', 0: '0'} def request(query, params): c = (para...
true
true
f71645c0c0fb267e3a9d8d27f97d0ec8b8f3d710
22,819
py
Python
py/observer/ObserverData.py
nwfsc-fram/pyFieldSoftware
477ba162b66ede2263693cda8c5a51d27eaa3b89
[ "MIT" ]
null
null
null
py/observer/ObserverData.py
nwfsc-fram/pyFieldSoftware
477ba162b66ede2263693cda8c5a51d27eaa3b89
[ "MIT" ]
176
2019-11-22T17:44:55.000Z
2021-10-20T23:40:03.000Z
py/observer/ObserverData.py
nwfsc-fram/pyFieldSoftware
477ba162b66ede2263693cda8c5a51d27eaa3b89
[ "MIT" ]
1
2021-05-07T01:06:32.000Z
2021-05-07T01:06:32.000Z
# ----------------------------------------------------------------------------- # Name: ObserverData.py # Purpose: Observer Database routines # # Author: Will Smith <will.smith@noaa.gov> # # Created: Jan - July, 2016 # License: MIT # --------------------------------------------------------------...
36.686495
117
0.640168
from operator import itemgetter from PyQt5.QtCore import pyqtProperty, QObject, QVariant from py.observer.ObserverDBUtil import ObserverDBUtil from py.observer.ObserverDBModels import Lookups, Users, Vessels, \ Programs, Contacts, VesselContacts, Ports, CatchCategories, IfqDealers, Species from py.observer.Obs...
true
true
f716461f33bb89db290e03f930670a8c2c58abd5
4,917
py
Python
test/functional/p2p_node_network_limited.py
The-Bitcoin-Phantom/The-bitcoin-Phantom
c914b51924932f07026eb6ba057c6e375e4dcdac
[ "MIT" ]
null
null
null
test/functional/p2p_node_network_limited.py
The-Bitcoin-Phantom/The-bitcoin-Phantom
c914b51924932f07026eb6ba057c6e375e4dcdac
[ "MIT" ]
null
null
null
test/functional/p2p_node_network_limited.py
The-Bitcoin-Phantom/The-bitcoin-Phantom
c914b51924932f07026eb6ba057c6e375e4dcdac
[ "MIT" ]
1
2020-11-04T06:59:19.000Z
2020-11-04T06:59:19.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The bitphantom Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests NODE_NETWORK_LIMITED. Tests that a node configured with -prune=550 signals NODE_NETWORK_LIMIT...
40.636364
121
0.693512
from test_framework.messages import CInv, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS from test_framework.mininode import P2PInterface, mininode_lock from test_framework.test_framework import bitphantomTestFramework from test_framework.util import ( assert_equal, disconnect_nodes, connect_no...
true
true
f7164659386641171d3bd75324ad46792423c6e2
818
py
Python
evidently/analyzers/test_utils.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
evidently/analyzers/test_utils.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
evidently/analyzers/test_utils.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
import datetime import unittest import pandas from evidently.analyzers.utils import process_columns from evidently.pipeline.column_mapping import ColumnMapping class TestUtils(unittest.TestCase): def test_process_columns(self): dataset = pandas.DataFrame.from_dict([ dict(datetime=datetime.da...
32.72
90
0.660147
import datetime import unittest import pandas from evidently.analyzers.utils import process_columns from evidently.pipeline.column_mapping import ColumnMapping class TestUtils(unittest.TestCase): def test_process_columns(self): dataset = pandas.DataFrame.from_dict([ dict(datetime=datetime.da...
true
true
f716469fc9aafa94a0b15694c9c6e42ee3698e48
1,311
py
Python
tests/components/yeelight/test_binary_sensor.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
tests/components/yeelight/test_binary_sensor.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
tests/components/yeelight/test_binary_sensor.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Test the Yeelight binary sensor.""" from unittest.mock import patch from homeassistant.components.yeelight import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_component from homeassistant.setup import async_setup_component from . import MODULE, NAME, PROPERTIES, YAML...
35.432432
74
0.764302
from unittest.mock import patch from homeassistant.components.yeelight import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_component from homeassistant.setup import async_setup_component from . import MODULE, NAME, PROPERTIES, YAML_CONFIGURATION, _mocked_bulb ENTITY_BI...
true
true
f7164704b1c192777023ed6248ee9dad022d4284
26,727
py
Python
project4/util.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
project4/util.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
project4/util.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
# util.py # ------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # Attri...
38.5671
111
0.596176
import heapq import random import sys import types import inspect class FixedRandom: def __init__(self): fixedState = (3, (2147483648, 507801126, 683453281, 310439348, 2597246090, \ 2209084787, 2267831527, 979920060, 3098657677, 37650879, 807947081, 3974896263, \ ...
true
true
f716476a8f9925dfffc1e7bbbe2678c6a6fa7d50
11,978
py
Python
tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py
apankratovantonp/open_model_zoo
e372d4173e50741a6828cda415d55c37320f89cd
[ "Apache-2.0" ]
5
2020-03-09T07:39:04.000Z
2021-08-16T07:17:28.000Z
tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py
ananda89/open_model_zoo
e372d4173e50741a6828cda415d55c37320f89cd
[ "Apache-2.0" ]
6
2020-09-26T01:24:39.000Z
2022-02-10T02:16:03.000Z
tools/accuracy_checker/accuracy_checker/metrics/coco_orig_metrics.py
ananda89/open_model_zoo
e372d4173e50741a6828cda415d55c37320f89cd
[ "Apache-2.0" ]
3
2020-07-06T08:45:26.000Z
2020-11-12T10:14:45.000Z
""" Copyright (c) 2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
38.514469
120
0.671648
import os import tempfile import json from ..representation import ( DetectionPrediction, DetectionAnnotation, CoCoInstanceSegmentationAnnotation, CoCocInstanceSegmentationPrediction, PoseEstimationAnnotation, PoseEstimationPrediction ) from ..logging import print_info from ..config import Bas...
true
true
f71647c44c7230a055bc69532f2238510db71164
6,897
py
Python
torch_geometric/nn/conv/han_conv.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
2
2020-08-06T16:14:15.000Z
2021-11-08T07:33:21.000Z
torch_geometric/nn/conv/han_conv.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
1
2021-06-05T10:32:22.000Z
2021-06-05T10:32:22.000Z
torch_geometric/nn/conv/han_conv.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
null
null
null
from typing import Union, Dict, Optional, List import torch from torch import Tensor, nn import torch.nn.functional as F from torch_geometric.typing import NodeType, EdgeType, Metadata, Adj from torch_geometric.nn.dense import Linear from torch_geometric.utils import softmax from torch_geometric.nn.conv impo...
39.637931
80
0.591562
from typing import Union, Dict, Optional, List import torch from torch import Tensor, nn import torch.nn.functional as F from torch_geometric.typing import NodeType, EdgeType, Metadata, Adj from torch_geometric.nn.dense import Linear from torch_geometric.utils import softmax from torch_geometric.nn.conv impo...
true
true
f716483a992293a75bd70369f62a18d9e69ac6ee
522
py
Python
ex0076.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
1
2020-03-26T13:23:17.000Z
2020-03-26T13:23:17.000Z
ex0076.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
ex0076.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
'''Crie um programa que tenha uma tupla única com nomes de produtos e seus respectivos preços na sequência. No final, mostre uma listagem de preços, organizando os dados de forma tabular.''' produtos = ('Lápis', 0.50, 'Suco', 5.00, 'Playstation', 1500.00, 'TV-led', 1200.00, 'Xbox ONE', 1400.00, 'Forza Horizon 4', 200...
58
193
0.666667
produtos = ('Lápis', 0.50, 'Suco', 5.00, 'Playstation', 1500.00, 'TV-led', 1200.00, 'Xbox ONE', 1400.00, 'Forza Horizon 4', 200.00, 'The Last Of Us Part II', 250.00, 'Forza Horizon 3', 150.00) print('====' * 10) print('LOJAS RODRIGUES') for c in range(0,( len(produtos)), 2): print(produtos[c],f'R$: {produtos[c+...
true
true
f71648a0f5d74c82ae3c03976965b13fa5309d24
14,003
py
Python
website/canvas/util.py
bopopescu/canvas
2dfd6009eaecd8dac64ccc6125084e65305fb5d0
[ "BSD-3-Clause" ]
61
2015-11-10T17:13:46.000Z
2021-08-06T17:58:30.000Z
website/canvas/util.py
bopopescu/canvas
2dfd6009eaecd8dac64ccc6125084e65305fb5d0
[ "BSD-3-Clause" ]
13
2015-11-11T07:49:41.000Z
2021-06-09T03:45:31.000Z
website/canvas/util.py
bopopescu/canvas
2dfd6009eaecd8dac64ccc6125084e65305fb5d0
[ "BSD-3-Clause" ]
18
2015-11-11T04:50:04.000Z
2021-08-20T00:57:11.000Z
import base64 import cProfile import cStringIO import collections import gzip import hmac import inspect import itertools import logging import math import os import socket import struct import time from urlparse import urljoin from django.conf import settings from django.db.models import Model, FloatField from django...
33.261283
317
0.66193
import base64 import cProfile import cStringIO import collections import gzip import hmac import inspect import itertools import logging import math import os import socket import struct import time from urlparse import urljoin from django.conf import settings from django.db.models import Model, FloatField from django...
false
true
f71648cbb0f2b7ac15a1c95480a65cfcdb389ca6
237
py
Python
kapre/__init__.py
postpop/kapre
9cf7c3214aae87082f786b7b2d6e5aee64ce6d8f
[ "MIT" ]
1
2019-04-07T00:19:19.000Z
2019-04-07T00:19:19.000Z
kapre/__init__.py
postpop/kapre
9cf7c3214aae87082f786b7b2d6e5aee64ce6d8f
[ "MIT" ]
null
null
null
kapre/__init__.py
postpop/kapre
9cf7c3214aae87082f786b7b2d6e5aee64ce6d8f
[ "MIT" ]
null
null
null
from __future__ import absolute_import __version__ = '0.1.4' VERSION = __version__ from . import time_frequency from . import backend from . import backend_keras from . import augmentation from . import filterbank from . import utils
18.230769
38
0.793249
from __future__ import absolute_import __version__ = '0.1.4' VERSION = __version__ from . import time_frequency from . import backend from . import backend_keras from . import augmentation from . import filterbank from . import utils
true
true
f71648e767d8118878ec23a67b998d4c9d7a819c
1,105
py
Python
app.py
CA-CODE-Works/cert-issuer-dev
51f01d8b8e51f046898592c8e6afcfa9d942c08b
[ "MIT" ]
null
null
null
app.py
CA-CODE-Works/cert-issuer-dev
51f01d8b8e51f046898592c8e6afcfa9d942c08b
[ "MIT" ]
null
null
null
app.py
CA-CODE-Works/cert-issuer-dev
51f01d8b8e51f046898592c8e6afcfa9d942c08b
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import json from flask import Flask, jsonify, request, abort from subprocess import call #import cert_issuer.config #from cert_issuer.blockchain_handlers import bitcoin #import cert_issuer.issue_certificates app = Flask(__name__) config = None # def get_config(): # global config # if config ...
26.309524
97
0.714027
import json from flask import Flask, jsonify, request, abort from subprocess import call app = Flask(__name__) config = None @app.route('/') def hello_world(): call(["/bin/bash", "test.sh"]) return "" @app.route('/wallet') def wallet(): call(["/bin/bash", "wallet.sh"]) return "" if __name__ == ...
true
true
f71649ac4568e4c1a38f99c707fd42b1af856b73
1,511
py
Python
src/tests/dataclass_bakery/generators/test_random_int_generator.py
miguelFLG13/dataclass-bakery
413b5b88ced200e4208e9a25edf520bfc7c31ca5
[ "Apache-2.0" ]
1
2021-10-10T04:52:31.000Z
2021-10-10T04:52:31.000Z
src/tests/dataclass_bakery/generators/test_random_int_generator.py
miguelFLG13/dataclass-bakery
413b5b88ced200e4208e9a25edf520bfc7c31ca5
[ "Apache-2.0" ]
null
null
null
src/tests/dataclass_bakery/generators/test_random_int_generator.py
miguelFLG13/dataclass-bakery
413b5b88ced200e4208e9a25edf520bfc7c31ca5
[ "Apache-2.0" ]
2
2021-06-05T18:41:50.000Z
2022-03-28T02:05:11.000Z
from unittest import TestCase from dataclass_bakery.generators import defaults from dataclass_bakery.generators.random_int_generator import RandomIntGenerator class TestRandomIntGenerator(TestCase): def setUp(self): self.random_int_generator = RandomIntGenerator() def test_generate_int_ok(self): ...
37.775
88
0.734613
from unittest import TestCase from dataclass_bakery.generators import defaults from dataclass_bakery.generators.random_int_generator import RandomIntGenerator class TestRandomIntGenerator(TestCase): def setUp(self): self.random_int_generator = RandomIntGenerator() def test_generate_int_ok(self): ...
true
true
f7164a2fdb4f8686098822d51365dede98c4aa16
2,547
py
Python
cli/polyaxon/schemas/polyflow/container/__init__.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
cli/polyaxon/schemas/polyflow/container/__init__.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
cli/polyaxon/schemas/polyflow/container/__init__.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2019 Polyaxon, 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 o...
33.077922
84
0.712603
from __future__ import absolute_import, division, print_function from hestia.list_utils import to_list from hestia.string_utils import strip_spaces from marshmallow import ValidationError, fields, validates_schema from polyaxon.schemas.base import BaseConfig, BaseSchema from polyaxon.schemas.fields import ObjectOrLi...
true
true
f7164a91212b4b092d71dea1f6b264a0d0d7d96d
4,288
py
Python
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_ofswitch.py
banhr/neutron
4b3e73648327ce9f4d3437986a8663372f577f1b
[ "Apache-2.0" ]
1
2018-10-19T01:48:37.000Z
2018-10-19T01:48:37.000Z
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_ofswitch.py
weiqiLee/neutron
ddc72ebd41a0e7804b33a21583d3add008191229
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_ofswitch.py
weiqiLee/neutron
ddc72ebd41a0e7804b33a21583d3add008191229
[ "Apache-2.0" ]
1
2018-08-28T17:13:16.000Z
2018-08-28T17:13:16.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
40.074766
78
0.660448
import mock from ryu.ofproto import ofproto_v1_3 from ryu.ofproto import ofproto_v1_3_parser from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.native \ import ofswitch from neutron.tests import base class FakeReply(object): def __init__(self, type): self.type = type class TestBundledOpen...
true
true
f7164b30ca62a217c7eede4b93e61cd343280927
25,782
py
Python
Orio/orio/main/tuner/skeleton_code.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/main/tuner/skeleton_code.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/main/tuner/skeleton_code.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
# # The skeleton code used for performance testing # import re, sys from orio.main.util.globals import * #----------------------------------------------------- SEQ_TIMER = ''' #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <sys/time.h> #ifdef BGP_COUNTER #define SPRN_TBRL 0x10C /...
33.614081
123
0.59526
import re, sys from orio.main.util.globals import * SEQ_TIMER = ''' #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <sys/time.h> #ifdef BGP_COUNTER #define SPRN_TBRL 0x10C // Time Base Read Lower Register (user & sup R/O) #define SPRN_TBRU 0x10D // Time Base Read Upper Register (u...
true
true
f7164c3b3d1d6ac0d4796def751849537a7f15bf
2,893
py
Python
examples/asyncio/wamp/beginner/server.py
luhn/AutobahnPython
7d519052ab42dc029598ab9e2dbdd7af8e08341f
[ "Apache-2.0" ]
null
null
null
examples/asyncio/wamp/beginner/server.py
luhn/AutobahnPython
7d519052ab42dc029598ab9e2dbdd7af8e08341f
[ "Apache-2.0" ]
null
null
null
examples/asyncio/wamp/beginner/server.py
luhn/AutobahnPython
7d519052ab42dc029598ab9e2dbdd7af8e08341f
[ "Apache-2.0" ]
null
null
null
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## 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:/...
31.107527
79
0.620809
import sys import six import datetime try: import asyncio except ImportError: import trollius as asyncio from autobahn.asyncio import wamp, websocket class MyBackendComponent(wamp.ApplicationSession): def onConnect(self): self.join(u"realm1") @asyncio.coroutine def onJoin(self, details): ...
true
true
f7164e06d9beb5789eb0b2833a37640e21b54097
1,057
py
Python
unit_tests/host/checks/test_securetty.py
ChrisMacNaughton/charms.hardening
0d98669d4be0a50c2027b0479217c288a61048dd
[ "Apache-2.0" ]
1
2016-05-27T14:49:14.000Z
2016-05-27T14:49:14.000Z
unit_tests/host/checks/test_securetty.py
ChrisMacNaughton/charms.hardening
0d98669d4be0a50c2027b0479217c288a61048dd
[ "Apache-2.0" ]
null
null
null
unit_tests/host/checks/test_securetty.py
ChrisMacNaughton/charms.hardening
0d98669d4be0a50c2027b0479217c288a61048dd
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Canonical Limited. # # This file is part of charm-helpers. # # charm-helpers is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 as # published by the Free Software Foundation. # # charm-helpers is distributed in the hope that ...
35.233333
74
0.747398
from unittest import TestCase from charms_hardening.host.checks import securetty class SecureTTYTestCase(TestCase): def test_securetty(self): audits = securetty.get_audits() self.assertEqual(1, len(audits)) audit = audits[0] self.assertTrue(isinstance(audit, securetty.TemplatedF...
true
true
f7164e23a262378cdac37fd86983d9cf906e662f
914
py
Python
python/Validate-Binary-Search-Tree/recursion.py
yutong-xie/Leetcode-with-python
6578f288a757bf76213030b73ec3319a7baa2661
[ "MIT" ]
null
null
null
python/Validate-Binary-Search-Tree/recursion.py
yutong-xie/Leetcode-with-python
6578f288a757bf76213030b73ec3319a7baa2661
[ "MIT" ]
null
null
null
python/Validate-Binary-Search-Tree/recursion.py
yutong-xie/Leetcode-with-python
6578f288a757bf76213030b73ec3319a7baa2661
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright 2020, Yutong Xie, UIUC. Using recursion to validate BST ''' # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.rig...
24.052632
70
0.507659
class Solution(object): def isValidBST(self, root): def helper(node, lower = float('-inf'), upper = float('inf')): if not node: return True val = node.val if val <= lower or val >= upper: return False if not helper(node.left...
true
true
f7164ea55e84788c9420c4d16ae5720e198d41c9
540
py
Python
hackerearth/Algorithms/XOR subsequences/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerearth/Algorithms/XOR subsequences/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerearth/Algorithms/XOR subsequences/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
import io import unittest from contextlib import redirect_stdout from unittest.mock import patch class TestQ(unittest.TestCase): @patch('builtins.input', side_effect=[ '1', '5', '3 2 3 1 2', ]) def test_case_0(self, input_mock=None): text_trap = io.StringIO() with r...
22.5
46
0.568519
import io import unittest from contextlib import redirect_stdout from unittest.mock import patch class TestQ(unittest.TestCase): @patch('builtins.input', side_effect=[ '1', '5', '3 2 3 1 2', ]) def test_case_0(self, input_mock=None): text_trap = io.StringIO() with r...
true
true
f7164fa5560ca4b44abd3c1dee0041be6cea10e5
1,682
py
Python
venv/Lib/site-packages/plotnine/scales/scale_stroke.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
null
null
null
venv/Lib/site-packages/plotnine/scales/scale_stroke.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
1
2020-10-02T21:43:06.000Z
2020-10-15T22:52:39.000Z
venv/Lib/site-packages/plotnine/scales/scale_stroke.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
null
null
null
from warnings import warn import numpy as np from mizani.palettes import rescale_pal from ..doctools import document from ..exceptions import PlotnineWarning from ..utils import alias from .scale import scale_discrete, scale_continuous @document class scale_stroke_continuous(scale_continuous): """ Continuou...
23.041096
66
0.639715
from warnings import warn import numpy as np from mizani.palettes import rescale_pal from ..doctools import document from ..exceptions import PlotnineWarning from ..utils import alias from .scale import scale_discrete, scale_continuous @document class scale_stroke_continuous(scale_continuous): _aesthetics = ['s...
true
true
f7164fed64353c46191cfb979c30db130aa2644f
624
py
Python
data/external/repositories/141822/AXA_Telematics-master/Features/modules_janto/contrast.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/141822/AXA_Telematics-master/Features/modules_janto/contrast.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/141822/AXA_Telematics-master/Features/modules_janto/contrast.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
# -*- coding: utf-8 -*- """ (c) 2015 @author: Janto Oellrich email: joellrich@uos.de CONTENT Function for contrast driver sampling """ from modules import * def sampleContrast(trips,n_ref=1000): """ Given the featmatrix samples n_ref contrast trips. """ print 'Sampling contras...
23.111111
82
0.621795
""" (c) 2015 @author: Janto Oellrich email: joellrich@uos.de CONTENT Function for contrast driver sampling """ from modules import * def sampleContrast(trips,n_ref=1000): """ Given the featmatrix samples n_ref contrast trips. """ print 'Sampling contrast trips...' ...
false
true
f7164ff9b4c3431a3e2f15fb85cf546bac7adf85
154
py
Python
bot.py
radimbig/Rouneford
9803ffdbc406d122a02db00d7dd73e70c7c1b4aa
[ "MIT" ]
10
2019-02-21T20:02:18.000Z
2022-03-21T13:45:59.000Z
bot.py
radimbig/Rouneford
9803ffdbc406d122a02db00d7dd73e70c7c1b4aa
[ "MIT" ]
null
null
null
bot.py
radimbig/Rouneford
9803ffdbc406d122a02db00d7dd73e70c7c1b4aa
[ "MIT" ]
4
2021-04-05T14:55:15.000Z
2022-03-21T12:54:57.000Z
# | Created by Ar4ikov # | Время: 04.02.2019 - 20:19 from core.core import RounefordBot bot = RounefordBot(access_token="Ваш-Access-Token") bot.run()
15.4
51
0.714286
from core.core import RounefordBot bot = RounefordBot(access_token="Ваш-Access-Token") bot.run()
true
true
f716502c208f4354a8f11badd10567d680d691b0
1,626
py
Python
populate_projects.py
anibalsolon/brainhack-donostia.github.io
ad4f30f938923af7ff85fed542972f94f2032d13
[ "MIT" ]
null
null
null
populate_projects.py
anibalsolon/brainhack-donostia.github.io
ad4f30f938923af7ff85fed542972f94f2032d13
[ "MIT" ]
4
2020-10-08T13:55:23.000Z
2020-10-28T13:03:49.000Z
populate_projects.py
anibalsolon/brainhack-donostia.github.io
ad4f30f938923af7ff85fed542972f94f2032d13
[ "MIT" ]
9
2020-10-08T14:02:55.000Z
2021-12-02T19:00:36.000Z
import os import pandas as pd from string import Template import wget csv_file_path = "https://docs.google.com/spreadsheets/d/1AlflVlTg1KmajQrWBOUBT2XeoAUqfjB9SCQfDIPvSXo/export?format=csv&gid=565678921" project_card_path = "assets/templates/project_card.html" projects_page_path = "assets/templates/template_projects.m...
29.563636
133
0.652522
import os import pandas as pd from string import Template import wget csv_file_path = "https://docs.google.com/spreadsheets/d/1AlflVlTg1KmajQrWBOUBT2XeoAUqfjB9SCQfDIPvSXo/export?format=csv&gid=565678921" project_card_path = "assets/templates/project_card.html" projects_page_path = "assets/templates/template_projects.m...
true
true
f7165078f05b4c42f6ab63c51dd0975bdc58bb20
1,905
py
Python
tests/test_allocator.py
genged/serverallocator
39c58ab96d451fc237e055d7b9c6a446d0074877
[ "Apache-2.0" ]
null
null
null
tests/test_allocator.py
genged/serverallocator
39c58ab96d451fc237e055d7b9c6a446d0074877
[ "Apache-2.0" ]
null
null
null
tests/test_allocator.py
genged/serverallocator
39c58ab96d451fc237e055d7b9c6a446d0074877
[ "Apache-2.0" ]
1
2019-06-26T13:50:04.000Z
2019-06-26T13:50:04.000Z
from allocation.allocator import Server, App, Allocator s1 = Server(32, 16, 1000, name="s1") s2 = Server(32, 16, 1000, name="s2") def test_allocate_tasks_servers_single_server_task(): _a = App(12, 12, 500) alloc = Allocator([s1], [_a]) res = alloc.allocate() expected = [ { "node"...
23.8125
117
0.549606
from allocation.allocator import Server, App, Allocator s1 = Server(32, 16, 1000, name="s1") s2 = Server(32, 16, 1000, name="s2") def test_allocate_tasks_servers_single_server_task(): _a = App(12, 12, 500) alloc = Allocator([s1], [_a]) res = alloc.allocate() expected = [ { "node"...
true
true
f71650e79d12d7042562e07291e570fa83922710
2,081
py
Python
heart_app/views.py
kylepgr/heart-disease-pred
d128cc815dde4839ba18e887113bb47387499ce1
[ "MIT" ]
null
null
null
heart_app/views.py
kylepgr/heart-disease-pred
d128cc815dde4839ba18e887113bb47387499ce1
[ "MIT" ]
null
null
null
heart_app/views.py
kylepgr/heart-disease-pred
d128cc815dde4839ba18e887113bb47387499ce1
[ "MIT" ]
null
null
null
from typing_extensions import SupportsIndex from django.shortcuts import render # Create your views here. from django.http import HttpResponse from .forms import InputForm import pandas as pd import numpy as np import pickle from pymongo import MongoClient client = MongoClient('localhost', 27017) db = cli...
28.902778
92
0.600192
from typing_extensions import SupportsIndex from django.shortcuts import render from django.http import HttpResponse from .forms import InputForm import pandas as pd import numpy as np import pickle from pymongo import MongoClient client = MongoClient('localhost', 27017) db = client['PatientDB'] loade...
true
true
f71652cd4034f334dbe9ad941342313344d3ebb5
338
py
Python
src/logger.py
matthiasBT/task_queue
a117c28da0c0150d6f9d8e3e56222e39e9020294
[ "MIT" ]
null
null
null
src/logger.py
matthiasBT/task_queue
a117c28da0c0150d6f9d8e3e56222e39e9020294
[ "MIT" ]
null
null
null
src/logger.py
matthiasBT/task_queue
a117c28da0c0150d6f9d8e3e56222e39e9020294
[ "MIT" ]
null
null
null
import logging FORMATTER = logging.Formatter('%(asctime)-15s %(name)-12s: %(levelname)-8s %(message)s') def get_logger(logger_name): logger = logging.getLogger(logger_name) handler = logging.StreamHandler() handler.setFormatter(FORMATTER) logger.addHandler(handler) logger.setLevel(logging.DEBUG) ...
26
88
0.730769
import logging FORMATTER = logging.Formatter('%(asctime)-15s %(name)-12s: %(levelname)-8s %(message)s') def get_logger(logger_name): logger = logging.getLogger(logger_name) handler = logging.StreamHandler() handler.setFormatter(FORMATTER) logger.addHandler(handler) logger.setLevel(logging.DEBUG) ...
true
true
f7165385a558d6bcdd2f949ec3ae80308ee14e61
1,382
py
Python
app/schemas/users_schema.py
nubilfi/fastapi-starter-kit
99a326099c3446584dd0ef18b123c42ba360d364
[ "MIT" ]
null
null
null
app/schemas/users_schema.py
nubilfi/fastapi-starter-kit
99a326099c3446584dd0ef18b123c42ba360d364
[ "MIT" ]
1
2021-03-17T08:24:12.000Z
2021-03-17T08:24:12.000Z
app/schemas/users_schema.py
nubilfi/fastapi-starter-kit
99a326099c3446584dd0ef18b123c42ba360d364
[ "MIT" ]
null
null
null
""" It is a Pydantic model for Users """ from typing import Optional from pydantic import BaseModel, EmailStr class UsersBase(BaseModel): """ A schema class used to represent Users table column values """ Username: Optional[str] = None Fullname: Optional[str] = None Email: Optional[EmailStr] =...
20.028986
64
0.62301
from typing import Optional from pydantic import BaseModel, EmailStr class UsersBase(BaseModel): Username: Optional[str] = None Fullname: Optional[str] = None Email: Optional[EmailStr] = None Status: bool = None class Config: orm_mode = True class UsersCreate(UsersBase): Username: s...
true
true
f71654c0cce099e4833874597c1371fa21b320d7
4,188
py
Python
kubernetes_asyncio/client/api/apiregistration_api.py
dineshsonachalam/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
1
2021-02-25T04:36:18.000Z
2021-02-25T04:36:18.000Z
kubernetes_asyncio/client/api/apiregistration_api.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/api/apiregistration_api.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import r...
33.238095
119
0.620105
from __future__ import absolute_import import re import six from kubernetes_asyncio.client.api_client import ApiClient class ApiregistrationApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def ge...
true
true
f7165577ff3dd7cd5788b42cf832946dcd47c7cc
512
py
Python
mainapp/migrations/0056_auto_20180819_1420.py
reyasmohammed/rescuekerala
68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c
[ "MIT" ]
1
2021-12-09T17:59:01.000Z
2021-12-09T17:59:01.000Z
mainapp/migrations/0056_auto_20180819_1420.py
reyasmohammed/rescuekerala
68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c
[ "MIT" ]
1
2018-08-18T12:00:29.000Z
2018-08-18T12:00:29.000Z
mainapp/migrations/0056_auto_20180819_1420.py
reyasmohammed/rescuekerala
68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c
[ "MIT" ]
5
2019-11-07T11:34:56.000Z
2019-11-07T11:36:00.000Z
# Generated by Django 2.1 on 2018-08-19 08:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0055_rescuecamp_facilities_available'), ] operations = [ migrations.AlterField( model_name='rescuecamp', na...
26.947368
147
0.646484
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0055_rescuecamp_facilities_available'), ] operations = [ migrations.AlterField( model_name='rescuecamp', name='facilities_available', field=m...
true
true
f71655cb97a9c639ac16beca73e658af16c9bb94
1,003
py
Python
__init__.py
Pratik2587/Medical-Cost-Predictor-
69e23300e24edd121c6c26e1f3ba71adf8c779ad
[ "MIT" ]
1
2020-07-17T23:16:21.000Z
2020-07-17T23:16:21.000Z
__init__.py
Pratik2587/Medical-Cost-Predictor-
69e23300e24edd121c6c26e1f3ba71adf8c779ad
[ "MIT" ]
null
null
null
__init__.py
Pratik2587/Medical-Cost-Predictor-
69e23300e24edd121c6c26e1f3ba71adf8c779ad
[ "MIT" ]
null
null
null
# init.py from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager # init SQLAlchemy so we can use it later in our models db = SQLAlchemy() def create_app(): app = Flask(__name__) app.config['SECRET_KEY'] = '9OLWxND4o83j4K4iuopO' app.config['SQLALCHEMY_DATABA...
27.108108
103
0.724826
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager db = SQLAlchemy() def create_app(): app = Flask(__name__) app.config['SECRET_KEY'] = '9OLWxND4o83j4K4iuopO' app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite' db.init_app(app) login...
true
true
f71655d23318261e91879bbd7165b323acf8dd52
51,690
py
Python
src/scseirx/model_SEIRX.py
JanaLasser/agent_based_COVID_SEIRX
c4e28d472a0484fe1a125ba6974683973141c09e
[ "MIT" ]
7
2020-11-16T12:34:18.000Z
2022-01-28T15:09:09.000Z
src/scseirx/model_SEIRX.py
JanaLasser/agent_based_COVID_SEIRX
c4e28d472a0484fe1a125ba6974683973141c09e
[ "MIT" ]
62
2020-11-23T07:51:44.000Z
2022-03-18T12:56:37.000Z
src/scseirx/model_SEIRX.py
JanaLasser/agent_based_COVID_SEIRX
c4e28d472a0484fe1a125ba6974683973141c09e
[ "MIT" ]
8
2020-11-30T09:45:55.000Z
2022-03-18T11:20:23.000Z
import numpy as np import networkx as nx from math import gamma from scipy.optimize import root_scalar from mesa import Model from mesa.time import RandomActivation, SimultaneousActivation from mesa.datacollection import DataCollector from scseirx.testing_strategy import Testing ## data collection functions ## def g...
44.869792
98
0.634862
import numpy as np import networkx as nx from math import gamma from scipy.optimize import root_scalar from mesa import Model from mesa.time import RandomActivation, SimultaneousActivation from mesa.datacollection import DataCollector from scseirx.testing_strategy import Testing def get_N_diagnostic_tests(model): ...
true
true
f7165682eb5afce41035f2bdfef80e240f373985
4,901
py
Python
configs/gdrn/lmoPbrSO/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_bop_test/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_driller_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
33
2021-12-15T07:11:47.000Z
2022-03-29T08:58:32.000Z
configs/gdrn/lmoPbrSO/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_bop_test/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_driller_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
3
2021-12-15T11:39:54.000Z
2022-03-29T07:24:23.000Z
configs/gdrn/lmoPbrSO/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_bop_test/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e_driller_bop_test.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
null
null
null
_base_ = ["../../../_base_/gdrn_base.py"] OUTPUT_DIR = "output/gdrn/lmoPbrSO/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e/driller" INPUT = dict( DZI_PAD_SCALE=1.5, TRUNCATE_FG=False, CHANGE_BG_PROB=0.5, COLOR_AUG_PROB=0.8, COLOR_AUG_TYPE="code", COLOR_AUG_CODE=( "Seque...
35.773723
125
0.556417
_base_ = ["../../../_base_/gdrn_base.py"] OUTPUT_DIR = "output/gdrn/lmoPbrSO/resnest50d_online_AugCosyAAEGray_mlBCE_DoubleMask_lmo_pbr_100e/driller" INPUT = dict( DZI_PAD_SCALE=1.5, TRUNCATE_FG=False, CHANGE_BG_PROB=0.5, COLOR_AUG_PROB=0.8, COLOR_AUG_TYPE="code", COLOR_AUG_CODE=( "Seque...
true
true
f71656b1d13b7744997e72f449279218a8aca12b
2,466
py
Python
L1Trigger/L1CaloTrigger/python/Phase1L1TJets_sincosLUT_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
L1Trigger/L1CaloTrigger/python/Phase1L1TJets_sincosLUT_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
L1Trigger/L1CaloTrigger/python/Phase1L1TJets_sincosLUT_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms sinPhi = cms.vdouble( -0.0353352962792, -0.122533930843, -0.208795013406, -0.293458528818, -0.375876685504, -0.455418871948, -0.531476481737, -0.603467570232, -0.670841307236, -0.733082191603, -0.789713995522, -0.840303408309, -0.884463351833, -0.921855942186, -0.952195074957...
411
1,208
0.786294
import FWCore.ParameterSet.Config as cms sinPhi = cms.vdouble( -0.0353352962792, -0.122533930843, -0.208795013406, -0.293458528818, -0.375876685504, -0.455418871948, -0.531476481737, -0.603467570232, -0.670841307236, -0.733082191603, -0.789713995522, -0.840303408309, -0.884463351833, -0.921855942186, -0.952195074957...
true
true
f71658adc475a0a5c279f34a5b5c93dc79f0e389
4,279
py
Python
examples/models/file/calendars.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
1
2020-05-26T15:21:22.000Z
2020-05-26T15:21:22.000Z
examples/models/file/calendars.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
1
2021-12-15T17:32:31.000Z
2021-12-21T18:11:05.000Z
examples/models/file/calendars.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
1
2021-12-20T05:50:00.000Z
2021-12-20T05:50:00.000Z
''' A rendering of the 2014 monthly calendar. This example demonstrates the usage of plotting several plots together using ``gridplot``. A hover tooltip displays the US holidays on the significant dates. .. bokeh-example-metadata:: :sampledata: us_holidays :apis: bokeh.layouts.gridplot, bokeh.models.tools.Ho...
39.256881
187
0.694087
from calendar import Calendar, day_abbr as day_abbrs, month_name as month_names from bokeh.document import Document from bokeh.embed import file_html from bokeh.layouts import gridplot from bokeh.models import (CategoricalAxis, CategoricalScale, ColumnDataSource, FactorRange, HoverTool, Plot,...
true
true
f7165983d502ba88a113831abb4c27b5654b1d3e
34,532
py
Python
release/stubs.min/System/ComponentModel/__init___parts/MaskedTextProvider.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/ComponentModel/__init___parts/MaskedTextProvider.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/ComponentModel/__init___parts/MaskedTextProvider.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class MaskedTextProvider(object, ICloneable): """ Represents a mask-parsing service that can be used by any number of controls that support masking,such as the System.Windows.Forms.MaskedTextBox control. MaskedTextProvider(mask: str) MaskedTextProvider(mask: str,restrictToAscii: bool) MaskedText...
26.894081
221
0.707923
class MaskedTextProvider(object, ICloneable): def Add(self, input, testPosition=None, resultHint=None): pass def Clear(self, resultHint=None): pass def Clone(self): pass def FindAssignedEditPositionFrom(self, position, direction): pass def FindAssig...
true
true
f7165ac139d7e4ef2705bd723ef20fccdeaff95e
39,822
py
Python
task4_crnn.py
sankar-mukherjee/DCASE-2018---Task-4-
f8034641efef6e60ea721abc5569d9c1aa8ee56d
[ "Apache-2.0" ]
null
null
null
task4_crnn.py
sankar-mukherjee/DCASE-2018---Task-4-
f8034641efef6e60ea721abc5569d9c1aa8ee56d
[ "Apache-2.0" ]
null
null
null
task4_crnn.py
sankar-mukherjee/DCASE-2018---Task-4-
f8034641efef6e60ea721abc5569d9c1aa8ee56d
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################### # This code is an adaptation from Toni Heittola's code [task1 baseline dcase 2018](https://github.com/DCASE-REPO/dcase2018_baseline/tree/master/task1/) # Copyright Nicolas Turpault, Romain Serizel, H...
42.681672
151
0.540405
# Copyright Nicolas Turpault, Romain Serizel, Hamid Eghbal-zadeh, Ankit Parag Shah, 2018, v1.0 # This software is distributed under the terms of the License MIT ######################################################################### import dcase_util import sys import numpy import os import random import pickle impo...
true
true
f7165bea9e7574fc50217998b978a4d5e0e583bd
29,649
py
Python
tests/contrib/hooks/test_spark_submit_hook.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
null
null
null
tests/contrib/hooks/test_spark_submit_hook.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
3
2021-03-10T02:58:18.000Z
2021-09-29T17:34:48.000Z
tests/contrib/hooks/test_spark_submit_hook.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # 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 #...
42.235043
90
0.588013
import io import unittest from unittest.mock import call, patch from airflow import AirflowException from airflow.contrib.hooks.spark_submit_hook import SparkSubmitHook from airflow.models import Connection from airflow.utils import db class TestSparkSubmitHook(unittest.TestCase): _spark_job_file = 'test_appli...
true
true
f7165cf1f7fa7343d3026963a9b227304d4ef57f
2,956
py
Python
account_keeping/forms.py
bitlabstudio/django-account-keeping
9f579a5fd912442a2948e2da858a5720de072568
[ "MIT" ]
14
2017-03-29T03:14:16.000Z
2022-03-28T14:11:58.000Z
account_keeping/forms.py
bitlabstudio/django-account-keeping
9f579a5fd912442a2948e2da858a5720de072568
[ "MIT" ]
1
2016-11-08T08:35:49.000Z
2016-11-08T08:35:49.000Z
account_keeping/forms.py
bitmazk/django-account-keeping
9f579a5fd912442a2948e2da858a5720de072568
[ "MIT" ]
4
2017-09-06T00:16:53.000Z
2018-11-25T21:58:39.000Z
"""Forms of the account_keeping app.""" from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from . import models class InvoiceForm(forms.ModelForm): class Meta: model = models.Invoice fields = '__all__' try: ...
33.977011
79
0.589648
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from . import models class InvoiceForm(forms.ModelForm): class Meta: model = models.Invoice fields = '__all__' try: widgets = { 'invoic...
true
true
f7165ee6a7c8a5acb376a2fe2456d8037e0db352
11,305
py
Python
Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
Autocoders/Python/src/fprime_ac/parsers/XmlPortsParser.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # =============================================================================== # NAME: XmlPortsParser.py # # DESCRIPTION: This class parses the XML port types files. # # USAGE: # # AUTHOR: reder # EMAIL: reder@jpl.nasa.gov # DATE CREATED : Feb. 4, 2013 # # Copyright 2007, California Institu...
33.545994
85
0.508271
import logging import os import sys from lxml import etree from fprime_ac.utils import ConfigManager from fprime_ac.utils.exceptions import FprimeRngXmlValidationException PRINT = logging.getLogger("output") DEBUG = logging.getLogger("debug") ROOTDIR = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..",...
true
true
f7165f0360ddc3c4689659445e5f15cdeeb70bab
3,059
py
Python
dockerdb/mongo_pytest.py
includeamin/dockerdb
cb9aca0ae6be1112b04ef9d843751c355005b47d
[ "Apache-2.0" ]
null
null
null
dockerdb/mongo_pytest.py
includeamin/dockerdb
cb9aca0ae6be1112b04ef9d843751c355005b47d
[ "Apache-2.0" ]
null
null
null
dockerdb/mongo_pytest.py
includeamin/dockerdb
cb9aca0ae6be1112b04ef9d843751c355005b47d
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import os import shutil import subprocess import logging import pytest import dockerdb.mongo CONTAINER_CACHE = {} LOG = logging.getLogger(__name__) def insert_data(client, data): for db in data: for collection in data[db]: entries = data[db][collectio...
28.324074
76
0.601831
from __future__ import absolute_import import os import shutil import subprocess import logging import pytest import dockerdb.mongo CONTAINER_CACHE = {} LOG = logging.getLogger(__name__) def insert_data(client, data): for db in data: for collection in data[db]: entries = data[db][collectio...
true
true
f7166010add7d50b95bbe3bc7c86172c2b3ad3fa
876
py
Python
tests/test_instruments_request.py
rockscie/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
12
2019-08-05T16:56:54.000Z
2021-02-02T11:09:37.000Z
tests/test_instruments_request.py
lightning-like/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
null
null
null
tests/test_instruments_request.py
lightning-like/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
5
2019-12-08T15:43:13.000Z
2021-11-14T08:38:07.000Z
import pandas as pd import pytest from async_blp.instruments_requests import InstrumentRequestBase @pytest.mark.asyncio class TestInstrumentRequestBase: def test__weight(self): request = InstrumentRequestBase('query', max_results=5) request.response_fields = ['field_1', 'field_2'] asser...
30.206897
73
0.682648
import pandas as pd import pytest from async_blp.instruments_requests import InstrumentRequestBase @pytest.mark.asyncio class TestInstrumentRequestBase: def test__weight(self): request = InstrumentRequestBase('query', max_results=5) request.response_fields = ['field_1', 'field_2'] asser...
true
true
f71662f015d69cc4a3e8904bd18134ab9e12e9e2
1,649
py
Python
test/mitmproxy/addons/test_clientplayback.py
nikofil/mitmproxy
439c113989feb193972b83ffcd0823ea4d2218df
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_clientplayback.py
nikofil/mitmproxy
439c113989feb193972b83ffcd0823ea4d2218df
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_clientplayback.py
nikofil/mitmproxy
439c113989feb193972b83ffcd0823ea4d2218df
[ "MIT" ]
null
null
null
import pytest from unittest import mock from mitmproxy.test import tflow from mitmproxy import io from mitmproxy import exceptions from mitmproxy.addons import clientplayback from mitmproxy.test import taddons def tdump(path, flows): w = io.FlowWriter(open(path, "wb")) for i in flows: w.add(i) cla...
28.929825
75
0.596725
import pytest from unittest import mock from mitmproxy.test import tflow from mitmproxy import io from mitmproxy import exceptions from mitmproxy.addons import clientplayback from mitmproxy.test import taddons def tdump(path, flows): w = io.FlowWriter(open(path, "wb")) for i in flows: w.add(i) cla...
true
true
f71664184c07162070c1ae4bdafc1b009fa3b980
5,121
py
Python
run_quickquasars.py
olegs22/Quickquasar_QA
df74994780216846501710b79b4dce7d025809c9
[ "MIT" ]
null
null
null
run_quickquasars.py
olegs22/Quickquasar_QA
df74994780216846501710b79b4dce7d025809c9
[ "MIT" ]
null
null
null
run_quickquasars.py
olegs22/Quickquasar_QA
df74994780216846501710b79b4dce7d025809c9
[ "MIT" ]
null
null
null
import numpy as np import os import shutil import glob as glob def get_slurm_script(script_name,command,outdir,idir,mail,log,part,nodes,threads,time,job_name): if os.path.isdir(outdir+'/run') == False: os.mkdir(outdir+'/run') file_name = outdir + '/run/' + script_name f = open(file_name,'w') ...
48.311321
151
0.610623
import numpy as np import os import shutil import glob as glob def get_slurm_script(script_name,command,outdir,idir,mail,log,part,nodes,threads,time,job_name): if os.path.isdir(outdir+'/run') == False: os.mkdir(outdir+'/run') file_name = outdir + '/run/' + script_name f = open(file_name,'w') ...
true
true
f716651b671438a36da3dbcc61e463c30cf5bc75
432
py
Python
client.py
colinhartigan/valorant-web-auth-server
6a12c41ef42d234afbbd6870925c29207428c8ce
[ "MIT" ]
1
2022-01-27T07:49:59.000Z
2022-01-27T07:49:59.000Z
client.py
colinhartigan/valorant-web-auth-server
6a12c41ef42d234afbbd6870925c29207428c8ce
[ "MIT" ]
null
null
null
client.py
colinhartigan/valorant-web-auth-server
6a12c41ef42d234afbbd6870925c29207428c8ce
[ "MIT" ]
null
null
null
from valclient import Client def join_party(username,password,region,party_id): client = Client(region=region,auth={'username':username,'password':password}) client.activate() return client.party_join(party_id) def request_party(username,password,region,party_id): client = Client(region=region,aut...
39.272727
81
0.752315
from valclient import Client def join_party(username,password,region,party_id): client = Client(region=region,auth={'username':username,'password':password}) client.activate() return client.party_join(party_id) def request_party(username,password,region,party_id): client = Client(region=region,aut...
true
true
f71665745e05e263180049a3a63e0c9795c76a64
1,867
py
Python
google/ads/google_ads/v5/services/campaign_experiment_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v5/services/campaign_experiment_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v5/services/campaign_experiment_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
config = { "interfaces": { "google.ads.googleads.v5.services.CampaignExperimentService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_retry_de...
30.112903
67
0.551687
config = { "interfaces": { "google.ads.googleads.v5.services.CampaignExperimentService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_retry_de...
true
true
f71665d4d7a7d68df501099943ae56592dc092fb
278
py
Python
data_etl/__main__.py
VBamgbaye/M_Challenge
310f9b8ee3b6c9534a6dfd3f4ca0c8b56f889fdb
[ "MIT" ]
null
null
null
data_etl/__main__.py
VBamgbaye/M_Challenge
310f9b8ee3b6c9534a6dfd3f4ca0c8b56f889fdb
[ "MIT" ]
null
null
null
data_etl/__main__.py
VBamgbaye/M_Challenge
310f9b8ee3b6c9534a6dfd3f4ca0c8b56f889fdb
[ "MIT" ]
null
null
null
from .stage_data import StageData print('please input the following information:)') password = (input('Database password: ')) host = (input('Host: ')) upload_data = StageData(password, host) data = upload_data.save_to_database() print(f"Data extracted, processed and staged!")
30.888889
49
0.755396
from .stage_data import StageData print('please input the following information:)') password = (input('Database password: ')) host = (input('Host: ')) upload_data = StageData(password, host) data = upload_data.save_to_database() print(f"Data extracted, processed and staged!")
true
true
f7166751991c71ec27687881d5732fe52e4a624f
1,379
py
Python
light_famd/mca.py
marlon27/Light_FAMD
fe4328f15f6145798869908fa126eabe75e85391
[ "BSD-2-Clause" ]
11
2019-11-13T21:46:32.000Z
2021-08-02T13:41:31.000Z
light_famd/mca.py
marlon27/Light_FAMD
fe4328f15f6145798869908fa126eabe75e85391
[ "BSD-2-Clause" ]
5
2019-11-28T10:07:04.000Z
2021-03-11T17:21:43.000Z
light_famd/mca.py
marlon27/Light_FAMD
fe4328f15f6145798869908fa126eabe75e85391
[ "BSD-2-Clause" ]
2
2021-01-29T02:57:26.000Z
2021-06-03T14:20:26.000Z
"""Multiple Correspondence Analysis (MCA)""" import numpy as np from sklearn import utils from . import ca from . import one_hot class MCA(ca.CA): def fit(self, X, y=None): if self.check_input: utils.check_array(X, dtype=[str, np.number]) n_initial_columns = X.shape[1]...
28.729167
127
0.625091
import numpy as np from sklearn import utils from . import ca from . import one_hot class MCA(ca.CA): def fit(self, X, y=None): if self.check_input: utils.check_array(X, dtype=[str, np.number]) n_initial_columns = X.shape[1] self.one_hot_ = one_hot.One...
true
true
f716683184b12be70591300c446fc7951aa0428a
4,386
py
Python
contrib/seeds/generate-seeds.py
FcoinFup/litecoin
f60e79f2bf373dafd258264ae197cee44ab4a314
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
FcoinFup/litecoin
f60e79f2bf373dafd258264ae197cee44ab4a314
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
FcoinFup/litecoin
f60e79f2bf373dafd258264ae197cee44ab4a314
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.328571
99
0.583903
from base64 import b32decode from binascii import a2b_hex import sys import os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.onion'): vchAddr = b32decode(addr[0:...
true
true
f71669461b57160bac0b4efc0928e6826dc11176
15,093
py
Python
tests/test_collections.py
fperetti/callee
58740f73ff9a76f5fe0075bf18d7345a0f9d961c
[ "BSD-3-Clause" ]
72
2016-03-21T03:58:33.000Z
2022-03-29T10:24:51.000Z
tests/test_collections.py
fperetti/callee
58740f73ff9a76f5fe0075bf18d7345a0f9d961c
[ "BSD-3-Clause" ]
14
2016-03-21T03:58:39.000Z
2021-09-07T16:26:03.000Z
tests/test_collections.py
fperetti/callee
58740f73ff9a76f5fe0075bf18d7345a0f9d961c
[ "BSD-3-Clause" ]
9
2016-10-26T14:39:00.000Z
2021-08-13T17:39:35.000Z
""" Tests for collections' matchers. """ import collections from taipan.testing import skipIf from callee._compat import OrderedDict as _OrderedDict import callee.collections as __unit__ from tests import MatcherTestCase class Iterable(MatcherTestCase): test_none = lambda self: self.assert_no_match(None) te...
38.899485
79
0.681309
import collections from taipan.testing import skipIf from callee._compat import OrderedDict as _OrderedDict import callee.collections as __unit__ from tests import MatcherTestCase class Iterable(MatcherTestCase): test_none = lambda self: self.assert_no_match(None) test_zero = lambda self: self.assert_no_mat...
true
true
f71669ba767a939cc5d439ef370d6333952c145a
226
py
Python
course_api/templatetags/time_converter.py
dragonbone81/bobcat-courses-backend
d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c
[ "MIT" ]
3
2018-10-25T12:41:33.000Z
2019-09-19T19:47:39.000Z
course_api/templatetags/time_converter.py
dragonbone81/bobcat-courses-backend
d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c
[ "MIT" ]
22
2018-04-01T02:43:01.000Z
2022-03-11T23:15:55.000Z
course_api/templatetags/time_converter.py
dragonbone81/cse120
d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c
[ "MIT" ]
1
2019-09-19T19:48:59.000Z
2019-09-19T19:48:59.000Z
from django.template.defaulttags import register @register.filter def get_item(dictionary, key): return dictionary.get(key) @register.filter def get_item_dict(dictionary, key): return {'data': dictionary.get(key)}
18.833333
48
0.761062
from django.template.defaulttags import register @register.filter def get_item(dictionary, key): return dictionary.get(key) @register.filter def get_item_dict(dictionary, key): return {'data': dictionary.get(key)}
true
true
f71669f5529851928377789218c8de2abda6eaf6
5,513
py
Python
测试/tensorflow_hello/2.practices_on_nlp.py
shayxu-ai/A-Repository-for-Machine-Learning
4b4cea15bb005d1c58f4395fde97cadf44fb0186
[ "Apache-2.0" ]
null
null
null
测试/tensorflow_hello/2.practices_on_nlp.py
shayxu-ai/A-Repository-for-Machine-Learning
4b4cea15bb005d1c58f4395fde97cadf44fb0186
[ "Apache-2.0" ]
null
null
null
测试/tensorflow_hello/2.practices_on_nlp.py
shayxu-ai/A-Repository-for-Machine-Learning
4b4cea15bb005d1c58f4395fde97cadf44fb0186
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time: 2020/2/5,005 22:02 # @Last Update: 2020/2/5,005 22:02 # @Author: 徐缘 # @FileName: 2.practices_on_nlp.py # @Software: PyCharm from __future__ import absolute_import, division, print_function, unicode_literals # 导入一些熟悉的陌生人 # 绝对引入,精确除法,print,unicode类型字符串。都是为了适配python2,不加也罢 import nu...
29.169312
108
0.643751
from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import tensorflow as tf from tensorflow.keras.layers import Dense, Flatten, Conv2D from tensorflow.keras import Model from tensorflow import keras import tensorflow_hub as hub import tensorflow_datasets as...
true
true
f7166a5ae2764771f45e5ae446f7d0e4b402bd2c
3,231
py
Python
test/test_default_api.py
cinaq/axxell-client-python
a862dd36552ef8149517c5d5034a52a37abc2d33
[ "Apache-2.0" ]
null
null
null
test/test_default_api.py
cinaq/axxell-client-python
a862dd36552ef8149517c5d5034a52a37abc2d33
[ "Apache-2.0" ]
null
null
null
test/test_default_api.py
cinaq/axxell-client-python
a862dd36552ef8149517c5d5034a52a37abc2d33
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ axxell-api No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); ...
18.357955
105
0.573197
from __future__ import absolute_import import os import sys import unittest import AxxellClient from AxxellClient.rest import ApiException from AxxellClient.apis.default_api import DefaultApi class TestDefaultApi(unittest.TestCase): def setUp(self): self.api = AxxellClient.apis.default_api.DefaultApi...
true
true
f7166ab579b24ca3fb29824e02008e934e83680a
22,183
py
Python
openmdao/components/interp_util/interp.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
openmdao/components/interp_util/interp.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
openmdao/components/interp_util/interp.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
""" Base class for interpolation methods that calculate values for each dimension independently. Based on Tables in NPSS, and was added to bridge the gap between some of the slower scipy implementations. """ import numpy as np from openmdao.components.interp_util.interp_akima import InterpAkima, Interp1DAkima from op...
38.246552
100
0.580129
import numpy as np from openmdao.components.interp_util.interp_akima import InterpAkima, Interp1DAkima from openmdao.components.interp_util.interp_bsplines import InterpBSplines from openmdao.components.interp_util.interp_cubic import InterpCubic from openmdao.components.interp_util.interp_lagrange2 import InterpLagra...
true
true
f7166b29a260dc30035dc8c5f38d515125a10b02
1,410
py
Python
data/shape_dataset.py
mremilien/object-deformnet
bb07fe05f1ee3983835ebe071252541cee5c42f8
[ "MIT" ]
66
2020-07-17T05:15:42.000Z
2022-02-22T12:28:01.000Z
data/shape_dataset.py
mremilien/object-deformnet
bb07fe05f1ee3983835ebe071252541cee5c42f8
[ "MIT" ]
25
2020-07-17T11:45:16.000Z
2022-02-07T06:11:44.000Z
data/shape_dataset.py
mremilien/object-deformnet
bb07fe05f1ee3983835ebe071252541cee5c42f8
[ "MIT" ]
16
2020-07-18T22:15:20.000Z
2022-01-05T09:05:40.000Z
import h5py import numpy as np import torch.utils.data as data class ShapeDataset(data.Dataset): def __init__(self, h5_file, mode, n_points=2048, augment=False): assert (mode == 'train' or mode == 'val'), 'Mode must be "train" or "val".' self.mode = mode self.n_points = n_points se...
35.25
97
0.576596
import h5py import numpy as np import torch.utils.data as data class ShapeDataset(data.Dataset): def __init__(self, h5_file, mode, n_points=2048, augment=False): assert (mode == 'train' or mode == 'val'), 'Mode must be "train" or "val".' self.mode = mode self.n_points = n_points se...
true
true
f7166b34ac455a0f2c35b9f39db244c8be3a6461
1,936
py
Python
evalai/utils/urls.py
Ram81/evalai-cli
3fee2108b013461b3de8aa354473ba6eaba6539b
[ "BSD-3-Clause" ]
null
null
null
evalai/utils/urls.py
Ram81/evalai-cli
3fee2108b013461b3de8aa354473ba6eaba6539b
[ "BSD-3-Clause" ]
null
null
null
evalai/utils/urls.py
Ram81/evalai-cli
3fee2108b013461b3de8aa354473ba6eaba6539b
[ "BSD-3-Clause" ]
null
null
null
from enum import Enum class URLS(Enum): login = "/api/auth/login" challenge_list = "/api/challenges/challenge/all" past_challenge_list = "/api/challenges/challenge/past" future_challenge_list = "/api/challenges/challenge/future" challenge_details = "/api/challenges/challenge/{}" challenge_phas...
53.777778
106
0.741736
from enum import Enum class URLS(Enum): login = "/api/auth/login" challenge_list = "/api/challenges/challenge/all" past_challenge_list = "/api/challenges/challenge/past" future_challenge_list = "/api/challenges/challenge/future" challenge_details = "/api/challenges/challenge/{}" challenge_phas...
true
true
f7166c21c50fd68775ca54dcd3b3e04554955178
581
py
Python
insta/migrations/0007_profile_editor.py
SheilaKamotho/InstaClone
7dd644118dfb5523fa253d3454d4aa0f2f599c69
[ "Unlicense", "MIT" ]
null
null
null
insta/migrations/0007_profile_editor.py
SheilaKamotho/InstaClone
7dd644118dfb5523fa253d3454d4aa0f2f599c69
[ "Unlicense", "MIT" ]
null
null
null
insta/migrations/0007_profile_editor.py
SheilaKamotho/InstaClone
7dd644118dfb5523fa253d3454d4aa0f2f599c69
[ "Unlicense", "MIT" ]
null
null
null
# Generated by Django 2.0.2 on 2020-10-19 10:32 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('insta', '0006_image_edit...
26.409091
121
0.672978
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('insta', '0006_image_editor'), ] operations = [ migratio...
true
true
f7166c87d0624aa75acb312538b76c621625e86c
7,883
py
Python
.history/docs/conf_20191028085309.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
.history/docs/conf_20191028085309.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
.history/docs/conf_20191028085309.py
bkraft4257/kaggle_titanic
f29ea1773773109a867278c001dbd21a9f7b21dd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # kaggle_titanic documentation build configuration file, created by # sphinx-quickstart. # # 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 configuration values...
32.044715
80
0.708487
import os import sys extensions = [] extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'kaggle_titanic' # |version| and |release|, also used in various other places throughout the # built docume...
true
true
f7166ed99d1178bc1af8dfbf95b904d906ba4586
12,868
py
Python
src/python/src/grpc/framework/assembly/implementations.py
jonywtf/grpc
124f3c5a4b65bb88f13be7c68482eb83d945ad02
[ "BSD-3-Clause" ]
1
2022-01-14T04:25:01.000Z
2022-01-14T04:25:01.000Z
src/python/src/grpc/framework/assembly/implementations.py
jonywtf/grpc
124f3c5a4b65bb88f13be7c68482eb83d945ad02
[ "BSD-3-Clause" ]
null
null
null
src/python/src/grpc/framework/assembly/implementations.py
jonywtf/grpc
124f3c5a4b65bb88f13be7c68482eb83d945ad02
[ "BSD-3-Clause" ]
1
2022-01-14T04:25:02.000Z
2022-01-14T04:25:02.000Z
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
40.465409
105
0.756062
import threading from grpc.framework.assembly import interfaces from grpc.framework.base import util as base_utilities from grpc.framework.base.packets import implementations as tickets_implementations from grpc.framework.base.packets import interfaces as tickets_interfaces from grpc.framework.common import cardina...
true
true
f7166f854ffcad07870a5030cb9bfd7720c7b846
4,685
py
Python
relationships/relationship.py
emre/relationships
9452af1dd2897a6b102c4a391c95b499622c2f28
[ "MIT" ]
85
2015-08-05T06:13:28.000Z
2021-05-07T13:56:30.000Z
relationships/relationship.py
emre/relationships
9452af1dd2897a6b102c4a391c95b499622c2f28
[ "MIT" ]
3
2015-08-06T05:50:37.000Z
2015-08-07T05:31:50.000Z
relationships/relationship.py
emre/relationships
9452af1dd2897a6b102c4a391c95b499622c2f28
[ "MIT" ]
7
2015-08-06T01:34:14.000Z
2018-12-21T01:17:33.000Z
import redis from keys import key_list as default_key_list class Relationship(object): def __init__(self, redis_connection=None, key_list=None, actor=None): if key_list: self.key_list = default_key_list.copy() self.key_list.update(key_list) else: self.key_l...
31.655405
108
0.639488
import redis from keys import key_list as default_key_list class Relationship(object): def __init__(self, redis_connection=None, key_list=None, actor=None): if key_list: self.key_list = default_key_list.copy() self.key_list.update(key_list) else: self.key_l...
true
true
f71670077ff7bfc22a95558c4ef9773e2b4a8e07
4,867
py
Python
deeplearning_examples/loaders/Churn.py
dileep-kishore/deeplearning-examples
2b230ea17f366f602044d44cc8abcac419d4e521
[ "MIT" ]
null
null
null
deeplearning_examples/loaders/Churn.py
dileep-kishore/deeplearning-examples
2b230ea17f366f602044d44cc8abcac419d4e521
[ "MIT" ]
321
2017-11-23T20:37:03.000Z
2020-12-28T13:06:15.000Z
deeplearning_examples/loaders/Churn.py
dileep-kishore/deeplearning-examples
2b230ea17f366f602044d44cc8abcac419d4e521
[ "MIT" ]
null
null
null
# @Author: dileep # @Last Modified by: dileep from collections import OrderedDict import os from typing import Tuple, Iterable, Sequence, Dict, Union import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.model_selection import train_test_split from . import...
38.322835
97
0.589275
from collections import OrderedDict import os from typing import Tuple, Iterable, Sequence, Dict, Union import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.model_selection import train_test_split from . import datapath from ..preprocessing import Encoder fr...
true
true
f716709e2478d7522c2c591d1f65cf3807762b7e
255
py
Python
Project Euler/1_Multiples_of_3_and_5.py
Ashwanigupta9125/code-DS-ALGO
49f6cf7d0c682da669db23619aef3f80697b352b
[ "MIT" ]
36
2019-12-27T08:23:08.000Z
2022-01-24T20:35:47.000Z
Project Euler/1_Multiples_of_3_and_5.py
Ashwanigupta9125/code-DS-ALGO
49f6cf7d0c682da669db23619aef3f80697b352b
[ "MIT" ]
10
2019-11-13T02:55:18.000Z
2021-10-13T23:28:09.000Z
Project Euler/1_Multiples_of_3_and_5.py
Ashwanigupta9125/code-DS-ALGO
49f6cf7d0c682da669db23619aef3f80697b352b
[ "MIT" ]
53
2020-08-15T11:08:40.000Z
2021-10-09T15:51:38.000Z
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. # Find the sum of all the multiples of 3 or 5 below 1000. print(sum( i for i in range(1000) if i % 3 == 0 or i % 5 == 0 ))
63.75
131
0.670588
print(sum( i for i in range(1000) if i % 3 == 0 or i % 5 == 0 ))
true
true
f71671890da4aa3c0e2138334e26e8ab78927add
451
py
Python
musicbotv2/plugins/loader.py
dabolink/MusicBot
38ab851b2c533e5bc703c4a4b3bb4af07059139f
[ "MIT" ]
null
null
null
musicbotv2/plugins/loader.py
dabolink/MusicBot
38ab851b2c533e5bc703c4a4b3bb4af07059139f
[ "MIT" ]
null
null
null
musicbotv2/plugins/loader.py
dabolink/MusicBot
38ab851b2c533e5bc703c4a4b3bb4af07059139f
[ "MIT" ]
null
null
null
import importlib from typing import List class ModuleInterface: @staticmethod def register() -> None: """Init the command""" def import_module(name: str) -> ModuleInterface: return importlib.import_module(name) # type: ignore def load_commands(commands: List[str]) -> None: for command_nam...
22.55
56
0.678492
import importlib from typing import List class ModuleInterface: @staticmethod def register() -> None: def import_module(name: str) -> ModuleInterface: return importlib.import_module(name) def load_commands(commands: List[str]) -> None: for command_name in commands: print("loading command ...
true
true
f716730fc1f1eb3c334d8d580c59f6f1e1e87d19
793
py
Python
setup.py
fginter/simstring-cuda
7773bca1e3ecf6dd9eac8f7c007549d098539356
[ "Apache-2.0" ]
2
2022-02-02T13:47:32.000Z
2022-02-10T04:30:38.000Z
setup.py
fginter/simstring-cuda
7773bca1e3ecf6dd9eac8f7c007549d098539356
[ "Apache-2.0" ]
1
2022-02-10T04:40:00.000Z
2022-02-10T04:40:00.000Z
setup.py
fginter/simstring-cuda
7773bca1e3ecf6dd9eac8f7c007549d098539356
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='SimString-cuda', version='0.1.0', url='https://github.com/fginter/sim...
37.761905
190
0.725095
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='SimString-cuda', version='0.1.0', url='https://github.com/fginter/sim...
true
true
f716732d7832fd5fb2824492c9a76cc168282fea
7,206
bzl
Python
scala_proto/private/scalapb_aspect.bzl
majcherm-da/rules_scala
78104d8014d4e4fc8f905cd34b91dfabd9a268c8
[ "Apache-2.0" ]
null
null
null
scala_proto/private/scalapb_aspect.bzl
majcherm-da/rules_scala
78104d8014d4e4fc8f905cd34b91dfabd9a268c8
[ "Apache-2.0" ]
null
null
null
scala_proto/private/scalapb_aspect.bzl
majcherm-da/rules_scala
78104d8014d4e4fc8f905cd34b91dfabd9a268c8
[ "Apache-2.0" ]
null
null
null
load( "//scala/private:common.bzl", "write_manifest_file", ) load("//scala/private:rule_impls.bzl", "compile_scala") load("//scala_proto/private:proto_to_scala_src.bzl", "proto_to_scala_src") ScalaPBAspectInfo = provider(fields = [ "proto_info", "src_jars", "output_files", "java_info", ]) S...
31.605263
119
0.614627
load( "//scala/private:common.bzl", "write_manifest_file", ) load("//scala/private:rule_impls.bzl", "compile_scala") load("//scala_proto/private:proto_to_scala_src.bzl", "proto_to_scala_src") ScalaPBAspectInfo = provider(fields = [ "proto_info", "src_jars", "output_files", "java_info", ]) S...
true
true
f7167381295d7b56237bfdcc1b5bedebfca834ed
477
py
Python
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationLine.py
albertz/music-player
d23586f5bf657cbaea8147223be7814d117ae73d
[ "BSD-2-Clause" ]
132
2015-01-01T10:02:42.000Z
2022-03-09T12:51:01.000Z
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationLine.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
6
2015-01-06T08:23:19.000Z
2019-03-14T12:22:06.000Z
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationLine.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
27
2015-02-23T11:51:43.000Z
2022-03-07T02:34:18.000Z
from PyObjCTools.TestSupport import * from Quartz.PDFKit import * class TestPDFAnnotationLine (TestCase): def testConstants(self): self.assertEqual(kPDFLineStyleNone, 0) self.assertEqual(kPDFLineStyleSquare, 1) self.assertEqual(kPDFLineStyleCircle, 2) self.assertEqual(kPDFLineStyle...
29.8125
53
0.727463
from PyObjCTools.TestSupport import * from Quartz.PDFKit import * class TestPDFAnnotationLine (TestCase): def testConstants(self): self.assertEqual(kPDFLineStyleNone, 0) self.assertEqual(kPDFLineStyleSquare, 1) self.assertEqual(kPDFLineStyleCircle, 2) self.assertEqual(kPDFLineStyle...
true
true
f71673edb368999b65c6db4d94b46852b8198252
886
py
Python
setup.py
olivier-m/django-graffle
e2049b048e0c7944022e99800ca8f241c7d849ba
[ "BSD-3-Clause" ]
1
2015-10-21T21:09:39.000Z
2015-10-21T21:09:39.000Z
setup.py
olivier-m/django-graffle
e2049b048e0c7944022e99800ca8f241c7d849ba
[ "BSD-3-Clause" ]
null
null
null
setup.py
olivier-m/django-graffle
e2049b048e0c7944022e99800ca8f241c7d849ba
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Django graffle released under the BSD license. # See the LICENSE for more information. from setuptools import setup, find_packages version = '0.5' packages = ['django_graffle'] + ['django_graffle.%s' % x for x in find_packages('django_graffle',)] setup( name='djan...
30.551724
99
0.654628
from setuptools import setup, find_packages version = '0.5' packages = ['django_graffle'] + ['django_graffle.%s' % x for x in find_packages('django_graffle',)] setup( name='django_graffle', version=version, description='Graph your django views with Omnigraffle.', author='Olivier Meunier', author_...
true
true
f716742ca70ffea5e8234ece3da288effc4a72ca
5,631
py
Python
tests/test_metrics/test_issue_metrics.py
Joshinn-io/augur
6759204dbae2ebb992dcd8c1f05408b9206c4ba3
[ "MIT" ]
443
2018-09-19T00:30:36.000Z
2022-03-31T11:39:13.000Z
tests/test_metrics/test_issue_metrics.py
Romelo-S/augur
e9410887f58af2b26c350edf08e3f70ff783bdc5
[ "MIT" ]
613
2018-09-19T18:31:13.000Z
2022-03-31T05:41:16.000Z
tests/test_metrics/test_issue_metrics.py
Romelo-S/augur
e9410887f58af2b26c350edf08e3f70ff783bdc5
[ "MIT" ]
764
2018-10-17T01:08:10.000Z
2022-03-31T05:25:01.000Z
#SPDX-License-Identifier: MIT import pytest import pandas as pd def test_issues_new(metrics): #repo_id assert metrics.issues_new(1, 1 , period='year').iloc[0]['issues'] > 0 #repo_group_id assert metrics.issues_new(10, period='year').iloc[1]['issues'] > 0 #begin_date & end_date assert metrics...
38.834483
142
0.672527
import pytest import pandas as pd def test_issues_new(metrics): assert metrics.issues_new(1, 1 , period='year').iloc[0]['issues'] > 0 assert metrics.issues_new(10, period='year').iloc[1]['issues'] > 0 assert metrics.issues_new(10, 25430, period='week', begin_date='2017', ...
true
true
f716748088838174bfd7244706be4ea05367a0b3
5,750
py
Python
selfdrive/car/tesla/carcontroller.py
openmechanics/openpilot-tesla
9019ec0320d3a3973e6ff26e91c51ee267ee0c1b
[ "MIT" ]
1
2018-06-15T04:05:00.000Z
2018-06-15T04:05:00.000Z
selfdrive/car/tumbler/carcontroller.py
openmechanics/fakeport
52118b05db0ba216133ddcad5c732baa0efb7799
[ "MIT" ]
null
null
null
selfdrive/car/tumbler/carcontroller.py
openmechanics/fakeport
52118b05db0ba216133ddcad5c732baa0efb7799
[ "MIT" ]
null
null
null
from collections import namedtuple import os from selfdrive.boardd.boardd import can_list_to_can_capnp from selfdrive.controls.lib.drive_helpers import rate_limit from common.numpy_fast import clip from . import teslacan from .values import AH from common.fingerprints import TESLA as CAR from selfdrive.can.packer impor...
36.392405
146
0.670435
from collections import namedtuple import os from selfdrive.boardd.boardd import can_list_to_can_capnp from selfdrive.controls.lib.drive_helpers import rate_limit from common.numpy_fast import clip from . import teslacan from .values import AH from common.fingerprints import TESLA as CAR from selfdrive.can.packer impor...
false
true
f71676329ad1aa128a74b82803791f78a3149af3
1,831
py
Python
pydescriptors/helpers.py
c-martinez/compactness
679a1644e0cd3ded278e9917efe171b5e89fc780
[ "Apache-2.0" ]
9
2017-02-15T10:44:17.000Z
2022-03-05T10:14:21.000Z
pydescriptors/helpers.py
c-martinez/compactness
679a1644e0cd3ded278e9917efe171b5e89fc780
[ "Apache-2.0" ]
1
2021-11-22T02:31:37.000Z
2021-11-22T10:33:39.000Z
pydescriptors/helpers.py
c-martinez/compactness
679a1644e0cd3ded278e9917efe171b5e89fc780
[ "Apache-2.0" ]
4
2019-04-17T02:28:01.000Z
2022-02-15T02:03:38.000Z
import numpy as _np from .moments import immoment3D as _immoment3D def getSphere(side): """Create a 3D volume of sideXsideXside, where voxels representing a sphere are ones and background is zeros. Keyword arguments: side -- the number of voxels the 3D volume should have on each side. Returns: ...
26.926471
72
0.550519
import numpy as _np from .moments import immoment3D as _immoment3D def getSphere(side): volume = _np.zeros((side, side, side)) r = side / 2 Xs, Ys = _np.meshgrid(_np.arange(-r, r), _np.arange(-r, r)) for k, z in enumerate(_np.arange(-r, r)): volume[:, :, k] = _np.sqrt(Xs ** 2 + Ys ** 2 + z ** ...
true
true
f716766002a0b6aae9b9a89d8422883c38d8d8f9
19,179
py
Python
tests/jobs/test_local_task_job.py
anitakar/airflow
fc32d36d44f9d36b30333ce0676f2f3a6b133619
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
tests/jobs/test_local_task_job.py
anitakar/airflow
fc32d36d44f9d36b30333ce0676f2f3a6b133619
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
tests/jobs/test_local_task_job.py
anitakar/airflow
fc32d36d44f9d36b30333ce0676f2f3a6b133619
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
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...
36.531429
107
0.640388
import multiprocessing import os import time import unittest import uuid from multiprocessing import Lock, Value from unittest import mock from unittest.mock import patch import pytest from airflow import settings from airflow.exceptions import AirflowException, AirflowFailException from airflow.executors.sequential_...
true
true
f71676683a6637366c41785b4c0e85fe9f8fcaf2
2,554
py
Python
tests/test_submission.py
Uchimura85/wswp
54b7e59390721cbd1e3ce0d7ed255af3c2b4511e
[ "MIT" ]
4
2020-12-27T00:31:49.000Z
2021-08-03T22:33:41.000Z
tests/test_submission.py
Uchimura85/wswp
54b7e59390721cbd1e3ce0d7ed255af3c2b4511e
[ "MIT" ]
1
2021-04-08T02:59:31.000Z
2021-04-08T02:59:31.000Z
tests/test_submission.py
Uchimura85/wswp
54b7e59390721cbd1e3ce0d7ed255af3c2b4511e
[ "MIT" ]
1
2021-08-03T22:33:42.000Z
2021-08-03T22:33:42.000Z
"""Tests for submission functionality-- primarily if a submission form is validated properly and passed to the backend. """ import pytest import pathlib, json from src.model import Activity, Submission # Load in sample submissions and their expected status codes if they were submitted: with open(pathlib.Path(__file__...
43.288136
150
0.698904
import pytest import pathlib, json from src.model import Activity, Submission with open(pathlib.Path(__file__).parent.absolute()/'data'/'sample_submissions_base.json') as samples: json_data = json.load(samples) sample_submissions = [pytest.param(x['submission'], x['status_code'], x.get('broken_field'), id=x['...
true
true
f71678195657d243066d4e9b9ea9b1e9901b4130
4,061
py
Python
scripts/Emdometrial/Statistics/mut_analysis.py
yaront/MutSig
456dc793ab2dbd955b5cef098fd14539d428de0b
[ "Apache-2.0" ]
null
null
null
scripts/Emdometrial/Statistics/mut_analysis.py
yaront/MutSig
456dc793ab2dbd955b5cef098fd14539d428de0b
[ "Apache-2.0" ]
null
null
null
scripts/Emdometrial/Statistics/mut_analysis.py
yaront/MutSig
456dc793ab2dbd955b5cef098fd14539d428de0b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jul 26 20:42:43 2018 @author: tomer """ #%% # ================================================= # # Mutation per gene # ================================================= import numpy as np import pandas as pd #%% #tumor = sys.argv[1] #tumor = tumor....
35.622807
217
0.676927
import numpy as np import pandas as pd tumor = 'UCEC' print("Starting: " + tumor) mut_data = pd.read_table('./../../../databases/Endometrial/TCGA_MAFs/' + tumor + '.maf', sep = '\t') bmi_data = pd.read_table('./../../../databases/Endometrial/information/TCGA_bmi_data.txt', sep = '\t') pat_bmi = bmi_data[bmi_dat...
true
true
f71678545058b774df26f6e4aec31a97d2933afd
406
py
Python
zerver/migrations/0062_default_timezone.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
17,004
2015-09-25T18:27:24.000Z
2022-03-31T22:02:32.000Z
zerver/migrations/0062_default_timezone.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
20,344
2015-09-25T19:02:42.000Z
2022-03-31T23:54:40.000Z
zerver/migrations/0062_default_timezone.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
7,271
2015-09-25T18:48:39.000Z
2022-03-31T21:06:11.000Z
# Generated by Django 1.10.5 on 2017-03-16 12:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0061_userprofile_timezone"), ] operations = [ migrations.AlterField( model_name="userprofile", name="timez...
22.555556
62
0.608374
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0061_userprofile_timezone"), ] operations = [ migrations.AlterField( model_name="userprofile", name="timezone", field=models.CharField(default=...
true
true
f7167876873bfd4fe4f89c9dbfccf3393adb7076
1,589
py
Python
expmgmt/utils/structures.py
wbrandenburger/ExpMgmt
bc2383bb360d8d7e876d503c1570c2d9188f8e39
[ "MIT" ]
null
null
null
expmgmt/utils/structures.py
wbrandenburger/ExpMgmt
bc2383bb360d8d7e876d503c1570c2d9188f8e39
[ "MIT" ]
null
null
null
expmgmt/utils/structures.py
wbrandenburger/ExpMgmt
bc2383bb360d8d7e876d503c1570c2d9188f8e39
[ "MIT" ]
null
null
null
# =========================================================================== # dictionary.py ----------------------------------------------------------- # =========================================================================== # function ---------------------------------------------------------------- # -----...
38.756098
77
0.349276
def update_dict(a, b): if a and b and isinstance(a, dict): a.update(b) return a def get_dict_element(dict_list, field, query): for item in dict_list: if item[field] == query: return item return dict() def get_dict_elements(dict_list, field, query, update=False): ...
true
true
f71678a61c98b95204ecbdc16742b5edb4c3e82f
458
py
Python
dataset_results.py
polikutinevgeny/FrontsCNN
a9f48d5afcdd7e0fe561840d94af36c0fedf1c15
[ "MIT" ]
1
2019-12-28T08:40:44.000Z
2019-12-28T08:40:44.000Z
dataset_results.py
polikutinevgeny/FrontsCNN
a9f48d5afcdd7e0fe561840d94af36c0fedf1c15
[ "MIT" ]
null
null
null
dataset_results.py
polikutinevgeny/FrontsCNN
a9f48d5afcdd7e0fe561840d94af36c0fedf1c15
[ "MIT" ]
null
null
null
import gc import numpy as np def dataset_results(dataset, model, binary=False): x = np.array([dataset[i][0][0] for i in range(len(dataset))]) y_true = np.array([dataset[i][1][0] for i in range(len(dataset))]) y_pred = model.predict(x, batch_size=1, verbose=0).flatten() if binary: y_true = y_tr...
28.625
70
0.626638
import gc import numpy as np def dataset_results(dataset, model, binary=False): x = np.array([dataset[i][0][0] for i in range(len(dataset))]) y_true = np.array([dataset[i][1][0] for i in range(len(dataset))]) y_pred = model.predict(x, batch_size=1, verbose=0).flatten() if binary: y_true = y_tr...
true
true
f716792771771c2a540c7c03471ad8050e7db370
6,984
py
Python
mbrl/env/pets_reacher.py
MaxSobolMark/mbrl-lib
bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594
[ "MIT" ]
null
null
null
mbrl/env/pets_reacher.py
MaxSobolMark/mbrl-lib
bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594
[ "MIT" ]
null
null
null
mbrl/env/pets_reacher.py
MaxSobolMark/mbrl-lib
bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594
[ "MIT" ]
null
null
null
import os from typing import Tuple import numpy as np from numpy.random import MT19937, RandomState, SeedSequence import torch from gym import utils from gym.envs.mujoco import mujoco_env class Reacher3DEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self, task_id=None, hide_goal=False): self.vie...
37.751351
77
0.477663
import os from typing import Tuple import numpy as np from numpy.random import MT19937, RandomState, SeedSequence import torch from gym import utils from gym.envs.mujoco import mujoco_env class Reacher3DEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self, task_id=None, hide_goal=False): self.vie...
true
true
f716795d8f15462f698be1ecce4ae982839d72ed
2,091
py
Python
src/front-door/azext_front_door/vendored_sdks/models/managed_rule_override.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2022-03-22T15:02:32.000Z
2022-03-22T15:02:32.000Z
src/front-door/azext_front_door/vendored_sdks/models/managed_rule_override.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2021-02-10T22:04:59.000Z
2021-02-10T22:04:59.000Z
src/front-door/azext_front_door/vendored_sdks/models/managed_rule_override.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2021-06-03T19:31:10.000Z
2021-06-03T19:31:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.211538
78
0.636059
from msrest.serialization import Model class ManagedRuleOverride(Model): _validation = { 'rule_id': {'required': True}, } _attribute_map = { 'rule_id': {'key': 'ruleId', 'type': 'str'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'action': {'key': 'action', ...
true
true
f71679d226b40ff0d00a91dabe615ef3a5c5b9e5
1,354
py
Python
Asyncio/asyncio_queue.py
xlui/PythonExamples
0389efb84e01dc1310bb2bab7aa2433c0e1b45c4
[ "MIT" ]
null
null
null
Asyncio/asyncio_queue.py
xlui/PythonExamples
0389efb84e01dc1310bb2bab7aa2433c0e1b45c4
[ "MIT" ]
null
null
null
Asyncio/asyncio_queue.py
xlui/PythonExamples
0389efb84e01dc1310bb2bab7aa2433c0e1b45c4
[ "MIT" ]
null
null
null
# asyncio_queue.py import asyncio async def consumer(n, _queue): """:type _queue asyncio.Queue""" # print('consumer {}: waiting for item'.format(n)) while True: print('consumer {}: waiting for item'.format(n)) item = await _queue.get() print('consumer {}: has item {}'.format(n, it...
28.208333
81
0.637371
import asyncio async def consumer(n, _queue): while True: print('consumer {}: waiting for item'.format(n)) item = await _queue.get() print('consumer {}: has item {}'.format(n, item)) if item is None: _queue.task_done() break else: aw...
true
true
f71679e9a79db28502e7b077981e0b0b7bee67f6
37,770
py
Python
apprise_api/api/views.py
adamus1red/apprise-api
757adce17642a3dfaa2b2e3244e147911386dabb
[ "MIT" ]
160
2019-10-27T19:39:01.000Z
2022-03-30T21:43:16.000Z
apprise_api/api/views.py
adamus1red/apprise-api
757adce17642a3dfaa2b2e3244e147911386dabb
[ "MIT" ]
51
2019-12-25T12:28:11.000Z
2022-03-31T23:57:30.000Z
apprise_api/api/views.py
adamus1red/apprise-api
757adce17642a3dfaa2b2e3244e147911386dabb
[ "MIT" ]
26
2020-01-10T14:58:01.000Z
2022-02-19T03:02:28.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Chris Caron <lead2gold@gmail.com> # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files(the "Software"), to deal # in th...
36.074499
79
0.533625
from django.shortcuts import render from django.http import HttpResponse from django.http import JsonResponse from django.views import View from django.conf import settings from django.utils.html import escape from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache fro...
true
true