hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7143b7edbae191e6924ad8021d9f11a2e53d982
2,262
py
Python
src/oscar/apps/dashboard/app.py
abirafdirp/revania
70272b842316e8df57b0bc8a0dc669c3af4ec8f9
[ "BSD-3-Clause" ]
2
2015-12-11T00:19:15.000Z
2021-11-14T19:44:42.000Z
src/oscar/apps/dashboard/app.py
abirafdirp/revania
70272b842316e8df57b0bc8a0dc669c3af4ec8f9
[ "BSD-3-Clause" ]
null
null
null
src/oscar/apps/dashboard/app.py
abirafdirp/revania
70272b842316e8df57b0bc8a0dc669c3af4ec8f9
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url, include from oscar.core.application import Application from oscar.core.loading import get_class class DashboardApplication(Application): name = 'dashboard' permissions_map = { 'index': (['is_staff'], ['partner.dashboard_access']), } index_view = get_class('d...
46.163265
73
0.665782
from django.conf.urls import url, include from oscar.core.application import Application from oscar.core.loading import get_class class DashboardApplication(Application): name = 'dashboard' permissions_map = { 'index': (['is_staff'], ['partner.dashboard_access']), } index_view = get_class('d...
true
true
f7143dd95c98480c7753abe771970d9fae229904
20,780
py
Python
pilosa/orm.py
philoprove/python-pilosa
c0edc8d0fe1687b9afd61c8bc4dd236b3c73fb78
[ "BSD-3-Clause" ]
null
null
null
pilosa/orm.py
philoprove/python-pilosa
c0edc8d0fe1687b9afd61c8bc4dd236b3c73fb78
[ "BSD-3-Clause" ]
null
null
null
pilosa/orm.py
philoprove/python-pilosa
c0edc8d0fe1687b9afd61c8bc4dd236b3c73fb78
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017 Pilosa Corp. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2...
36.392294
209
0.626853
import json from .exceptions import PilosaError from .validator import validate_index_name, validate_frame_name, validate_label __all__ = ("TimeQuantum", "CacheType", "Schema", "Index", "PQLQuery", "PQLBatchQuery") _TIME_FORMAT = "%Y-%m-%dT%H:%M" class TimeQuantum: NONE = None...
true
true
f7143e71d4927605031e54ebefb2763f34929e39
9,923
py
Python
old_code/YoutubeVideo.py
lukewest/Movie-Extra-Downloader
f5ba12a2f1a34fd4aa892eb0379342b131076a70
[ "MIT" ]
23
2018-08-08T14:28:59.000Z
2022-03-22T15:45:10.000Z
old_code/YoutubeVideo.py
lukewest/Movie-Extra-Downloader
f5ba12a2f1a34fd4aa892eb0379342b131076a70
[ "MIT" ]
13
2018-08-08T14:50:29.000Z
2022-01-27T09:05:18.000Z
old_code/YoutubeVideo.py
lukewest/Movie-Extra-Downloader
f5ba12a2f1a34fd4aa892eb0379342b131076a70
[ "MIT" ]
9
2018-08-12T14:08:15.000Z
2021-09-18T01:08:04.000Z
from _socket import timeout from urllib.error import URLError from pytube import YouTube from pytube.exceptions import RegexMatchError from old_code.Stream import Stream import time import tools as tools class YoutubeVideo(object): # todo (2): subtitles conn_errors = 0 def __init__(self, url, score=0, ...
33.866894
102
0.550338
from _socket import timeout from urllib.error import URLError from pytube import YouTube from pytube.exceptions import RegexMatchError from old_code.Stream import Stream import time import tools as tools class YoutubeVideo(object): conn_errors = 0 def __init__(self, url, score=0, preferred_container='...
true
true
f7143ea3ef7f254f2d3187ba1ded0afb09ea30ff
23,487
py
Python
tools/trainpar_deepqmri.py
fragrussu/qMRINet
418cbe22cefa2974d8a97b359324ff4c35865d22
[ "BSD-2-Clause" ]
3
2020-10-22T23:37:36.000Z
2022-02-18T09:39:42.000Z
tools/trainpar_deepqmri.py
fragrussu/qMRINet
418cbe22cefa2974d8a97b359324ff4c35865d22
[ "BSD-2-Clause" ]
null
null
null
tools/trainpar_deepqmri.py
fragrussu/qMRINet
418cbe22cefa2974d8a97b359324ff4c35865d22
[ "BSD-2-Clause" ]
null
null
null
# Author: Francesco Grussu, University College London # <f.grussu@ucl.ac.uk> <francegrussu@gmail.com> # # Code released under BSD Two-Clause license # # Copyright (c) 2020 University College London. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are perm...
60.689922
2,100
0.732788
mpy import matlib import numpy as np import torch from torch import nn from torch import Tensor from torch.utils.data import DataLoader from torch import autograd import pickle as pk from pathlib import Path as pt sys.path.insert(0, os.path.dirname(pt(__file__).absolute()) ) import deepqmri if __na...
true
true
f71442b16a12f46a840756d2038ff554248234be
9,869
py
Python
ansible/lib/ansible/modules/core/cloud/google/gce_pd.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/cloud/google/gce_pd.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/cloud/google/gce_pd.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2013 Google Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
32.251634
95
0.616375
DOCUMENTATION = ''' --- module: gce_pd version_added: "1.4" short_description: utilize GCE persistent disk resources description: - This module can create and destroy unformatted GCE persistent disks U(https://developers.google.com/compute/docs/disks#persistentdisks). It also supports ...
true
true
f71442ba66bcddc2b3b52f67bbd9823def89ad03
476
py
Python
Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/Exercise/13_read_write_files/exercise_2_stocks.py
SDGraph/Hacktoberfest2k21
8f8aead15afa10ea12e1b23ece515a10a882de28
[ "MIT" ]
null
null
null
Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/Exercise/13_read_write_files/exercise_2_stocks.py
SDGraph/Hacktoberfest2k21
8f8aead15afa10ea12e1b23ece515a10a882de28
[ "MIT" ]
null
null
null
Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/Exercise/13_read_write_files/exercise_2_stocks.py
SDGraph/Hacktoberfest2k21
8f8aead15afa10ea12e1b23ece515a10a882de28
[ "MIT" ]
null
null
null
with open("stocks.csv", "r") as f, open("output.csv", "w") as out: out.write("Company Name,PE Ratio, PB Ratio\n") next(f) # This will skip first line in the file which is a header for line in f: tokens = line.split(",") stock = tokens[0] price = float(tokens[1]) eps = float(...
36.615385
70
0.546218
with open("stocks.csv", "r") as f, open("output.csv", "w") as out: out.write("Company Name,PE Ratio, PB Ratio\n") next(f) for line in f: tokens = line.split(",") stock = tokens[0] price = float(tokens[1]) eps = float(tokens[2]) book = float(tokens[3]) pe = r...
true
true
f71442ee9da45672024ed542f4f081204ce1ee75
4,356
py
Python
redash/utils/parameterized_query.py
quanpower/redash
2a37cb31d95703c239e1edf3d3d9e0f9c2eaf857
[ "BSD-2-Clause" ]
1
2021-01-20T18:57:12.000Z
2021-01-20T18:57:12.000Z
redash/utils/parameterized_query.py
quanpower/redash
2a37cb31d95703c239e1edf3d3d9e0f9c2eaf857
[ "BSD-2-Clause" ]
null
null
null
redash/utils/parameterized_query.py
quanpower/redash
2a37cb31d95703c239e1edf3d3d9e0f9c2eaf857
[ "BSD-2-Clause" ]
null
null
null
import pystache from functools import partial from flask_login import current_user from redash.authentication.org_resolving import current_org from numbers import Number from redash import models from redash.utils import mustache_render, json_loads from redash.permissions import require_access, view_only from funcy imp...
31.565217
125
0.672635
import pystache from functools import partial from flask_login import current_user from redash.authentication.org_resolving import current_org from numbers import Number from redash import models from redash.utils import mustache_render, json_loads from redash.permissions import require_access, view_only from funcy imp...
true
true
f7144329ccafee0fa6d6b0aae0ee85c8503eceb0
13,247
py
Python
codigo/process_datos_abiertos.py
Morisset/Mexico-datos
29d5ed1079732d5d809bc14eb5d3438662508728
[ "MIT" ]
null
null
null
codigo/process_datos_abiertos.py
Morisset/Mexico-datos
29d5ed1079732d5d809bc14eb5d3438662508728
[ "MIT" ]
null
null
null
codigo/process_datos_abiertos.py
Morisset/Mexico-datos
29d5ed1079732d5d809bc14eb5d3438662508728
[ "MIT" ]
null
null
null
import os import csv import pandas as pd import geopandas as gpd from datetime import datetime, timedelta ## PROCESSING FUNCTIONS ## def confirmados_diarios_por_estado(datos, entidades): """ Calcula el número total de casos confirmados por fecha y por estado. Input: - datos: datos abiertos de COVID-...
35.802703
84
0.658111
import os import csv import pandas as pd import geopandas as gpd from datetime import datetime, timedelta r_estado(datos, entidades): series = (datos[datos['RESULTADO'] == 1] .groupby(['ENTIDAD_UM', 'FECHA_INGRESO']) .count()['ORIGEN']) return get_formato_series(series, entidades) ...
true
true
f71443471e33b1d928697eb1bc2dc49d6db4519d
14,277
py
Python
lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/pn_trunk.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/pn_trunk.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/pn_trunk.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python """ PN CLI trunk-create/trunk-delete/trunk-modify """ # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
30.835853
81
0.62254
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' --- module: pn_trunk author: "Pluribus Networks (@amitsi)" short_description: CLI command to create/delete/modify a trunk. deprecated: removed_in: 2.0.0 # was Ansible 2.12 why: Doesn't su...
true
true
f7144496800e55420ec75dde8d365a87524ea74a
37
py
Python
rssdldmng/__init__.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
null
null
null
rssdldmng/__init__.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
1
2019-11-25T15:54:02.000Z
2019-11-25T15:54:02.000Z
rssdldmng/__init__.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
null
null
null
"""Init file for RSS downloader."""
18.5
36
0.648649
true
true
f71444d8f4c578982eaf1f4ddd50ab20ff8817b7
4,618
py
Python
test/python/testconsole.py
malywonsz/txtai
ace1b04161062430887eb2153961abcd819a5afb
[ "Apache-2.0" ]
null
null
null
test/python/testconsole.py
malywonsz/txtai
ace1b04161062430887eb2153961abcd819a5afb
[ "Apache-2.0" ]
47
2021-10-02T22:48:03.000Z
2021-12-29T02:36:20.000Z
test/python/testconsole.py
malywonsz/txtai
ace1b04161062430887eb2153961abcd819a5afb
[ "Apache-2.0" ]
null
null
null
""" Console module tests """ import contextlib import io import os import tempfile import unittest from txtai.console import Console from txtai.embeddings import Embeddings APPLICATION = """ path: %s workflow: test: tasks: - task: console """ class TestConsole(unittest.TestCase): """ Console...
26.54023
109
0.591815
import contextlib import io import os import tempfile import unittest from txtai.console import Console from txtai.embeddings import Embeddings APPLICATION = """ path: %s workflow: test: tasks: - task: console """ class TestConsole(unittest.TestCase): @classmethod def setUpClass(cls): ...
true
true
f7144505df291fdcf3ff246068f77eaa76ee3d0a
7,859
py
Python
django/apps/config.py
DrMeers/django
83a3add4bed8d8d49f93b30c817c66908b0a26ba
[ "BSD-3-Clause" ]
1
2019-02-10T19:33:27.000Z
2019-02-10T19:33:27.000Z
django/apps/config.py
avkryukov/django
f90be002d9d3c10b87c74741986e2cbf9f2b858e
[ "BSD-3-Clause" ]
null
null
null
django/apps/config.py
avkryukov/django
f90be002d9d3c10b87c74741986e2cbf9f2b858e
[ "BSD-3-Clause" ]
null
null
null
from importlib import import_module import os from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule from django.utils._os import upath MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django application and its co...
40.096939
81
0.618908
from importlib import import_module import os from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule from django.utils._os import upath MODELS_MODULE_NAME = 'models' class AppConfig(object): def __init__(self, app_name, app_module): ...
true
true
f7144537f8fc87d001f4ac40dde7224820902c65
632
py
Python
django-server/climate_commander/jobs/migrations/0003_job_run_time.py
jrising/climate-commander
123cf5a07b87eb1a3bdb44378ee27712b6563ec3
[ "MIT" ]
null
null
null
django-server/climate_commander/jobs/migrations/0003_job_run_time.py
jrising/climate-commander
123cf5a07b87eb1a3bdb44378ee27712b6563ec3
[ "MIT" ]
1
2016-08-03T21:49:58.000Z
2016-08-03T21:49:58.000Z
django-server/climate_commander/jobs/migrations/0003_job_run_time.py
jrising/climate-commander
123cf5a07b87eb1a3bdb44378ee27712b6563ec3
[ "MIT" ]
1
2016-07-13T18:19:56.000Z
2016-07-13T18:19:56.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-08-19 05:37 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('jobs', '0002_remove_job_run_time'), ...
26.333333
147
0.647152
from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('jobs', '0002_remove_job_run_time'), ] operations = [ migrations.AddField( model_...
true
true
f714453f736bf7e39cc67b173d03bf9106ffd006
4,152
py
Python
benchmark/startQiskit2375.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2375.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2375.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=40 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
34.890756
140
0.651734
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: l...
true
true
f7144556651053589116ff8ee6290dc79a7bff13
1,851
py
Python
rdmo/questions/migrations/0038_rename_de_to_lang2.py
Raspeanut/rdmo
9f785010a499c372a2f8368ccf76d2ea4150adcb
[ "Apache-2.0" ]
77
2016-08-09T11:40:20.000Z
2022-03-06T11:03:26.000Z
rdmo/questions/migrations/0038_rename_de_to_lang2.py
Raspeanut/rdmo
9f785010a499c372a2f8368ccf76d2ea4150adcb
[ "Apache-2.0" ]
377
2016-07-01T13:59:36.000Z
2022-03-30T13:53:19.000Z
rdmo/questions/migrations/0038_rename_de_to_lang2.py
Raspeanut/rdmo
9f785010a499c372a2f8368ccf76d2ea4150adcb
[ "Apache-2.0" ]
47
2016-06-23T11:32:19.000Z
2022-03-01T11:34:37.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-29 16:22 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('questions', '0037_rename_en_to_lang1'), ] operations = [ migrations.RenameField( ...
28.045455
49
0.553755
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('questions', '0037_rename_en_to_lang1'), ] operations = [ migrations.RenameField( model_name='catalog', old_name='title_de', ...
true
true
f71445882aac3e35cd2d41b9696c200ce10affe8
3,635
py
Python
examples/paper_generation_code/2020-07-31-local_fmri_training_mouse.py
CoMind-Technologies/deepinterpolation
2f583c4fdde4ed92139e40eb8076dd5b129d29d9
[ "Unlicense" ]
178
2020-10-16T19:51:21.000Z
2022-03-11T01:25:22.000Z
examples/paper_generation_code/2020-07-31-local_fmri_training_mouse.py
CoMind-Technologies/deepinterpolation
2f583c4fdde4ed92139e40eb8076dd5b129d29d9
[ "Unlicense" ]
46
2020-10-17T14:28:23.000Z
2022-02-18T18:09:12.000Z
examples/paper_generation_code/2020-07-31-local_fmri_training_mouse.py
CoMind-Technologies/deepinterpolation
2f583c4fdde4ed92139e40eb8076dd5b129d29d9
[ "Unlicense" ]
40
2020-10-18T19:01:27.000Z
2022-03-17T15:49:54.000Z
import deepinterpolation as de import sys from shutil import copyfile import os from deepinterpolation.generic import JsonSaver, ClassLoader import datetime from typing import Any, Dict now = datetime.datetime.now() run_uid = now.strftime("%Y_%m_%d_%H_%M") training_param = {} generator_param = {} network_param = {} g...
30.041322
148
0.784869
import deepinterpolation as de import sys from shutil import copyfile import os from deepinterpolation.generic import JsonSaver, ClassLoader import datetime from typing import Any, Dict now = datetime.datetime.now() run_uid = now.strftime("%Y_%m_%d_%H_%M") training_param = {} generator_param = {} network_param = {} g...
true
true
f71445884d094696a2b319a9793ec87601132945
1,030
py
Python
code/Ex02.py
mariolpantunes/ml-deti
a47fdb5df70e3f6fda5768be14f97462dfe057fb
[ "MIT" ]
8
2016-04-25T22:36:35.000Z
2016-10-29T16:47:34.000Z
code/Ex02.py
mariolpantunes/ml-deti
a47fdb5df70e3f6fda5768be14f97462dfe057fb
[ "MIT" ]
null
null
null
code/Ex02.py
mariolpantunes/ml-deti
a47fdb5df70e3f6fda5768be14f97462dfe057fb
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import arff import numpy as np from sklearn import linear_model # Load dataset dataset = arff.load(open('dataset/dataset01.arff', 'r')) data = np.array(dataset['data']) # Reshape vector X1 = data[:, 0].reshape(-1, 1) X2 = np.multiply(X1, X1) X = np.concatenate((X1, X2), axis=1) Y = dat...
23.409091
94
0.67767
import matplotlib.pyplot as plt import arff import numpy as np from sklearn import linear_model dataset = arff.load(open('dataset/dataset01.arff', 'r')) data = np.array(dataset['data']) X1 = data[:, 0].reshape(-1, 1) X2 = np.multiply(X1, X1) X = np.concatenate((X1, X2), axis=1) Y = data[:, 1].reshape(-1, 1) plt.s...
true
true
f714468f5d55c957348c0992aa36ec674a65a747
291
py
Python
test/test_fit.py
malyvsen/unifit
4cd6eceb9fa0dda31a742bd34b22f70a80464bef
[ "MIT" ]
null
null
null
test/test_fit.py
malyvsen/unifit
4cd6eceb9fa0dda31a742bd34b22f70a80464bef
[ "MIT" ]
null
null
null
test/test_fit.py
malyvsen/unifit
4cd6eceb9fa0dda31a742bd34b22f70a80464bef
[ "MIT" ]
null
null
null
import scipy.stats import unifit class TestFit: data = scipy.stats.cauchy.rvs(size=256) def test_basic(self): unifit.fit(self.data) def test_unnamed(self): unifit.fit( self.data, distributions=unifit.distributions.values() )
16.166667
55
0.611684
import scipy.stats import unifit class TestFit: data = scipy.stats.cauchy.rvs(size=256) def test_basic(self): unifit.fit(self.data) def test_unnamed(self): unifit.fit( self.data, distributions=unifit.distributions.values() )
true
true
f71446a08f9ffe05ef9b5e466dd97b0725d3771b
60,170
py
Python
nim.py
FauveNoir/allumette
e5b90aa795c1d4001e3bfcf88056a215337fd70e
[ "OML" ]
1
2017-02-09T16:42:09.000Z
2017-02-09T16:42:09.000Z
nim.py
FauveNoir/allumette
e5b90aa795c1d4001e3bfcf88056a215337fd70e
[ "OML" ]
null
null
null
nim.py
FauveNoir/allumette
e5b90aa795c1d4001e3bfcf88056a215337fd70e
[ "OML" ]
3
2017-02-04T02:17:46.000Z
2017-12-20T11:02:36.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import random import sys import time import re import copy from optparse import OptionParser import pygame from pygame.locals import * version = "0.1" usage = "usage: %prog [ --lvl [0-5] | ]" parser = OptionParser(usage=usage, version="%prog 0.1") parser.add_o...
38.76933
307
0.627372
import os import random import sys import time import re import copy from optparse import OptionParser import pygame from pygame.locals import * version = "0.1" usage = "usage: %prog [ --lvl [0-5] | ]" parser = OptionParser(usage=usage, version="%prog 0.1") parser.add_option("-m", help="Number of matc...
true
true
f7144816b85989a438082526f2dc145b5a22fa38
470
py
Python
animalid/random_id.py
Alphadelta14/animalid
0b97a84ead34be2de623de1258aae16c4e8d83d2
[ "MIT" ]
5
2016-12-15T14:56:15.000Z
2022-02-15T13:32:33.000Z
animalid/random_id.py
Alphadelta14/animalid
0b97a84ead34be2de623de1258aae16c4e8d83d2
[ "MIT" ]
1
2016-10-06T17:37:39.000Z
2016-10-06T17:37:39.000Z
animalid/random_id.py
Alphadelta14/animalid
0b97a84ead34be2de623de1258aae16c4e8d83d2
[ "MIT" ]
1
2020-12-10T16:05:29.000Z
2020-12-10T16:05:29.000Z
"""Where the magic happens.""" import random from animalid import alloys, animals, colors, fabrics, opinions, origins, shapes, sizes FIRST_ADJECTIVES = opinions + shapes + sizes SECOND_ADJECTIVES = alloys + colors + fabrics + origins def generate_animal_id(): """What it's all about.""" return "_".join( ...
23.5
87
0.644681
import random from animalid import alloys, animals, colors, fabrics, opinions, origins, shapes, sizes FIRST_ADJECTIVES = opinions + shapes + sizes SECOND_ADJECTIVES = alloys + colors + fabrics + origins def generate_animal_id(): return "_".join( [ random.choice(FIRST_ADJECTIVES), ...
true
true
f71448ef2c575cc60ec1ec5c6f6dc91a3603fb16
6,237
py
Python
rcnn/lib/python3.6/site-packages/sphinx/make_mode.py
dreamingweaver/making_passportImage
68f23411780ff82abe934dfae5fc04acb80f2c49
[ "MIT" ]
1
2019-01-12T13:17:32.000Z
2019-01-12T13:17:32.000Z
rcnn/lib/python3.6/site-packages/sphinx/make_mode.py
dreamingweaver/making_passportImage
68f23411780ff82abe934dfae5fc04acb80f2c49
[ "MIT" ]
null
null
null
rcnn/lib/python3.6/site-packages/sphinx/make_mode.py
dreamingweaver/making_passportImage
68f23411780ff82abe934dfae5fc04acb80f2c49
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.make_mode ~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx m...
37.125
106
0.568062
from __future__ import print_function import os import subprocess import sys from os import path import sphinx from sphinx import cmdline from sphinx.util.console import color_terminal, nocolor, bold, blue from sphinx.util.osutil import cd, rmtree if False: from typing import List proj_name = os.geten...
true
true
f7144910af197a90e026161df30c5200d7a0dd17
1,623
py
Python
greengrass-v2/poll-api/artifacts/com.greengrass.FakeApi/1.0.0/app.py
dhwalters423/iot-reference-architectures
cb966fec51b73c4403744b0e8a6060f05fe92013
[ "MIT-0" ]
1
2022-01-20T12:26:42.000Z
2022-01-20T12:26:42.000Z
greengrass-v2/poll-api/artifacts/com.greengrass.FakeApi/1.0.0/app.py
dhwalters423/iot-reference-architectures
cb966fec51b73c4403744b0e8a6060f05fe92013
[ "MIT-0" ]
null
null
null
greengrass-v2/poll-api/artifacts/com.greengrass.FakeApi/1.0.0/app.py
dhwalters423/iot-reference-architectures
cb966fec51b73c4403744b0e8a6060f05fe92013
[ "MIT-0" ]
null
null
null
#!/usr/bin/env python3 import json import time from random import gauss from flask import Flask number_of_devices = 10 number_of_values_per_second = 2 last_request = None app = Flask(__name__) @app.route('/') def index(): return 'Server is running' def get_time_ms(): return int(time.time() * 1000) def...
23.521739
95
0.557609
import json import time from random import gauss from flask import Flask number_of_devices = 10 number_of_values_per_second = 2 last_request = None app = Flask(__name__) @app.route('/') def index(): return 'Server is running' def get_time_ms(): return int(time.time() * 1000) def generate_one_device(d...
true
true
f714494bfe0ecac22c74155fa6c7a76f477af690
2,430
py
Python
src/stats/intro_stats.py
JacobEkedahl/detect-intros-from-video
9b2bac1c7209558711072f967a3359d2ca698cd4
[ "MIT" ]
5
2020-06-05T05:10:25.000Z
2022-03-10T05:12:14.000Z
src/stats/intro_stats.py
JacobEkedahl/detect-intros-from-video
9b2bac1c7209558711072f967a3359d2ca698cd4
[ "MIT" ]
null
null
null
src/stats/intro_stats.py
JacobEkedahl/detect-intros-from-video
9b2bac1c7209558711072f967a3359d2ca698cd4
[ "MIT" ]
3
2020-06-06T13:21:23.000Z
2021-03-08T22:24:18.000Z
import matplotlib.pyplot as plt import utils.extractor as extractor import utils.file_handler as file_handler import utils.time_handler as time_handler def plot_intros(): intros = extractor.get_intros_from_data() only_valid_intros = [x for x in intros if not x["end"] == "00:00:00"] x_data = map(get_start...
33.75
77
0.676955
import matplotlib.pyplot as plt import utils.extractor as extractor import utils.file_handler as file_handler import utils.time_handler as time_handler def plot_intros(): intros = extractor.get_intros_from_data() only_valid_intros = [x for x in intros if not x["end"] == "00:00:00"] x_data = map(get_start...
true
true
f7144a1dcf2877b5b9556bdaf5f3fa28830fe1f3
930
py
Python
perfkitbenchmarker/linux_packages/libpng.py
xiaolihope/PerfKitBenchmarker-1.7.0
7699b1073a80d7a92fd3db93da742b93a2ecf900
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/libpng.py
xiaolihope/PerfKitBenchmarker-1.7.0
7699b1073a80d7a92fd3db93da742b93a2ecf900
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/libpng.py
xiaolihope/PerfKitBenchmarker-1.7.0
7699b1073a80d7a92fd3db93da742b93a2ecf900
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.214286
74
0.754839
def YumInstall(vm): vm.InstallPackages('libpng') vm.InstallPackages('libpng-devel') def AptInstall(vm): vm.InstallPackages('libpng3 libpng12-dev')
true
true
f7144a6156a81fa3ee7667295196b9e059922910
1,860
py
Python
tests/test_strings.py
idanmoradarthas/DataScienceUtils
be4806ebcb9ab0e2cdd189842227bd242f0c8910
[ "MIT" ]
19
2019-12-26T15:44:58.000Z
2021-06-14T00:36:24.000Z
tests/test_strings.py
federicodecillia/DataScienceUtils
be4806ebcb9ab0e2cdd189842227bd242f0c8910
[ "MIT" ]
2
2019-12-06T12:32:41.000Z
2020-11-27T11:54:15.000Z
tests/test_strings.py
federicodecillia/DataScienceUtils
be4806ebcb9ab0e2cdd189842227bd242f0c8910
[ "MIT" ]
3
2021-01-16T09:08:15.000Z
2021-01-29T10:57:11.000Z
import pandas from ds_utils.strings import append_tags_to_frame, extract_significant_terms_from_subset def test_append_tags_to_frame(): x_train = pandas.DataFrame([{"article_name": "1", "article_tags": "ds,ml,dl"}, {"article_name": "2", "article_tags": "ds,ml"}]) x_test = pand...
54.705882
115
0.64086
import pandas from ds_utils.strings import append_tags_to_frame, extract_significant_terms_from_subset def test_append_tags_to_frame(): x_train = pandas.DataFrame([{"article_name": "1", "article_tags": "ds,ml,dl"}, {"article_name": "2", "article_tags": "ds,ml"}]) x_test = pand...
true
true
f7144b8fa809f715ad4be47d6e7cdd7ba4be43fd
63
py
Python
caravaggio_rest_api/haystack/__init__.py
xalperte/django-caravaggio-rest-api
36fcdc6b77982fc7fd2462f2c8997911f14047c4
[ "MIT" ]
null
null
null
caravaggio_rest_api/haystack/__init__.py
xalperte/django-caravaggio-rest-api
36fcdc6b77982fc7fd2462f2c8997911f14047c4
[ "MIT" ]
null
null
null
caravaggio_rest_api/haystack/__init__.py
xalperte/django-caravaggio-rest-api
36fcdc6b77982fc7fd2462f2c8997911f14047c4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* # Copyright (c) 2018 PreSeries Tech, SL
21
39
0.619048
true
true
f7144c3823d0412a188fb793a469ea4fa0b57caf
139
py
Python
examples/container.py
hugovk/Cyberbrain
3b3789a7c23edf95c7f7bac94c2d165e9aaf86ed
[ "MIT" ]
2,440
2019-09-21T04:21:55.000Z
2022-03-30T09:47:47.000Z
examples/container.py
hugovk/Cyberbrain
3b3789a7c23edf95c7f7bac94c2d165e9aaf86ed
[ "MIT" ]
103
2019-09-21T15:19:59.000Z
2022-03-28T06:27:40.000Z
examples/container.py
hugovk/Cyberbrain
3b3789a7c23edf95c7f7bac94c2d165e9aaf86ed
[ "MIT" ]
162
2019-07-16T08:03:18.000Z
2022-03-30T02:51:21.000Z
from cyberbrain import trace @trace def container(): x = list(range(1000)) return x if __name__ == "__main__": container()
11.583333
28
0.647482
from cyberbrain import trace @trace def container(): x = list(range(1000)) return x if __name__ == "__main__": container()
true
true
f7144d1cbcf7cf787868c444942d133284af243b
7,461
py
Python
lib/kubernetes/client/models/v1_lease_spec.py
splunkenizer/splunk_as_a_service_app
97c4aaf927d2171bf131126cf9b70489ac75bc5a
[ "Apache-2.0" ]
7
2019-12-21T00:14:14.000Z
2021-03-11T14:51:37.000Z
lib/kubernetes/client/models/v1_lease_spec.py
splunkenizer/splunk_as_a_service_app
97c4aaf927d2171bf131126cf9b70489ac75bc5a
[ "Apache-2.0" ]
29
2019-10-09T11:16:21.000Z
2020-06-23T09:32:09.000Z
lib/kubernetes/client/models/v1_lease_spec.py
splunkenizer/splunk_as_a_service_app
97c4aaf927d2171bf131126cf9b70489ac75bc5a
[ "Apache-2.0" ]
1
2021-05-07T10:13:31.000Z
2021-05-07T10:13:31.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteri...
31.217573
162
0.600456
from pprint import pformat from six import iteritems import re class V1LeaseSpec(object): swagger_types = { 'acquire_time': 'datetime', 'holder_identity': 'str', 'lease_duration_seconds': 'int', 'lease_transitions': 'int', 'renew_time': 'datetime' ...
true
true
f7144fc6d2b714a04c1490bde3b0de182a0d41aa
874
py
Python
setup.py
estanislaoledesma/genper
5996b8bc199d8cecc74b7f6d03b67a4c356b4beb
[ "MIT" ]
2
2021-09-24T20:10:40.000Z
2021-12-23T21:03:16.000Z
setup.py
estanislaoledesma/genper
5996b8bc199d8cecc74b7f6d03b67a4c356b4beb
[ "MIT" ]
4
2021-09-24T19:25:38.000Z
2021-12-22T00:49:07.000Z
setup.py
estanislaoledesma/genper
5996b8bc199d8cecc74b7f6d03b67a4c356b4beb
[ "MIT" ]
null
null
null
# coding: utf-8 import os # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.dirname(__file_...
31.214286
79
0.663616
import os # README file and 2) it's easier to type in the README file than to put a raw def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() from setuptools import setup, find_packages setup( name = "genper", version = "1.0.0", author = "Estanislao Ledesma", aut...
true
true
f714504d98c7f4400644588df8c63bfbda6d348d
6,903
py
Python
spiketoolkit/validation/quality_metric_classes/parameter_dictionaries.py
seankmartin/spiketoolkit
38261d95045b1cd689363579c10ab3aa0a1ab7c0
[ "MIT" ]
null
null
null
spiketoolkit/validation/quality_metric_classes/parameter_dictionaries.py
seankmartin/spiketoolkit
38261d95045b1cd689363579c10ab3aa0a1ab7c0
[ "MIT" ]
null
null
null
spiketoolkit/validation/quality_metric_classes/parameter_dictionaries.py
seankmartin/spiketoolkit
38261d95045b1cd689363579c10ab3aa0a1ab7c0
[ "MIT" ]
null
null
null
from collections import OrderedDict recording_params_dict = OrderedDict([('apply_filter', True), ('freq_min',300.0), ('freq_max',6000.0)]) #Defining GUI Params keys = list(recording_params_dict.keys()) types = [type(recording_params_dict[key]) for key in keys] values = [recording_params_dict[key] for key in keys] rec...
56.121951
310
0.653774
from collections import OrderedDict recording_params_dict = OrderedDict([('apply_filter', True), ('freq_min',300.0), ('freq_max',6000.0)]) keys = list(recording_params_dict.keys()) types = [type(recording_params_dict[key]) for key in keys] values = [recording_params_dict[key] for key in keys] recording_gui_params = ...
true
true
f71450750ea8e5b04888fcc1b9d0708bbc947036
1,243
py
Python
test/proj4/proj-regression-EPSG-3857-20.py
dvuckovic/magics-test
bd8baf97b0db986f6adf63700d3cf77bbcbad2f2
[ "Apache-2.0" ]
7
2019-03-19T09:32:41.000Z
2022-02-07T13:20:33.000Z
test/proj4/proj-regression-EPSG-3857-20.py
dvuckovic/magics-test
bd8baf97b0db986f6adf63700d3cf77bbcbad2f2
[ "Apache-2.0" ]
2
2021-03-30T05:37:20.000Z
2021-08-17T13:58:04.000Z
test/proj4/proj-regression-EPSG-3857-20.py
dvuckovic/magics-test
bd8baf97b0db986f6adf63700d3cf77bbcbad2f2
[ "Apache-2.0" ]
5
2019-03-19T10:43:46.000Z
2021-09-09T14:28:39.000Z
from Magics.macro import * import os def plot_area(epsg, llx, lly, urx, ury): img = os.path.basename(__file__).split('.')[0] title = "Projection {} : [{:.2f}, {:.2f}, {:.2f}, {:.2f}]".format(epsg, llx, lly, urx, ury) #Setting output png = output( output_formats = ['png'], output_name ...
28.906977
103
0.631537
from Magics.macro import * import os def plot_area(epsg, llx, lly, urx, ury): img = os.path.basename(__file__).split('.')[0] title = "Projection {} : [{:.2f}, {:.2f}, {:.2f}, {:.2f}]".format(epsg, llx, lly, urx, ury) png = output( output_formats = ['png'], output_name = img,...
true
true
f71451d02fba81b192946c47e4158536448a5bed
40
py
Python
test-django-project/testapp/urls.py
rhenter/django-utils
7e2901ac1efc3db47977b98e45754e40bfef6891
[ "MIT" ]
20
2021-01-21T13:04:44.000Z
2022-03-26T22:03:19.000Z
test-django-project/testapp/urls.py
rhenter/django-utils
7e2901ac1efc3db47977b98e45754e40bfef6891
[ "MIT" ]
4
2019-03-15T18:13:49.000Z
2019-03-20T00:06:46.000Z
test-django-project/testapp/urls.py
rhenter/django-utils
7e2901ac1efc3db47977b98e45754e40bfef6891
[ "MIT" ]
6
2021-01-21T13:27:45.000Z
2022-03-26T21:28:22.000Z
app_name = 'testapp' urlpatterns = [ ]
8
20
0.65
app_name = 'testapp' urlpatterns = [ ]
true
true
f714526286c921b2969c494f081547696e8bff4f
8,039
py
Python
python/paddle/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
11
2016-08-29T07:43:26.000Z
2016-08-29T07:51:24.000Z
python/paddle/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
1
2021-12-09T08:59:17.000Z
2021-12-09T08:59:17.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
36.876147
85
0.559771
from __future__ import print_function import shutil import tempfile import time import paddle import paddle.fluid as fluid import os import numpy as np import ctr_dataset_reader from test_dist_fleet_heter_base import runtime_main, FleetDistHeterRunnerBase from dist_fleet_ctr import TestDistCTR2x2, fake...
true
true
f71452cf2e938c16778cf2d6bdada38cde5b86ec
716
py
Python
tests/builder/model/test_model_builder.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
null
null
null
tests/builder/model/test_model_builder.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
null
null
null
tests/builder/model/test_model_builder.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
null
null
null
import filecmp from deliverable_model.builder.model.model_builder import ModelBuilder def test_build(datadir, tmpdir): model_builder = ModelBuilder() model_builder.add_keras_h5_model(datadir / "fixture" / "keras_h5_model") model_builder.save() config = model_builder.serialize(tmpdir) assert c...
26.518519
76
0.702514
import filecmp from deliverable_model.builder.model.model_builder import ModelBuilder def test_build(datadir, tmpdir): model_builder = ModelBuilder() model_builder.add_keras_h5_model(datadir / "fixture" / "keras_h5_model") model_builder.save() config = model_builder.serialize(tmpdir) assert c...
true
true
f71452f12de9bbaccc936c3a7641f37ccf59fe6e
92,701
py
Python
python/ccxt/ndax.py
allunderone/ccxt
b9e62462ad27a83ba6b0ec0ebd567357fdb7f2da
[ "MIT" ]
1
2018-08-20T09:38:13.000Z
2018-08-20T09:38:13.000Z
python/ccxt/ndax.py
allunderone/ccxt
b9e62462ad27a83ba6b0ec0ebd567357fdb7f2da
[ "MIT" ]
null
null
null
python/ccxt/ndax.py
allunderone/ccxt
b9e62462ad27a83ba6b0ec0ebd567357fdb7f2da
[ "MIT" ]
1
2019-01-02T01:32:45.000Z
2019-01-02T01:32:45.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
44.503601
218
0.51199
ge import Exchange import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import OrderNotFound from ccxt.base.decimal_to_precision import TICK_SIZE from ccxt.ba...
true
true
f714530361b2ac4050c9c8318d7b66818f4b64c0
546
py
Python
symposion/conference/admin.py
priyanshuraj7829/symposion
6b522f1f798d53cf0a481ecbac002dc4d0b5ab2f
[ "BSD-3-Clause" ]
147
2015-01-13T11:24:12.000Z
2022-03-20T20:31:52.000Z
symposion/conference/admin.py
priyanshuraj7829/symposion
6b522f1f798d53cf0a481ecbac002dc4d0b5ab2f
[ "BSD-3-Clause" ]
758
2015-03-18T13:39:25.000Z
2022-03-31T13:14:09.000Z
symposion/conference/admin.py
priyanshuraj7829/symposion
6b522f1f798d53cf0a481ecbac002dc4d0b5ab2f
[ "BSD-3-Clause" ]
83
2015-01-16T04:46:54.000Z
2020-10-02T07:45:48.000Z
from django.contrib import admin from symposion.conference.models import Conference, Section class SectionInline(admin.TabularInline): model = Section prepopulated_fields = {"slug": ("name",)} extra = 1 class ConferenceAdmin(admin.ModelAdmin): list_display = ("title", "start_date", "end_date") ...
23.73913
65
0.710623
from django.contrib import admin from symposion.conference.models import Conference, Section class SectionInline(admin.TabularInline): model = Section prepopulated_fields = {"slug": ("name",)} extra = 1 class ConferenceAdmin(admin.ModelAdmin): list_display = ("title", "start_date", "end_date") ...
true
true
f714542afbe3ce6340bb9e918a90bcd27446491c
667
py
Python
manage.py
mukhametdinovigor/where_to_go
7374807a6b9bde3b0d2ec03f99f4c73718f7e63c
[ "MIT" ]
null
null
null
manage.py
mukhametdinovigor/where_to_go
7374807a6b9bde3b0d2ec03f99f4c73718f7e63c
[ "MIT" ]
2
2022-01-13T03:53:40.000Z
2022-03-12T01:00:24.000Z
manage.py
mukhametdinovigor/where_to_go
7374807a6b9bde3b0d2ec03f99f4c73718f7e63c
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'where_to_go.settings') try: from django.core.management import execute_from_command_line except ...
29
75
0.68066
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'where_to_go.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f714546188fa61ae283a9f70bf3b94a702bd550e
238
py
Python
2nd_minimum_no_list.py
Akshara2820/Python_Folder
06782f88b45f907a4836e073c51f603bb19f9aa9
[ "MIT" ]
null
null
null
2nd_minimum_no_list.py
Akshara2820/Python_Folder
06782f88b45f907a4836e073c51f603bb19f9aa9
[ "MIT" ]
null
null
null
2nd_minimum_no_list.py
Akshara2820/Python_Folder
06782f88b45f907a4836e073c51f603bb19f9aa9
[ "MIT" ]
null
null
null
num=[50,40,23,70,56,100,18,] l=len(num) a=0 mini1=num[a] i=0 x=num while i<l: if x[i]<=mini1: mini1=x[i] i+=1 y=0 mini2=num[y] a=0 c=num m=0 while m<l: if mini2>num[m]>mini1: mini2=num[m] m+=1 print(mini2)
11.333333
28
0.546218
num=[50,40,23,70,56,100,18,] l=len(num) a=0 mini1=num[a] i=0 x=num while i<l: if x[i]<=mini1: mini1=x[i] i+=1 y=0 mini2=num[y] a=0 c=num m=0 while m<l: if mini2>num[m]>mini1: mini2=num[m] m+=1 print(mini2)
true
true
f71454f89dd5ee3d75234b5625c7636f0d8d8344
99
py
Python
vecino/__init__.py
sniperkit/snk.fork.vecino
a140171795e68fb7c9e26a72a585bd6aeb4e35a9
[ "Apache-2.0" ]
null
null
null
vecino/__init__.py
sniperkit/snk.fork.vecino
a140171795e68fb7c9e26a72a585bd6aeb4e35a9
[ "Apache-2.0" ]
null
null
null
vecino/__init__.py
sniperkit/snk.fork.vecino
a140171795e68fb7c9e26a72a585bd6aeb4e35a9
[ "Apache-2.0" ]
null
null
null
from vecino.similar_repositories import SimilarRepositories from vecino.__main__ import initialize
33
59
0.89899
from vecino.similar_repositories import SimilarRepositories from vecino.__main__ import initialize
true
true
f7145511c4c4a602dc7d916f5a9d093870f5b3f0
40,188
py
Python
research/object_detection/eval_util.py
slomrafgrav/models
daa6c0415e47bdc52ad6434dc2bdb5d8aeb4f7ce
[ "Apache-2.0" ]
79
2019-03-02T17:40:25.000Z
2021-08-17T13:22:03.000Z
research/object_detection/eval_util.py
ywy0318/models
91a59c78e8c48e8a1b2fec37143e52dae3f066c1
[ "Apache-2.0" ]
8
2019-05-14T10:10:50.000Z
2020-12-20T14:05:29.000Z
research/object_detection/eval_util.py
ywy0318/models
91a59c78e8c48e8a1b2fec37143e52dae3f066c1
[ "Apache-2.0" ]
27
2019-02-04T01:45:48.000Z
2021-03-18T02:39:28.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.259912
80
0.700956
import collections import os import time import numpy as np import tensorflow as tf from object_detection.core import box_list from object_detection.core import box_list_ops from object_detection.core import keypoint_ops from object_detection.core import standard_fields as fields from object_detection.m...
true
true
f714557129b17004b2cb69261547461b88d0c20a
227
py
Python
rank_reset.py
AmanMulani/python_web_crawling
a36115db6548b98c2c66868a14ce752449f4f7d1
[ "MIT" ]
null
null
null
rank_reset.py
AmanMulani/python_web_crawling
a36115db6548b98c2c66868a14ce752449f4f7d1
[ "MIT" ]
null
null
null
rank_reset.py
AmanMulani/python_web_crawling
a36115db6548b98c2c66868a14ce752449f4f7d1
[ "MIT" ]
null
null
null
import sqlite3 conn = sqlite3.connect('spider.sqlite') cur = conn.cursor() cur.execute(''' UPDATE Pages SET new_rank = 1.0, old_rank = 0.0 ''') conn.commit() cur.close() print('The rank of all pages has been set to 1.0')
18.916667
51
0.678414
import sqlite3 conn = sqlite3.connect('spider.sqlite') cur = conn.cursor() cur.execute(''' UPDATE Pages SET new_rank = 1.0, old_rank = 0.0 ''') conn.commit() cur.close() print('The rank of all pages has been set to 1.0')
true
true
f71455c4fdf2d638a601f379ab38dd4ba96daa46
1,474
py
Python
PythonClient/cv_mode.py
jelaredulla/thesis
dc348652cc0bd0a35e5d7506144d641510c2483b
[ "MIT" ]
null
null
null
PythonClient/cv_mode.py
jelaredulla/thesis
dc348652cc0bd0a35e5d7506144d641510c2483b
[ "MIT" ]
null
null
null
PythonClient/cv_mode.py
jelaredulla/thesis
dc348652cc0bd0a35e5d7506144d641510c2483b
[ "MIT" ]
null
null
null
# In settings.json first activate computer vision mode: # https://github.com/Microsoft/AirSim/blob/master/docs/image_apis.md#computer-vision-mode from AirSimClient import * import pprint pp = pprint.PrettyPrinter(indent=4) client = CarClient() client.confirmConnection() for x in range(3): # do few times z = x ...
40.944444
147
0.687246
mport * import pprint pp = pprint.PrettyPrinter(indent=4) client = CarClient() client.confirmConnection() for x in range(3): z = x * -20 - 5 client.simSetPose(Pose(Vector3r(z, z, z), AirSimClientBase.toQuaternion(x / 3.0, 0, x / 3.0)), True) responses = client.simGetImages([ ImageRequest(0, A...
true
true
f71455e0d19a2d1ec2ea85826d0070d6ac81fa73
5,361
py
Python
corehq/messaging/tasks.py
dannyroberts/commcare-hq
4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598
[ "BSD-3-Clause" ]
null
null
null
corehq/messaging/tasks.py
dannyroberts/commcare-hq
4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598
[ "BSD-3-Clause" ]
null
null
null
corehq/messaging/tasks.py
dannyroberts/commcare-hq
4b0b8ecbe851e46307d3a0e635d6d5d6e31c3598
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals from corehq.apps.data_interfaces.models import AutomaticUpdateRule from corehq.apps.sms import tasks as sms_tasks from corehq.form_processor.exceptions import CaseNotFound from corehq.form_processor.interfaces.dbaccessors import CaseAccessor...
39.419118
102
0.76814
from __future__ import absolute_import from __future__ import unicode_literals from corehq.apps.data_interfaces.models import AutomaticUpdateRule from corehq.apps.sms import tasks as sms_tasks from corehq.form_processor.exceptions import CaseNotFound from corehq.form_processor.interfaces.dbaccessors import CaseAccessor...
true
true
f71456a563d2f1c851ebfeff59b72638c5277020
17,730
py
Python
imageio_ffmpeg/_io.py
One-sixth/imageio-ffmpeg
888dace44a2160395cd88c577d542fe820086aa0
[ "BSD-2-Clause" ]
null
null
null
imageio_ffmpeg/_io.py
One-sixth/imageio-ffmpeg
888dace44a2160395cd88c577d542fe820086aa0
[ "BSD-2-Clause" ]
null
null
null
imageio_ffmpeg/_io.py
One-sixth/imageio-ffmpeg
888dace44a2160395cd88c577d542fe820086aa0
[ "BSD-2-Clause" ]
null
null
null
import sys import time import signal import subprocess from ._utils import get_ffmpeg_exe, logger from ._parsing import LogCatcher, parse_ffmpeg_header, cvsecs ISWIN = sys.platform.startswith("win") exe = None def _get_exe(): global exe if exe is None: exe = get_ffmpeg_exe() return exe def ...
39.4
89
0.598759
import sys import time import signal import subprocess from ._utils import get_ffmpeg_exe, logger from ._parsing import LogCatcher, parse_ffmpeg_header, cvsecs ISWIN = sys.platform.startswith("win") exe = None def _get_exe(): global exe if exe is None: exe = get_ffmpeg_exe() return exe def ...
true
true
f714592c49e276e7f9b6598977e5a6108553973c
1,014
py
Python
django_admin_demo/urls.py
noahzaozao/django_admin_demo
631010bb8cd14c8ccf48b46f154d78c2e7b5887a
[ "Apache-2.0" ]
null
null
null
django_admin_demo/urls.py
noahzaozao/django_admin_demo
631010bb8cd14c8ccf48b46f154d78c2e7b5887a
[ "Apache-2.0" ]
null
null
null
django_admin_demo/urls.py
noahzaozao/django_admin_demo
631010bb8cd14c8ccf48b46f154d78c2e7b5887a
[ "Apache-2.0" ]
null
null
null
"""django_admin_demo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'...
36.214286
79
0.731755
from django.conf.urls import url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from web.views import APIUserSearchView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'api/user/search', APIUserSearchView.as_view()), ] + static(settings.MED...
true
true
f7145968a1bf58bef88ec9f77fbf6c48708480e2
1,067
py
Python
wtools/plotting.py
DrAuxin/WestpaTools
4e236e0a3d65504d1937260316a4a5c6f39aa610
[ "BSD-3-Clause" ]
1
2020-05-18T15:58:17.000Z
2020-05-18T15:58:17.000Z
wtools/plotting.py
DrAuxin/WestpaTools
4e236e0a3d65504d1937260316a4a5c6f39aa610
[ "BSD-3-Clause" ]
null
null
null
wtools/plotting.py
DrAuxin/WestpaTools
4e236e0a3d65504d1937260316a4a5c6f39aa610
[ "BSD-3-Clause" ]
null
null
null
import h5py import numpy import matplotlib.pyplot as plt def plotflux(h5file, state=1): """ A function that plots the dataset target_flux_evolution from a direct.h5 file. Parameters ---------- h5file: dictionary The user's HDF5 file loaded with loadh5. state: integer The target...
26.675
85
0.615745
import h5py import numpy import matplotlib.pyplot as plt def plotflux(h5file, state=1): fluxes = h5file['target_flux_evolution']['expected',:,state-1] iterations = numpy.arange(1,len(fluxes)+1,1) fig, ax = plt.subplots() ax.plot(iterations,fluxes, linewidth=3) ax.set_xlabel('WE Iteration', fontsize...
true
true
f7145aa2447443687be6df3402e6c85c14e2707b
15,668
py
Python
experiments/custom_agents_opt.py
anonips/-MDP-Playground
74431f98c210830a93a1bc83fcdcb95bf1644696
[ "Apache-2.0" ]
2
2019-09-18T14:43:40.000Z
2021-02-23T18:46:50.000Z
experiments/custom_agents_opt.py
anonips/-MDP-Playground
74431f98c210830a93a1bc83fcdcb95bf1644696
[ "Apache-2.0" ]
null
null
null
experiments/custom_agents_opt.py
anonips/-MDP-Playground
74431f98c210830a93a1bc83fcdcb95bf1644696
[ "Apache-2.0" ]
1
2020-02-14T13:59:15.000Z
2020-02-14T13:59:15.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from ray.rllib.agents.trainer import Trainer, with_common_config from ray.rllib.utils.annotations import override # yapf: disable # __sphinx_doc_begin__ class RandomAgent(Trainer): """P...
44.511364
254
0.524509
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from ray.rllib.agents.trainer import Trainer, with_common_config from ray.rllib.utils.annotations import override class RandomAgent(Trainer): _name = "RandomAgent" _default_confi...
true
true
f7145c199e0e4cfca77fa9ac99b9dea5fb703b95
1,756
py
Python
alipay/aop/api/domain/AnswerModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AnswerModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AnswerModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AnswerModel(object): def __init__(self): self._extra = None self._item_id = None self._option_id = None @property def extra(self): return se...
24.732394
69
0.555809
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AnswerModel(object): def __init__(self): self._extra = None self._item_id = None self._option_id = None @property def extra(self): return self._extra @extra.setter def extra(s...
true
true
f7145c94fe95283ff3e26d0aa9e1a5bdf965d2fc
52,866
py
Python
sdk/python/pulumi_azure_native/hybridnetwork/v20210501/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridnetwork/v20210501/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridnetwork/v20210501/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
44.239331
1,145
0.659668
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * __all__ = [ 'CustomProfileResponse', 'DataDiskResponse', 'ImageReferenceResponse', 'LinuxConfigurationRespo...
true
true
f7145cc12aed42e52b811d6e792bdbbe823aba63
9,103
py
Python
rodnet/models/backbones/hgwi.py
zhengzangw/RODNet
eca5f2bd1f3051c2b823d279532ddafa71b009c1
[ "MIT" ]
null
null
null
rodnet/models/backbones/hgwi.py
zhengzangw/RODNet
eca5f2bd1f3051c2b823d279532ddafa71b009c1
[ "MIT" ]
null
null
null
rodnet/models/backbones/hgwi.py
zhengzangw/RODNet
eca5f2bd1f3051c2b823d279532ddafa71b009c1
[ "MIT" ]
null
null
null
import torch import torch.nn as nn class RadarStackedHourglass(nn.Module): def __init__(self, n_class, stacked_num=1): super(RadarStackedHourglass, self).__init__() self.stacked_num = stacked_num self.conv1a = nn.Conv3d( in_channels=2, out_channels=32, k...
34.612167
101
0.494782
import torch import torch.nn as nn class RadarStackedHourglass(nn.Module): def __init__(self, n_class, stacked_num=1): super(RadarStackedHourglass, self).__init__() self.stacked_num = stacked_num self.conv1a = nn.Conv3d( in_channels=2, out_channels=32, k...
true
true
f7145d06775df411d8b6bbed45d9cb10c999cfeb
203,536
py
Python
salt/modules/file.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/modules/file.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/modules/file.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Manage information about regular files, directories, and special files on the minion, set/read user, group, mode, and data ''' # TODO: We should add the capability to do u+r type operations here # some time in the future from __future__ import absolute_import, print_function # Import pyth...
31.932225
178
0.555337
from __future__ import absolute_import, print_function import datetime import difflib import errno import fileinput import fnmatch import itertools import logging import operator import os import re import shutil import stat import string import sys import tempfile import time import glob import hashlib import m...
true
true
f7145d3436320d6def2071605cdc3fc5a509c911
2,682
py
Python
catalog/bindings/gmd/cubic_spline_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/cubic_spline_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/cubic_spline_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import List, Optional from bindings.gmd.abstract_curve_segment_type import AbstractCurveSegmentType from bindings.gmd.coordinates import Coordinates from bindings.gmd.curve_interpolation_type import CurveInterpolationType from bindings.gmd.point_property import Point...
28.83871
77
0.561894
from dataclasses import dataclass, field from typing import List, Optional from bindings.gmd.abstract_curve_segment_type import AbstractCurveSegmentType from bindings.gmd.coordinates import Coordinates from bindings.gmd.curve_interpolation_type import CurveInterpolationType from bindings.gmd.point_property import Point...
true
true
f7145dbe062462ea587231c7a6d56ded0ad5f8e1
323
py
Python
examples/02_Example_WaterwaySearch/TerminalColors.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
13
2019-09-19T01:07:23.000Z
2022-01-06T17:25:48.000Z
src/TerminalColors.py
JTEnglish/UAVHeading-CollisionAvoidance
97e732616b6243184d64455e143ffe798840273a
[ "MIT" ]
3
2019-06-10T06:10:52.000Z
2020-07-21T16:10:41.000Z
src/TerminalColors.py
JTEnglish/UAVHeading-CollisionAvoidance
97e732616b6243184d64455e143ffe798840273a
[ "MIT" ]
3
2020-02-12T06:13:36.000Z
2021-02-14T03:00:34.000Z
''' Class: TerminalColors Credit: https://stackoverflow.com/questions/287871/print-in-terminal-with-colors ''' class TerminalColors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[...
23.071429
81
0.609907
class TerminalColors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m'
true
true
f7145e9a3b17f8a481672804c82a177d305100f7
3,194
py
Python
pictures/tests.py
David5627/My_Gallary
cfbdcb13586f3d132993f9ceb1aa84c2f0ca61b3
[ "MIT" ]
null
null
null
pictures/tests.py
David5627/My_Gallary
cfbdcb13586f3d132993f9ceb1aa84c2f0ca61b3
[ "MIT" ]
null
null
null
pictures/tests.py
David5627/My_Gallary
cfbdcb13586f3d132993f9ceb1aa84c2f0ca61b3
[ "MIT" ]
null
null
null
from django.test import TestCase # Create your tests here. from .models import Image, Category, Location class TestImage(TestCase): def setUp(self): self.location = Location(locationName='Kiambu') self.location.saveLocation() self.category = Category(categoryName='job') self.cate...
32.591837
123
0.66938
from django.test import TestCase from .models import Image, Category, Location class TestImage(TestCase): def setUp(self): self.location = Location(locationName='Kiambu') self.location.saveLocation() self.category = Category(categoryName='job') self.category.saveCategory() ...
true
true
f7145f89446bea1ed70f31be8e13fd069d3d268f
16,419
py
Python
venv/lib/python2.7/site-packages/sklearn/base.py
bopopescu/fbserver
e812dbc4dc0cbf2fda19473015a3d7e253718a19
[ "Apache-2.0" ]
null
null
null
venv/lib/python2.7/site-packages/sklearn/base.py
bopopescu/fbserver
e812dbc4dc0cbf2fda19473015a3d7e253718a19
[ "Apache-2.0" ]
null
null
null
venv/lib/python2.7/site-packages/sklearn/base.py
bopopescu/fbserver
e812dbc4dc0cbf2fda19473015a3d7e253718a19
[ "Apache-2.0" ]
1
2020-07-23T19:26:19.000Z
2020-07-23T19:26:19.000Z
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import inspect import warnings import numpy as np from scipy import sparse from .externals import six ############################################################################### de...
36.006579
79
0.554053
import copy import inspect import warnings import numpy as np from scipy import sparse from .externals import six items=2) params_list = list() this_line_length = offset line_sep = ',\n' + (1 + offset // 2) * ' ' for i, (k, v) in enumerate(sorted(six.iteritems(params))): if type(v) is floa...
true
true
f71461118a36638bf9f86bc877bea372a4e45f9a
689
py
Python
app.py
JoeDReynolds/HW_13
8fc15c37554069ff51e1d29685384e6e521a4b2a
[ "ADSL" ]
null
null
null
app.py
JoeDReynolds/HW_13
8fc15c37554069ff51e1d29685384e6e521a4b2a
[ "ADSL" ]
null
null
null
app.py
JoeDReynolds/HW_13
8fc15c37554069ff51e1d29685384e6e521a4b2a
[ "ADSL" ]
null
null
null
# import necessary libraries from flask import Flask, render_template, jsonify, redirect from flask_pymongo import PyMongo import scrape_mars # create instance of Flask app app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) # create route that renders index.ht...
23.758621
62
0.740203
from flask import Flask, render_template, jsonify, redirect from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) @app.route("/") def index(): mars_data = mongo.db.mars_db.find_one() return render_template...
true
true
f71461fff2ddfcf30af051a048b0f75af416145e
3,596
py
Python
ma.py
nishishailesh/moving_average_clin_lab
c8ee448ca16b0d3845c42cafa070dafd307594dc
[ "MIT" ]
null
null
null
ma.py
nishishailesh/moving_average_clin_lab
c8ee448ca16b0d3845c42cafa070dafd307594dc
[ "MIT" ]
null
null
null
ma.py
nishishailesh/moving_average_clin_lab
c8ee448ca16b0d3845c42cafa070dafd307594dc
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import fcntl import logging import time import io import datetime import decimal import statistics from astm_bidirectional_common import my_sql , file_mgmt, print_to_log #For mysql password sys.path.append('/var/gmcs_config') import astm_var ####Settings section start##### logfile_name='/...
35.60396
128
0.743326
import sys import fcntl import logging import time import io import datetime import decimal import statistics from astm_bidirectional_common import my_sql , file_mgmt, print_to_log sys.path.append('/var/gmcs_config') import astm_var (logging.DEBUG) print_to_log("Moving Average Logging Test","[OK]") def check_if_ne...
true
true
f7146227c802ba11eb67d4ee45f43ada79d84b3d
3,553
py
Python
app/selenium_ui/jsm/pages/customer_selectors.py
mapit-plugin/dc-app-performance-toolkit
75d7562c7ffc925c8ba8dfbe81db08af85fadcfa
[ "Apache-2.0" ]
1
2021-09-17T04:34:03.000Z
2021-09-17T04:34:03.000Z
app/selenium_ui/jsm/pages/customer_selectors.py
mapit-plugin/dc-app-performance-toolkit
75d7562c7ffc925c8ba8dfbe81db08af85fadcfa
[ "Apache-2.0" ]
null
null
null
app/selenium_ui/jsm/pages/customer_selectors.py
mapit-plugin/dc-app-performance-toolkit
75d7562c7ffc925c8ba8dfbe81db08af85fadcfa
[ "Apache-2.0" ]
1
2020-12-30T11:12:58.000Z
2020-12-30T11:12:58.000Z
from util.conf import JSM_SETTINGS from selenium.webdriver.common.by import By class UrlManager: def __init__(self, portal_id=None, request_key=None): self.host = JSM_SETTINGS.server_url self.login_params = '/servicedesk/customer/user/login' self.portal_params = f'/servicedesk/customer/po...
39.921348
111
0.710104
from util.conf import JSM_SETTINGS from selenium.webdriver.common.by import By class UrlManager: def __init__(self, portal_id=None, request_key=None): self.host = JSM_SETTINGS.server_url self.login_params = '/servicedesk/customer/user/login' self.portal_params = f'/servicedesk/customer/po...
true
true
f71462edb7ac3e4f02fba779f9139da6a78624ba
6,058
py
Python
tests/evaluators_test.py
gaussalgo/adaptor
8d8ae1b7694108f4bde78c127fe9ff97fa6b9470
[ "MIT" ]
11
2022-01-25T13:44:15.000Z
2022-03-16T12:46:58.000Z
tests/evaluators_test.py
gaussalgo/adaptor
8d8ae1b7694108f4bde78c127fe9ff97fa6b9470
[ "MIT" ]
3
2022-01-29T18:19:01.000Z
2022-02-01T15:34:44.000Z
tests/evaluators_test.py
gaussalgo/adaptor
8d8ae1b7694108f4bde78c127fe9ff97fa6b9470
[ "MIT" ]
1
2022-02-17T17:11:40.000Z
2022-02-17T17:11:40.000Z
from adaptor.evaluators.generative import GenerativeEvaluator from adaptor.evaluators.sequence_classification import SeqClassificationEvaluator from adaptor.evaluators.token_classification import TokenClassificationEvaluator from adaptor.lang_module import LangModule from adaptor.objectives.objective_base import Object...
44.544118
113
0.680753
from adaptor.evaluators.generative import GenerativeEvaluator from adaptor.evaluators.sequence_classification import SeqClassificationEvaluator from adaptor.evaluators.token_classification import TokenClassificationEvaluator from adaptor.lang_module import LangModule from adaptor.objectives.objective_base import Object...
true
true
f714644c0e16e7716dae2a067aae906a9e263d99
23,086
py
Python
script_helper/Script/Network.py
jupiterman/Data-Transfer-Neural-Way
a38140aab141e4749aedc30899714ad4028a6a8a
[ "Apache-2.0" ]
1
2020-02-17T06:38:58.000Z
2020-02-17T06:38:58.000Z
script_helper/Script/Network.py
minihat/Neural-Style-Transfer
d900a5552c78f81450c3918640aa3e9210a57488
[ "Apache-2.0" ]
null
null
null
script_helper/Script/Network.py
minihat/Neural-Style-Transfer
d900a5552c78f81450c3918640aa3e9210a57488
[ "Apache-2.0" ]
1
2018-02-07T12:59:04.000Z
2018-02-07T12:59:04.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import from scipy.misc import imread, imresize, imsave, fromimage, toimage from scipy.optimize import fmin_l_bfgs_b import numpy as np import time import argparse import warnings from keras.models import Model from k...
36.878594
152
0.668067
from __future__ import print_function from __future__ import division from __future__ import absolute_import from scipy.misc import imread, imresize, imsave, fromimage, toimage from scipy.optimize import fmin_l_bfgs_b import numpy as np import time import argparse import warnings from keras.models import Model from k...
true
true
f7146499f43a1ececce716dc775d27d50a4ee29c
846
py
Python
test/test_item_option.py
gstingy/uc_python_api
9a0bd3f6e63f616586681518e44fe37c6bae2bba
[ "Apache-2.0" ]
null
null
null
test/test_item_option.py
gstingy/uc_python_api
9a0bd3f6e63f616586681518e44fe37c6bae2bba
[ "Apache-2.0" ]
null
null
null
test/test_item_option.py
gstingy/uc_python_api
9a0bd3f6e63f616586681518e44fe37c6bae2bba
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import ultracart f...
18.8
79
0.680851
from __future__ import absolute_import import os import sys import unittest import ultracart from ultracart.rest import ApiException from ultracart.models.item_option import ItemOption class TestItemOption(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test...
true
true
f714679fa4b4036479edd5366153bd136b63a604
8,720
py
Python
pta_sim/pint_sim.py
Hazboun6/pta_sim
cf8676e23056586ecb35a030dbaad45a1f985764
[ "MIT" ]
1
2019-05-22T10:35:49.000Z
2019-05-22T10:35:49.000Z
pta_sim/pint_sim.py
Hazboun6/pta_sim
cf8676e23056586ecb35a030dbaad45a1f985764
[ "MIT" ]
1
2021-11-15T17:48:32.000Z
2021-11-15T17:48:32.000Z
pta_sim/pint_sim.py
Hazboun6/pta_sim
cf8676e23056586ecb35a030dbaad45a1f985764
[ "MIT" ]
2
2019-05-23T13:55:53.000Z
2021-06-23T13:15:22.000Z
#!/usr/bin/env python # coding: utf-8 import numpy as np import astropy.units as u from astropy.time import Time, TimeDelta from pint.residuals import resids import pint.toa as toa from pint import models __all__ = ['make_ideal', 'createfourierdesignmatrix_red', 'add_rednoise', 'add_d...
31.142857
84
0.592431
import numpy as np import astropy.units as u from astropy.time import Time, TimeDelta from pint.residuals import resids import pint.toa as toa from pint import models __all__ = ['make_ideal', 'createfourierdesignmatrix_red', 'add_rednoise', 'add_dm_rednoise', 'add_efac', ...
true
true
f71467a510667cf3558e0f2dd126bccf19a330a0
8,753
py
Python
data/external/repositories_2to3/137656/blundercheck-master/combine/data_prep/prepare_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/data_prep/prepare_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/data_prep/prepare_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
#!/usr/bin/env python from pandas import * from numpy import * from djeval import * import csv, code import pickle as pickle from sklearn.externals import joblib NUM_GAMES=50000 def shell(): vars = globals() vars.update(locals()) shell = code.InteractiveConsole(vars) shell.interact...
35.294355
280
0.69302
from pandas import * from numpy import * from djeval import * import csv, code import pickle as pickle from sklearn.externals import joblib NUM_GAMES=50000 def shell(): vars = globals() vars.update(locals()) shell = code.InteractiveConsole(vars) shell.interact() msg("Hi! Reading...
true
true
f71467e65dae3f982a9af5237ac320ca8270123d
9,283
py
Python
src/transformers/models/mctct/configuration_mctct.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
src/transformers/models/mctct/configuration_mctct.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
src/transformers/models/mctct/configuration_mctct.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
49.908602
119
0.679845
from ...configuration_utils import PretrainedConfig from ...utils import logging logger = logging.get_logger(__name__) MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP = { "speechbrain/m-ctc-t-large": "https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json", } class MCTCTConfig(Pretra...
true
true
f71468717fc5e61acbe354ad1694025b5b1bf250
1,649
py
Python
.venv/lib/python3.8/site-packages/opencensus/stats/measurement.py
MarkusMeyer13/graph-teams-presence
c302b79248f31623a1b209e098afc4f85d96228d
[ "MIT" ]
null
null
null
.venv/lib/python3.8/site-packages/opencensus/stats/measurement.py
MarkusMeyer13/graph-teams-presence
c302b79248f31623a1b209e098afc4f85d96228d
[ "MIT" ]
1
2021-07-28T09:45:24.000Z
2021-07-28T09:45:24.000Z
.venv/lib/python3.8/site-packages/opencensus/stats/measurement.py
MarkusMeyer13/graph-teams-presence
c302b79248f31623a1b209e098afc4f85d96228d
[ "MIT" ]
null
null
null
# Copyright 2018, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
32.333333
77
0.681019
class Measurement(object): def __init__(self, measure, value): self._measure = measure self._value = value @property def value(self): return self._value @property def measure(self): return self._measure class MeasurementInt(Measureme...
true
true
f71468baccb7f26415744498bbf3284f96465119
26,158
py
Python
tests/system/test_integration.py
jhonnysanchezillisaca/apm-server
eeae18ef1551769bd03998e6798aadc94dda0a3d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/system/test_integration.py
jhonnysanchezillisaca/apm-server
eeae18ef1551769bd03998e6798aadc94dda0a3d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/system/test_integration.py
jhonnysanchezillisaca/apm-server
eeae18ef1551769bd03998e6798aadc94dda0a3d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import os import unittest from apmserver import ElasticTest, ExpvarBaseTest from apmserver import ClientSideElasticTest, SmapIndexBaseTest, SmapCacheBaseTest from apmserver import SplitIndicesTest from beat.beat import INTEGRATION_TESTS import json import time class Test(ElasticTest): @unittest.skipUnless(INTEG...
45.571429
136
0.601155
import os import unittest from apmserver import ElasticTest, ExpvarBaseTest from apmserver import ClientSideElasticTest, SmapIndexBaseTest, SmapCacheBaseTest from apmserver import SplitIndicesTest from beat.beat import INTEGRATION_TESTS import json import time class Test(ElasticTest): @unittest.skipUnless(INTEG...
true
true
f71469034f1006ce1d48aedf70acee846deb393a
6,692
py
Python
pyelastic/pendulum.py
tacox5/elastic_pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
null
null
null
pyelastic/pendulum.py
tacox5/elastic_pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
8
2021-06-11T15:26:47.000Z
2021-07-29T23:52:01.000Z
pyelastic/pendulum.py
tyler-a-cox/elastic-pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
null
null
null
import os import glob import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp from scipy.interpolate import interp1d from .settings import * class ElasticPendulum: """Class that handles the simulation of springy, double pendulums. This class handles a number of initial conditi...
34.494845
90
0.51569
import os import glob import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp from scipy.interpolate import interp1d from .settings import * class ElasticPendulum: def __init__(self, **kwargs): prop_defaults = { "alpha_0": np.random.uniform(-np.pi, np.pi), ...
true
true
f71469867882f63d4249d507eeda5f87798b2b79
535
py
Python
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @Time : 2020/12/11 11:57 @Author : Corey """ from flask import Flask, request from flask_restful import Api, Resource, marshal, fields, reqparse app = Flask(__name__) # restful接口方法 api = Api(app) class UserApi(Resource): def get(self): return 'get restful api data' de...
19.814815
66
0.648598
from flask import Flask, request from flask_restful import Api, Resource, marshal, fields, reqparse app = Flask(__name__) api = Api(app) class UserApi(Resource): def get(self): return 'get restful api data' def post(self): return 'update restful api data' def delete(self): ret...
true
true
f71469a4c65abe3c8976410b9d79a0dd097398f2
379
py
Python
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
303
2015-01-08T10:35:54.000Z
2022-02-28T08:54:06.000Z
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
124
2015-01-14T12:56:15.000Z
2022-03-22T20:45:11.000Z
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
110
2015-01-02T11:59:48.000Z
2022-02-28T08:54:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin class VipInstanceGroupAdmin(admin.ModelAdmin): search_fields = ("name", "identifier",) list_display = ("name", "identifier", "vip", ) search_fields = ("name", "identifier", "vip__infra__name")...
31.583333
62
0.699208
from __future__ import absolute_import, unicode_literals from django.contrib import admin class VipInstanceGroupAdmin(admin.ModelAdmin): search_fields = ("name", "identifier",) list_display = ("name", "identifier", "vip", ) search_fields = ("name", "identifier", "vip__infra__name") list_filter = ('vi...
true
true
f71469ad5f5395756c71d0408eb3aba396919d37
3,078
py
Python
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
11
2021-03-29T14:27:48.000Z
2022-01-01T00:31:40.000Z
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
null
null
null
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
null
null
null
import typing from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list from .format import format from .join_common import JoinTarget, Key, Structure from .join_key import KeyConsumer, TargetRefresh from .sql import SqlTableExpr from .sql_query import sync_query, upsert_query from .string import indent d...
24.428571
83
0.668291
import typing from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list from .format import format from .join_common import JoinTarget, Key, Structure from .join_key import KeyConsumer, TargetRefresh from .sql import SqlTableExpr from .sql_query import sync_query, upsert_query from .string import indent d...
true
true
f7146a3b8bd5c67332e642ddcaf6c0846b506b4b
1,568
py
Python
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error import harstorage.lib.app_globals as app_globals import harstorage.lib.helpers from harstorage.config.routing import make_map def load_environment(global_conf, app_conf): """...
34.844444
77
0.711097
import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error import harstorage.lib.app_globals as app_globals import harstorage.lib.helpers from harstorage.config.routing import make_map def load_environment(global_conf, app_conf): co...
true
true
f7146ac1b88ddd7645aeea7aa509f16d3d4bf02a
553
py
Python
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
# Strategy known as "Forrgviing Grim Trigger" or "Grudger". # We will cooperate repeatedly until our opponent betrays us twice. # Then, we will get angry and defect for the rest of time. # Memory is the number of times the strategy has been wronged def strategy(history, memory): wronged = memory if hist...
32.529412
73
0.625678
def strategy(history, memory): wronged = memory if history.shape[1] ==0: wronged = 0 if history.shape[1] >= 1 and history[1,-1] == 0: wronged += 1 if wronged >= 2: return 0, wronged else: return 1, wronged
true
true
f7146c422cdc8ea2780342f0d121cce5a78ee0fb
516
py
Python
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
19
2018-07-27T19:14:10.000Z
2021-12-08T16:34:42.000Z
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
516
2017-07-27T15:45:43.000Z
2022-02-10T07:57:46.000Z
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
16
2018-01-01T19:07:01.000Z
2021-09-17T07:59:59.000Z
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView from datasets.models import Data from utils.data import make_url_sassy class DataManagement(LoginRequiredMixin, TemplateV...
30.352941
68
0.827519
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView from datasets.models import Data from utils.data import make_url_sassy class DataManagement(LoginRequiredMixin, TemplateV...
true
true
f7146d93278ba64bba1fb20d47d61c403f8494f0
32,956
py
Python
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def ge...
44.176944
220
0.571155
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def get_unspent(listunspent, amount): for utx in listunspent: if utx['amount'] == amount: return utx raise AssertionError('Could not find unspent with amount={}'.format(amount)) class Ra...
true
true
f7146e28902a4ba376e0f04a00b98ce31bf4575b
28,745
py
Python
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
12
2017-04-04T11:51:09.000Z
2021-11-05T02:07:58.000Z
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
21
2017-03-28T04:32:54.000Z
2021-09-01T03:52:53.000Z
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
9
2018-07-31T04:15:22.000Z
2020-10-06T13:43:22.000Z
# coding=utf-8 # # Copyright © 2011-2015 Splunk, 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 ...
34.017751
120
0.586085
from __future__ import absolute_import, division, print_function from io import TextIOWrapper from collections import deque, namedtuple from splunklib import six try: from collections import OrderedDict except ImportError: from ..ordereddict import OrderedDict from splunklib.six.moves import ...
true
true
f7146fa04286aa454a33161690efd3bc2e7b2b70
5,851
py
Python
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import Frame from compas.geometry import Transformation from compas.robots.model.robot import RobotModel class ToolModel(RobotModel): """Represents a tool to be attached to the robot'...
33.820809
119
0.592719
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import Frame from compas.geometry import Transformation from compas.robots.model.robot import RobotModel class ToolModel(RobotModel): def __init__(self, visual, frame_in_tool0_frame,...
true
true
f714701d95b7e531e20aa26475084c4b139b2eb8
417
py
Python
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
null
null
null
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
5
2020-02-11T23:31:23.000Z
2021-06-10T21:03:24.000Z
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2018-12-24 16:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0003_game_description_html'), ] operations = [ migrations.AlterField( model_name='game', name='descriptio...
21.947368
75
0.613909
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0003_game_description_html'), ] operations = [ migrations.AlterField( model_name='game', name='description', field=models.CharField(blank=Tr...
true
true
f7147066a672f718ec342f39cba6fdc815170b9d
2,054
py
Python
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
import numpy as np import cv2 # A motion detecetor, yup... lol. # Remember to use an old python version < 3.6 image_path = 'room_people.jpg' # Photo # The model was already formulated, just need to loaad it into the system. prototxt_path = 'models/MobileNetSSD_deploy.prototxt' # Load Model model_path = 'models/Mob...
32.09375
129
0.656767
import numpy as np import cv2 image_path = 'room_people.jpg' prototxt_path = 'models/MobileNetSSD_deploy.prototxt' model_path = 'models/MobileNetSSD_deploy.caffemodel' min_confidence = 0.2 classes = ["background","aeroplane","bicycle","bird","boat","bottle","bus","car","cat","chair","cow","diningtable","dog...
true
true
f714719a188b3cff193941c546d8d5b9cbeb3c7f
227
py
Python
chia/wallet/puzzles/rom_bootstrap_generator.py
ForestCrazy/chia-blockchain-remote-plot
0ba838b7a8ea2b5410d438ac70295df699a30dae
[ "Apache-2.0" ]
11,902
2019-12-05T00:14:29.000Z
2022-03-31T23:25:37.000Z
chia/wallet/puzzles/rom_bootstrap_generator.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
5,246
2019-12-05T04:00:03.000Z
2022-03-31T21:33:30.000Z
chia/wallet/puzzles/rom_bootstrap_generator.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
2,149
2019-12-05T11:12:53.000Z
2022-03-31T06:08:34.000Z
from chia.types.blockchain_format.program import SerializedProgram from .load_clvm import load_clvm MOD = SerializedProgram.from_bytes(load_clvm("rom_bootstrap_generator.clvm").as_bin()) def get_generator(): return MOD
22.7
86
0.814978
from chia.types.blockchain_format.program import SerializedProgram from .load_clvm import load_clvm MOD = SerializedProgram.from_bytes(load_clvm("rom_bootstrap_generator.clvm").as_bin()) def get_generator(): return MOD
true
true
f71471f3e75074020a7c0fdf86353776fcede027
3,324
py
Python
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
1
2018-12-27T23:35:52.000Z
2018-12-27T23:35:52.000Z
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
null
null
null
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
null
null
null
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
25.569231
93
0.691637
import socket; import sys from bintreenode import BinTreeNodeReader, BinTreeNodeWriter from Yowsup.Common.debugger import Debugger from ioexceptions import ConnectionClosedException class ConnectionEngine(socket.socket): def __init__(self): Debugger.attach(self) self.reader = BinTreeNodeReader(self) self....
true
true
f7147205a286f1365d68f46e5f1a2e5554c58b41
1,577
py
Python
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
1
2020-02-27T15:51:47.000Z
2020-02-27T15:51:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Talkcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify fr...
33.553191
134
0.714648
from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify from getpass import getpass from os import urandom import hmac def generate_salt(size): return hexlify(urandom(size)).decode() def generate_password(): return urlsafe_b64encode(urandom(32)).decode('utf-...
true
true
f71472389ed45e2198b8808678490dfe4d7a408f
787
py
Python
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
from hyperopt import hp from sklearn.naive_bayes import MultinomialNB as _skMultinomialNB from script.sklearn_like_toolkit.warpper.base.BaseWrapperClf import BaseWrapperClf from script.sklearn_like_toolkit.warpper.base.MixIn import MetaBaseWrapperClfWithABC class skMultinomial_NBClf(BaseWrapperClf, _skMultino...
35.772727
98
0.70521
from hyperopt import hp from sklearn.naive_bayes import MultinomialNB as _skMultinomialNB from script.sklearn_like_toolkit.warpper.base.BaseWrapperClf import BaseWrapperClf from script.sklearn_like_toolkit.warpper.base.MixIn import MetaBaseWrapperClfWithABC class skMultinomial_NBClf(BaseWrapperClf, _skMultino...
true
true
f71472b726fa211be0ca1ee4ef01ed7553c09623
8,432
py
Python
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
2
2022-02-27T04:02:18.000Z
2022-03-01T03:48:47.000Z
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
1
2021-12-01T03:10:17.000Z
2021-12-23T20:27:21.000Z
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
2
2022-02-27T04:02:19.000Z
2022-03-01T03:49:21.000Z
import warnings import numpy as np import pytest import pandas as pd from pandas import ( Index, MultiIndex, ) def test_format(idx): idx.format() idx[:0].format() def test_format_integer_names(): index = MultiIndex( levels=[[0, 1], [0, 1]], codes=[[0, 0, 1, 1], [0, 1, 0, 1]], names=[0,...
36.66087
95
0.468098
import warnings import numpy as np import pytest import pandas as pd from pandas import ( Index, MultiIndex, ) def test_format(idx): idx.format() idx[:0].format() def test_format_integer_names(): index = MultiIndex( levels=[[0, 1], [0, 1]], codes=[[0, 0, 1, 1], [0, 1, 0, 1]], names=[0,...
true
true
f71474cfffbbc364e0e62d899c3954f135303af3
8,393
py
Python
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
82
2020-03-28T02:24:38.000Z
2022-03-30T04:18:42.000Z
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
118
2020-03-14T17:34:11.000Z
2022-03-30T07:07:45.000Z
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
30
2020-06-20T15:31:53.000Z
2022-03-06T06:23:55.000Z
from __future__ import absolute_import import ast import re import operator as op import pyparsing from ..exceptions import CloudflareSolveError from . import JavaScriptInterpreter # ------------------------------------------------------------------------------- # _OP_MAP = { ast.Add: op.add, ast.Sub: op.su...
35.867521
124
0.398546
from __future__ import absolute_import import ast import re import operator as op import pyparsing from ..exceptions import CloudflareSolveError from . import JavaScriptInterpreter _OP_MAP = { ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, ast.Div: op.truediv, ast.Invert: op.neg, } class...
true
true
f714758643422dfaacbc46a0e387395c3f0c97c1
10,009
py
Python
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
1
2021-11-28T09:27:16.000Z
2021-11-28T09:27:16.000Z
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
null
null
null
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 """ Schema Validation for Deployment map files """ from schema import Schema, And, Use, Or, Optional, Regex from logger import configure_logger LOGGER = configure_logger(__name__) NOTIFICATION_PROPS = { Op...
28.194366
172
0.654911
from schema import Schema, And, Use, Or, Optional, Regex from logger import configure_logger LOGGER = configure_logger(__name__) NOTIFICATION_PROPS = { Optional("target"): str, Optional("type") : Or("lambda", "chat_bot") } PARAM_SCHEMA = { Optional("notification_endpoint"): Or(str, NOTIFICATION_PROP...
true
true
f71475d212b144b5142445b5a0db415640369fb9
23
py
Python
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
null
null
null
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
3
2020-04-15T16:06:19.000Z
2020-04-15T16:07:49.000Z
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
1
2021-01-27T10:32:47.000Z
2021-01-27T10:32:47.000Z
INTENT_THRESHOLD = 0.5
11.5
22
0.782609
INTENT_THRESHOLD = 0.5
true
true
f7147793a2e6c2dd68fdd7d5efb9db0e5d179701
14,417
py
Python
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ @package mi.dataset.parser A collection of parsers that strip data blocks out of files and feed them into the system. @file mi/dataset/parser.py @author Steve Foley @brief Base classes for data set agent parsers """ __author__ = 'Steve Foley' __license__ = 'Apache 2.0' import time import nt...
43.820669
119
0.634667
__author__ = 'Steve Foley' __license__ = 'Apache 2.0' import time import ntplib from mi.core.log import get_logger log = get_logger() from mi.core.instrument.chunker import StringChunker from mi.core.instrument.data_particle import DataParticleKey from mi.core.exceptions import RecoverableSampleException, SampleEn...
true
true
f7147794bdcdc9985403994d39b45297ef13f697
4,281
py
Python
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
# Author: Mark Olson 2021-11-06 https://github.com/Mark-MDO47/PrisonDilemmaTourney # # algo_mdo_tit_for_2_tat.py - Prisoner's Dilemma tournament algorithm file # # The algo_mdo_tit_for_2_tat algorithm behaves as follows: # On the first two moves it returns choices.COOPERATE # On all subsequent moves: # if t...
57.08
122
0.749825
# # The algo_mdo_tit_for_2_tat algorithm behaves as follows: # On the first two moves it returns choices.COOPERATE # On all subsequent moves: # if the opponent did choices.DEFECT within the last two moves, it returns choices.DEFECT this move # else it returns choices.COOPERATE this move # # For an ...
true
true
f714788157a6abe32fba2b5d294f2ebd1935e271
93
py
Python
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
null
null
null
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
1
2015-10-23T14:43:09.000Z
2015-10-23T14:43:09.000Z
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
null
null
null
__author__ = 'meli' HOST = '0.0.0.0' STATIC_PATH = "../static" TEPLATE_PATH = "../templates"
18.6
29
0.645161
__author__ = 'meli' HOST = '0.0.0.0' STATIC_PATH = "../static" TEPLATE_PATH = "../templates"
true
true
f7147b09abce445b07986e1ce4221073dcb14461
2,384
py
Python
dynd/nd/test/test_functional.py
mwiebe/dynd-python
45ffecaf7887761a5634140f0ed120b33ace58a3
[ "BSD-2-Clause" ]
93
2015-01-29T14:00:57.000Z
2021-11-23T14:37:27.000Z
dynd/nd/test/test_functional.py
ContinuumIO/dynd-python
bae7afb8eb604b0bce09befc9e896c8ec8357aaa
[ "BSD-2-Clause" ]
143
2015-01-04T12:30:24.000Z
2016-09-29T18:36:22.000Z
dynd/nd/test/test_functional.py
ContinuumIO/dynd-python
bae7afb8eb604b0bce09befc9e896c8ec8357aaa
[ "BSD-2-Clause" ]
20
2015-06-08T11:54:46.000Z
2021-03-09T07:57:25.000Z
import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest from dynd import annotate, nd, ndt @unittest.skip('Test disabled since callables were reworked') class TestApply(unittest.TestCase): def test_object(self): @nd.functional.apply(jit = False) def f(x...
25.361702
70
0.588926
import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest from dynd import annotate, nd, ndt @unittest.skip('Test disabled since callables were reworked') class TestApply(unittest.TestCase): def test_object(self): @nd.functional.apply(jit = False) def f(x...
true
true
f7147bee2514ba0ec8ce68a3df5e77e31205a226
214
py
Python
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
import math def pra(n): for i in range (2,(int)(math.sqrt(n))): if (n%i==0): return False return True def izpisi(): for i in range (2,200): if (pra(i)): print(i)
19.454545
43
0.481308
import math def pra(n): for i in range (2,(int)(math.sqrt(n))): if (n%i==0): return False return True def izpisi(): for i in range (2,200): if (pra(i)): print(i)
true
true
f7147c16c55d6759428fde88ad86145632dfa7ae
5,378
py
Python
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
null
null
null
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
39
2021-10-18T17:02:49.000Z
2022-03-28T20:56:24.000Z
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
1
2021-10-21T00:11:18.000Z
2021-10-21T00:11:18.000Z
from sqlalchemy.orm import Session from datetime import datetime from fastapi import HTTPException from fastapi import status from fastapi.encoders import jsonable_encoder from literature.schemas import CrossReferenceSchema from literature.schemas import CrossReferenceSchemaUpdate from literature.models import Cross...
42.015625
170
0.697285
from sqlalchemy.orm import Session from datetime import datetime from fastapi import HTTPException from fastapi import status from fastapi.encoders import jsonable_encoder from literature.schemas import CrossReferenceSchema from literature.schemas import CrossReferenceSchemaUpdate from literature.models import Cross...
true
true
f7147c364dc2a6ceaf51a2404c99136f6f4bc427
3,123
py
Python
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
1
2020-04-11T10:37:36.000Z
2020-04-11T10:37:36.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34.7
80
0.707973
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tensorflow_graphics.nn.metric import fscore from tensorflow_graphics.nn.metric import precision from tensorflow_graphics.nn.metric i...
true
true
f7147c381b59f0fc0e28d456483711cc73e3d0d7
10,454
py
Python
stylegan2/run_training.py
arita37/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
8
2021-06-16T20:04:27.000Z
2021-12-17T18:57:37.000Z
stylegan2/run_training.py
comp-imaging-sci/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
null
null
null
stylegan2/run_training.py
comp-imaging-sci/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
2
2021-06-19T18:00:58.000Z
2021-07-14T05:08:16.000Z
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html # # Modified my Varun A. Kelkar - vak2@illinois.edu import argparse import copy import os imp...
42.323887
153
0.621772
import argparse import copy import os import sys import dnnlib from dnnlib import EasyDict from metrics.metric_defaults import metric_defaults _valid_configs = [ 'config-a', 'config-b', 'config-c', 'config-d', 'config-e', 'config-f', 'config-g', 'config-h', ...
true
true
f7147c4f2008f9ebc6684280d9bd9c43be116fb6
1,759
py
Python
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
# # VAZ Projects # # # Author: Marcelo Tellier Sartori Vaz <marcelotsvaz@gmail.com> from functools import partial import re from django.template import loader def linkAttributes( self, tokens, index, options, env ): ''' Add target and rel attributes to links. ''' tokens[index].attrSet( 'rel', 'noopener'...
22.551282
84
0.683911
from functools import partial import re from django.template import loader def linkAttributes( self, tokens, index, options, env ): tokens[index].attrSet( 'rel', 'noopener' ) return self.renderToken( tokens, index, options, env ) def imageGalleryPlugin( md, markdownImages ): md.block.ruler.before...
true
true
f7147f6d980b3546daeecc96d4d8fba4b04a0b48
14,109
py
Python
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
# -*-coding: utf-8 -*- """ @Project: create_tfrecord @File : create_tfrecord.py @Author : panjq @E-mail : pan_jinquan@163.com @Date : 2018-07-27 17:19:54 @desc : 将图片数据保存为单个tfrecord文件 """ ########################################################################## import tensorflow as tf im...
35.628788
120
0.633851
---------' % (i)) print('current image_path=%s' % (image_path),'shape:{}'.format(image.shape),'labels:{}'.format(labels)) label=labels example = tf.train.Example(features=tf.train.Features(feature={ 'image_raw': _bytes_feature(image_raw), 'height': _int64_f...
true
true
f714815478b554b66febb336cf04f3a3d3a923e6
10,162
py
Python
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
null
null
null
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
1
2021-07-08T10:26:06.000Z
2021-07-08T10:31:11.000Z
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from geographic_msgs/RouteSegment.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geographic_msgs.msg import uuid_msgs.msg class RouteSegment(genpy.M...
33.986622
145
0.605688
import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geographic_msgs.msg import uuid_msgs.msg class RouteSegment(genpy.Message): _md5sum = "8583d1e2ddf1891c3934a5d2ed9a799c" _type = "geographic_msgs/RouteSegment" _has_header = False _full_text ...
true
true
f7148181728209c0820ba3d6bb65094941aa250a
4,393
py
Python
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import argparse import importlib import os from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils ...
31.833333
153
0.619622
import argparse import importlib import os from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils import merge_with_parent from hydra.core.config_store import ConfigStore from .fairseq_task import FairseqTask, LegacyFairseqTask TASK_DATACLASS_REGISTRY = {} TASK_REGISTRY = {} TASK_CLASS_...
true
true
f71482183f909628cf759af5837725bdda0f8c43
2,686
py
Python
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
150
2015-01-21T15:52:22.000Z
2021-11-09T05:53:36.000Z
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
72
2015-05-08T04:33:08.000Z
2017-01-27T09:37:36.000Z
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
38
2015-01-30T10:33:47.000Z
2021-11-09T05:53:30.000Z
"""Test suite for phlsys_workingdircommand.""" # ============================================================================= # TEST PLAN # ----------------------------------------------------------------------------- # Here we detail the things we are concerned to test and specify wh...
34.883117
79
0.57446
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import stat import tempfile import unittest import phlsys_fs import phlsys_workingdircommand _PYCAT_COMMAND = """ #! /bin/sh echo "Hello $1!" """ .lstrip() class Test(unittest.TestC...
true
true
f7148301c9b51fcf16d83d7b786a76b3a79b2e1f
31,201
py
Python
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
3
2020-09-04T14:54:30.000Z
2022-03-24T19:09:48.000Z
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
null
null
null
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
1
2020-12-26T20:11:22.000Z
2020-12-26T20:11:22.000Z
# pylint: skip-file """ This module tests the deauth module in extensions """ import collections import unittest from collections import defaultdict import mock import scapy.layers.dot11 as dot11 import wifiphisher.common.constants as constants import wifiphisher.extensions.deauth as deauth class TestDeauth(unittest...
36.154114
101
0.639659
import collections import unittest from collections import defaultdict import mock import scapy.layers.dot11 as dot11 import wifiphisher.common.constants as constants import wifiphisher.extensions.deauth as deauth class TestDeauth(unittest.TestCase): def setUp(self): essid = dot11.Dot11Elt(ID='SSID', ...
true
true