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
f7041c9a2d72c9bd22b94e66ee3c74d5036d345c
867
py
Python
rgb_stacking/contrib/common.py
ava6969/rgb_stacking_extend
a36f1e35aa796e77201321161056e174966e7707
[ "Apache-2.0" ]
null
null
null
rgb_stacking/contrib/common.py
ava6969/rgb_stacking_extend
a36f1e35aa796e77201321161056e174966e7707
[ "Apache-2.0" ]
null
null
null
rgb_stacking/contrib/common.py
ava6969/rgb_stacking_extend
a36f1e35aa796e77201321161056e174966e7707
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch import torch.nn as nn from rgb_stacking.utils.utils import init class Flatten(nn.Module): def forward(self, x): return x.view(x.size(0), -1) class Sum(nn.Module): def __init__(self, dim): super().__init__() self.dim = dim def forward(self, x): ...
19.704545
58
0.596309
import numpy as np import torch import torch.nn as nn from rgb_stacking.utils.utils import init class Flatten(nn.Module): def forward(self, x): return x.view(x.size(0), -1) class Sum(nn.Module): def __init__(self, dim): super().__init__() self.dim = dim def forward(self, x): ...
true
true
f7041d491bfe36a21ac0fe91f27199165aa38729
1,226
py
Python
index_flask_qr/core/types23.py
lishnih/index_flask_qr
ac00346724d785d23a8991d760e831d89c746d2a
[ "MIT" ]
null
null
null
index_flask_qr/core/types23.py
lishnih/index_flask_qr
ac00346724d785d23a8991d760e831d89c746d2a
[ "MIT" ]
null
null
null
index_flask_qr/core/types23.py
lishnih/index_flask_qr
ac00346724d785d23a8991d760e831d89c746d2a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Stan 2018-08-04 import sys if sys.version_info >= (3,): class aStr(): def __str__(self): return self.__unicode__() def cmp(a, b): return (a > b) - (a < b) # range = range def b(s): return s.encode('utf-8') def u(s): ...
20.779661
67
0.584013
import sys if sys.version_info >= (3,): class aStr(): def __str__(self): return self.__unicode__() def cmp(a, b): return (a > b) - (a < b) def b(s): return s.encode('utf-8') def u(s): return s.decode('utf-8') unicode = str string_types =...
true
true
f7041d686ea10e1bb192185c43073045a408c440
552
py
Python
sum_even.py
Mr-Umidjon/even_and_odd_numbers
2ad28c671db64d474afaffc444a1e807a7b82be7
[ "MIT" ]
null
null
null
sum_even.py
Mr-Umidjon/even_and_odd_numbers
2ad28c671db64d474afaffc444a1e807a7b82be7
[ "MIT" ]
null
null
null
sum_even.py
Mr-Umidjon/even_and_odd_numbers
2ad28c671db64d474afaffc444a1e807a7b82be7
[ "MIT" ]
null
null
null
# A four-digit integer is given. Find the sum of even digits in it. # Create a variable "var_int" and assign it a four-digit integer value. # Create a variable "sum_even" and assign it 0. # Find the sum of the even digits in the variable "var_int". var_int = 1184 sum_even = 0 x1 = var_int % 10 var_int //= 10 sum_ev...
20.444444
71
0.641304
var_int = 1184 sum_even = 0 x1 = var_int % 10 var_int //= 10 sum_even += (x1 + 1) % 2 * x1 x2 = var_int % 10 var_int //= 10 sum_even += (x2 + 1) % 2 * x2 x3 = var_int % 10 var_int //= 10 sum_even += (x3 + 1) % 2 * x3 x4 = var_int % 10 var_int //= 10 sum_even += (x4 + 1) % 2 * x4 print(sum_even)
true
true
f7041dd4ace8385d6825cd0952034069e9abc390
5,354
py
Python
permafrost/forms.py
renderbox/django-permafrost
a3858d248e4ee2abac55e3663c2da68b8a52cea6
[ "MIT" ]
7
2020-06-01T21:00:45.000Z
2021-11-14T18:20:04.000Z
permafrost/forms.py
renderbox/django-permafrost
a3858d248e4ee2abac55e3663c2da68b8a52cea6
[ "MIT" ]
11
2020-11-20T21:35:41.000Z
2022-02-01T16:49:03.000Z
permafrost/forms.py
renderbox/django-permafrost
a3858d248e4ee2abac55e3663c2da68b8a52cea6
[ "MIT" ]
1
2020-11-20T21:26:00.000Z
2020-11-20T21:26:00.000Z
# Permafrost Forms from django.conf import settings from django.contrib.auth.models import Permission from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.forms import ModelForm from django.forms.fields import CharField, ChoiceField, BooleanField from django.forms....
33.672956
111
0.621965
from django.conf import settings from django.contrib.auth.models import Permission from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.forms import ModelForm from django.forms.fields import CharField, ChoiceField, BooleanField from django.forms.models import Mode...
true
true
f7041e9f4cda9730adee3c84e52ce84f4085adad
3,070
py
Python
qlib/contrib/data/highfreq_processor.py
SunsetWolf/qlib
89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5
[ "MIT" ]
1
2021-12-14T13:48:38.000Z
2021-12-14T13:48:38.000Z
qlib/contrib/data/highfreq_processor.py
SunsetWolf/qlib
89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5
[ "MIT" ]
null
null
null
qlib/contrib/data/highfreq_processor.py
SunsetWolf/qlib
89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd from qlib.data.dataset.processor import Processor from qlib.data.dataset.utils import fetch_df_by_index from typing import Dict class HighFreqTrans(Processor): def __init__(self, dtype: str = "bool"): self.dtype = dtype def fit(self, df_features): ...
37.439024
114
0.625081
import os import numpy as np import pandas as pd from qlib.data.dataset.processor import Processor from qlib.data.dataset.utils import fetch_df_by_index from typing import Dict class HighFreqTrans(Processor): def __init__(self, dtype: str = "bool"): self.dtype = dtype def fit(self, df_features): ...
true
true
f7041fa17dca2b34640f4e235828199807afd246
1,487
py
Python
network/cnn.py
hgKwak/SeriesSleepNet-
1e90c3a0ed6244c2b876979194d7cd94056f5c8a
[ "MIT" ]
null
null
null
network/cnn.py
hgKwak/SeriesSleepNet-
1e90c3a0ed6244c2b876979194d7cd94056f5c8a
[ "MIT" ]
null
null
null
network/cnn.py
hgKwak/SeriesSleepNet-
1e90c3a0ed6244c2b876979194d7cd94056f5c8a
[ "MIT" ]
null
null
null
import torch import torch.nn as nn use_cuda = torch.cuda.is_available() class CNNClassifier(nn.Module): def __init__(self, channel, SHHS=False): super(CNNClassifier, self).__init__() conv1 = nn.Conv2d(1, 10, (1, 200)) pool1 = nn.MaxPool2d((1, 2)) if channel == 1: conv2 =...
33.044444
126
0.511096
import torch import torch.nn as nn use_cuda = torch.cuda.is_available() class CNNClassifier(nn.Module): def __init__(self, channel, SHHS=False): super(CNNClassifier, self).__init__() conv1 = nn.Conv2d(1, 10, (1, 200)) pool1 = nn.MaxPool2d((1, 2)) if channel == 1: conv2 =...
true
true
f7042094ef12f628d0134a2a1e1460a0150617e1
1,017
py
Python
lessons/functions.py
Friction-Log/learning_python_frictionlog
6850c8873517254650c456ce78dfc5afd542fa4b
[ "MIT" ]
null
null
null
lessons/functions.py
Friction-Log/learning_python_frictionlog
6850c8873517254650c456ce78dfc5afd542fa4b
[ "MIT" ]
null
null
null
lessons/functions.py
Friction-Log/learning_python_frictionlog
6850c8873517254650c456ce78dfc5afd542fa4b
[ "MIT" ]
null
null
null
from math import sqrt # function with int parameter def my_function(a: str): print(a) my_function(3) # function with type annotation def my_function2(a: str) -> str: return a print(my_function2(3)) # import sqrt from math and use it print(sqrt(9.4323)) # import alias from math # from math import sqrt as square_...
17.237288
38
0.687316
from math import sqrt def my_function(a: str): print(a) my_function(3) def my_function2(a: str) -> str: return a print(my_function2(3)) print(sqrt(9.4323)) def my_function3(a: list): for i in a: print(i) my_function3([1, 2, 3, 4, 5]) def my_function4(a: dict): for key, value in a.items(): print(...
true
true
f704217e9f7c9de573130b7171c75317e1a0a859
29,216
py
Python
cv_utils/core.py
WildflowerSchools/wf-cv-utils
647a2a46e3d6e6e14a1f813d17064cb33a3ced92
[ "MIT" ]
null
null
null
cv_utils/core.py
WildflowerSchools/wf-cv-utils
647a2a46e3d6e6e14a1f813d17064cb33a3ced92
[ "MIT" ]
4
2020-01-10T01:28:39.000Z
2022-01-20T03:31:11.000Z
cv_utils/core.py
WildflowerSchools/wf-cv-utils
647a2a46e3d6e6e14a1f813d17064cb33a3ced92
[ "MIT" ]
2
2019-12-06T19:46:01.000Z
2019-12-11T22:37:43.000Z
import cv_datetime_utils import cv2 as cv import numpy as np import matplotlib.pyplot as plt import scipy.optimize import json import os def compose_transformations( rotation_vector_1, translation_vector_1, rotation_vector_2, translation_vector_2): rotation_vector_1 = np.asarray(rot...
37.217834
127
0.70013
import cv_datetime_utils import cv2 as cv import numpy as np import matplotlib.pyplot as plt import scipy.optimize import json import os def compose_transformations( rotation_vector_1, translation_vector_1, rotation_vector_2, translation_vector_2): rotation_vector_1 = np.asarray(rot...
true
true
f70422428d41dc6563266192de2998e6f21fc6af
4,188
py
Python
plugins/esni/client.py
tgragnato/geneva
2fc5b2f2f4766278902cff25af50b753d1d26a76
[ "BSD-3-Clause" ]
1,182
2019-11-15T02:56:47.000Z
2022-03-30T16:09:04.000Z
plugins/esni/client.py
Nekotekina/geneva
3eb6b7342f9afd7add1f4aba9e2aadf0b9a5f196
[ "BSD-3-Clause" ]
21
2019-11-15T15:08:02.000Z
2022-01-03T16:22:45.000Z
plugins/esni/client.py
Nekotekina/geneva
3eb6b7342f9afd7add1f4aba9e2aadf0b9a5f196
[ "BSD-3-Clause" ]
102
2019-11-15T15:01:07.000Z
2022-03-30T13:52:47.000Z
""" Client Run by the evaluator, sends a TLS Client Hello with the ESNI extension, followed by two test packets. """ import argparse import binascii as bi import os import socket import time socket.setdefaulttimeout(1) from plugins.plugin_client import ClientPlugin class ESNIClient(ClientPlugin): """ Defi...
51.073171
1,911
0.773878
import argparse import binascii as bi import os import socket import time socket.setdefaulttimeout(1) from plugins.plugin_client import ClientPlugin class ESNIClient(ClientPlugin): name = "esni" def __init__(self, args): ClientPlugin.__init__(self) self.args = args @staticmethod d...
true
true
f7042265d6e1253b3102acc3edcb9d1e660f92e1
3,860
py
Python
ichnaea/scripts/dump.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2019-05-12T05:51:19.000Z
2019-05-12T05:51:19.000Z
ichnaea/scripts/dump.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
ichnaea/scripts/dump.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
""" Dump/export our own data to a local file. Script is installed as `location_dump`. """ import argparse import os import os.path import sys from sqlalchemy import text from ichnaea.db import ( configure_db, db_worker_session, ) from ichnaea.geocalc import bbox from ichnaea.log import ( configure_loggi...
29.922481
76
0.589119
import argparse import os import os.path import sys from sqlalchemy import text from ichnaea.db import ( configure_db, db_worker_session, ) from ichnaea.geocalc import bbox from ichnaea.log import ( configure_logging, LOGGER, ) from ichnaea.models import ( BlueShard, CellShard, WifiShard,...
true
true
f704245cfebd32dde87c35a40024697c586c21ce
430
py
Python
pi/python_scripts/read_arduino.py
jonathantobi/starcore-hackomation-2017
585cca88c60b33e87b217c02c5b86aafe658321f
[ "MIT" ]
null
null
null
pi/python_scripts/read_arduino.py
jonathantobi/starcore-hackomation-2017
585cca88c60b33e87b217c02c5b86aafe658321f
[ "MIT" ]
null
null
null
pi/python_scripts/read_arduino.py
jonathantobi/starcore-hackomation-2017
585cca88c60b33e87b217c02c5b86aafe658321f
[ "MIT" ]
null
null
null
#!/usr/bin/python import serial import time ser = serial.Serial( port = '/dev/ttyACM1', baudrate = 9600, parity = serial.PARITY_NONE, stopbits = serial.STOPBITS_ONE, bytesize = serial.EIGHTBITS ) while 1: ser.flush() line = ser.readline().decode().strip() gas...
17.916667
42
0.574419
import serial import time ser = serial.Serial( port = '/dev/ttyACM1', baudrate = 9600, parity = serial.PARITY_NONE, stopbits = serial.STOPBITS_ONE, bytesize = serial.EIGHTBITS ) while 1: ser.flush() line = ser.readline().decode().strip() gas, fire = line.spl...
true
true
f70424690ab9ff0152bd6626bc23b9b94c8fdc03
12,043
py
Python
sparqlkernel/drawgraph.py
alexisdimi/sparql-kernel
7acd28810d48ef127a716f00bd76f67d59d7ba69
[ "BSD-3-Clause" ]
93
2016-09-13T21:50:30.000Z
2022-02-13T09:46:40.000Z
sparqlkernel/drawgraph.py
alexisdimi/sparql-kernel
7acd28810d48ef127a716f00bd76f67d59d7ba69
[ "BSD-3-Clause" ]
33
2017-03-30T10:12:32.000Z
2021-08-12T12:23:36.000Z
sparqlkernel/drawgraph.py
alexisdimi/sparql-kernel
7acd28810d48ef127a716f00bd76f67d59d7ba69
[ "BSD-3-Clause" ]
18
2017-02-12T17:09:08.000Z
2022-02-02T08:32:48.000Z
""" Convert an RDF graph into an image for displaying in the notebook, via GraphViz It has two parts: - conversion from rdf into dot language. Code based in rdflib.utils.rdf2dot - rendering of the dot graph into an image. Code based on ipython-hierarchymagic, which in turn bases it from Sphinx See https://...
37.990536
167
0.663456
import errno import base64 import re from io import StringIO import rdflib from .utils import escape import logging LOG = logging.getLogger(__name__) LABEL_PROPERTIES = [ rdflib.RDFS.label, rdflib.URIRef('http://schema.org/name'), rdflib.URIRef('http://www.w3.org/2000/01/rdf-schema#label'), rdfli...
true
true
f704250e86256c23937f52f4509e295bb75c89c6
15,560
py
Python
genesis/genesis.py
nneveu/lume-genesis
2df9a246dcc7752c60f3439c651e35aaf81006d3
[ "Apache-2.0" ]
null
null
null
genesis/genesis.py
nneveu/lume-genesis
2df9a246dcc7752c60f3439c651e35aaf81006d3
[ "Apache-2.0" ]
null
null
null
genesis/genesis.py
nneveu/lume-genesis
2df9a246dcc7752c60f3439c651e35aaf81006d3
[ "Apache-2.0" ]
null
null
null
""" LUME-Genesis primary class """ from genesis import archive, lattice, parsers, tools, writers import h5py import tempfile from time import time import shutil import os def find_genesis2_executable(genesis_exe=None, verbose=False): """ Searches for the genesis2 executable. """ if ge...
29.303202
131
0.507326
from genesis import archive, lattice, parsers, tools, writers import h5py import tempfile from time import time import shutil import os def find_genesis2_executable(genesis_exe=None, verbose=False): if genesis_exe: exe = tools.full_path(genesis_exe) if os.path.exists(exe): ...
true
true
f70426e7636a41481d4afd382f74991b955ea9c2
527
py
Python
tools/telemetry/telemetry/core/backends/chrome/websocket.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-04T02:36:53.000Z
2016-06-25T11:22:17.000Z
tools/telemetry/telemetry/core/backends/chrome/websocket.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/telemetry/telemetry/core/backends/chrome/websocket.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2015-02-09T08:49:30.000Z
2017-08-26T02:03:34.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import absolute_import from telemetry.core import util util.AddDirToPythonPath( util.GetTelemetryDir(), 'third_party', 'websocket-client...
40.538462
72
0.806452
from __future__ import absolute_import from telemetry.core import util util.AddDirToPythonPath( util.GetTelemetryDir(), 'third_party', 'websocket-client') from websocket import create_connection from websocket import WebSocketException from websocket import WebSocketTimeoutException
true
true
f704278c8ede91d34c07a8b24640a36ec58b289c
1,227
py
Python
tests/test_visitors/test_ast/test_keywords/test_base_exception.py
bekemaydin/wemake-python-styleguide
fad6a1d2b66012d623fe0e0bba9b5561622deeb0
[ "MIT" ]
null
null
null
tests/test_visitors/test_ast/test_keywords/test_base_exception.py
bekemaydin/wemake-python-styleguide
fad6a1d2b66012d623fe0e0bba9b5561622deeb0
[ "MIT" ]
null
null
null
tests/test_visitors/test_ast/test_keywords/test_base_exception.py
bekemaydin/wemake-python-styleguide
fad6a1d2b66012d623fe0e0bba9b5561622deeb0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongExceptionTypeVisitor, ) use_base_exception = """ try: execute() except BaseException: raise """ use_excep...
19.47619
69
0.711491
import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongExceptionTypeVisitor, ) use_base_exception = """ try: execute() except BaseException: raise """ use_except_exception = """ try: ...
true
true
f704280d77be35f7fcce108be106fa90c46c3518
26
py
Python
gnutools/utils/__init__.py
JeanMaximilienCadic/gnutools-python
c247788c988f4aa14904f63df71743b75adaa16d
[ "MIT" ]
null
null
null
gnutools/utils/__init__.py
JeanMaximilienCadic/gnutools-python
c247788c988f4aa14904f63df71743b75adaa16d
[ "MIT" ]
null
null
null
gnutools/utils/__init__.py
JeanMaximilienCadic/gnutools-python
c247788c988f4aa14904f63df71743b75adaa16d
[ "MIT" ]
null
null
null
from .functional import *
13
25
0.769231
from .functional import *
true
true
f70428bf036f48285ac70f7871aab75dca937d2d
1,035
py
Python
pomfrlFOR/examples/battle_model/algo/__init__.py
Sriram94/pomfrl
c6728f8ef6bafb0cb9e0c5007734ccb51ca341af
[ "MIT" ]
7
2021-03-24T06:14:57.000Z
2022-02-09T15:27:26.000Z
pomfrlFOR/examples/battle_model/algo/__init__.py
Sriram94/pomfrl
c6728f8ef6bafb0cb9e0c5007734ccb51ca341af
[ "MIT" ]
1
2021-11-24T16:55:08.000Z
2021-11-26T16:14:38.000Z
pomfrlFOR/examples/battle_model/algo/__init__.py
Sriram94/pomfrl
c6728f8ef6bafb0cb9e0c5007734ccb51ca341af
[ "MIT" ]
null
null
null
from . import ac from . import q_learning from . import rnnq_learning AC = ac.ActorCritic MFAC = ac.MFAC IL = q_learning.DQN MFQ = q_learning.MFQ POMFQ = q_learning.POMFQ rnnIL = rnnq_learning.DQN rnnMFQ = rnnq_learning.MFQ def spawn_ai(algo_name, sess, env, handle, human_name, max_steps): if algo_name == 'mfq': ...
35.689655
83
0.677295
from . import ac from . import q_learning from . import rnnq_learning AC = ac.ActorCritic MFAC = ac.MFAC IL = q_learning.DQN MFQ = q_learning.MFQ POMFQ = q_learning.POMFQ rnnIL = rnnq_learning.DQN rnnMFQ = rnnq_learning.MFQ def spawn_ai(algo_name, sess, env, handle, human_name, max_steps): if algo_name == 'mfq': ...
true
true
f7042a28b38dfb50a0e690fac89b4181327b724e
4,329
py
Python
src/main.py
RIZY101/ctf-nc-framework
faf088169f58514f79c0088568019b3db5a9307b
[ "MIT" ]
null
null
null
src/main.py
RIZY101/ctf-nc-framework
faf088169f58514f79c0088568019b3db5a9307b
[ "MIT" ]
null
null
null
src/main.py
RIZY101/ctf-nc-framework
faf088169f58514f79c0088568019b3db5a9307b
[ "MIT" ]
null
null
null
from lib.types import IStdin, IStdout def main(stdin: IStdin, stdout: IStdout): stdout.write('*** You are a student at PWN_University and you are all set to graduate at the end of the semester. Unfortunately the night before graduation you learned you were going to fail your last class and now you’re afraid the sc...
77.303571
513
0.639871
from lib.types import IStdin, IStdout def main(stdin: IStdin, stdout: IStdout): stdout.write('*** You are a student at PWN_University and you are all set to graduate at the end of the semester. Unfortunately the night before graduation you learned you were going to fail your last class and now you’re afraid the sc...
true
true
f7042a5860ad67696f9ad5fbfa41b846180239c3
18,293
py
Python
homeassistant/components/isy994/const.py
Wohlraj/core
feed095e5bb4be0d31991530378fe48fcafbbf9c
[ "Apache-2.0" ]
2
2021-09-13T21:44:02.000Z
2021-12-17T21:20:51.000Z
homeassistant/components/isy994/const.py
Wohlraj/core
feed095e5bb4be0d31991530378fe48fcafbbf9c
[ "Apache-2.0" ]
5
2021-02-08T20:51:16.000Z
2022-03-12T00:43:18.000Z
homeassistant/components/isy994/const.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
2
2020-11-04T07:40:01.000Z
2021-09-13T21:44:03.000Z
"""Constants for the ISY994 Platform.""" import logging from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_COLD, DEVICE_CLASS_DOOR, DEVICE_CLASS_GAS, DEVICE_CLASS_HEAT, DEVICE_CLASS_MOISTURE, DEVICE_CLASS_MOTION, DEVICE_CLASS_OPENING, DEVICE_CLAS...
28.229938
87
0.583939
import logging from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_COLD, DEVICE_CLASS_DOOR, DEVICE_CLASS_GAS, DEVICE_CLASS_HEAT, DEVICE_CLASS_MOISTURE, DEVICE_CLASS_MOTION, DEVICE_CLASS_OPENING, DEVICE_CLASS_PROBLEM, DEVICE_CLASS_SAFETY, D...
true
true
f7042aae1c5991d42b4fceb79304a0ff5d0e7579
398
py
Python
scfmsp/controlflowanalysis/instructions/InstructionJz.py
sepidehpouyan/SCF-MSP430
1d7565bf38d9f42e775031d4ea8515ff99bef778
[ "MIT" ]
1
2020-07-03T21:26:52.000Z
2020-07-03T21:26:52.000Z
scfmsp/controlflowanalysis/instructions/InstructionJz.py
sepidehpouyan/SCF-MSP430
1d7565bf38d9f42e775031d4ea8515ff99bef778
[ "MIT" ]
null
null
null
scfmsp/controlflowanalysis/instructions/InstructionJz.py
sepidehpouyan/SCF-MSP430
1d7565bf38d9f42e775031d4ea8515ff99bef778
[ "MIT" ]
null
null
null
from scfmsp.controlflowanalysis.StatusRegister import StatusRegister from scfmsp.controlflowanalysis.instructions.AbstractInstructionBranching import AbstractInstructionBranching class InstructionJz(AbstractInstructionBranching): name = 'jz' def get_execution_time(self): return 2 def get_branchi...
30.615385
109
0.806533
from scfmsp.controlflowanalysis.StatusRegister import StatusRegister from scfmsp.controlflowanalysis.instructions.AbstractInstructionBranching import AbstractInstructionBranching class InstructionJz(AbstractInstructionBranching): name = 'jz' def get_execution_time(self): return 2 def get_branchi...
true
true
f7042b01cfb71a99764931d3f29e9d6ab437938d
2,363
py
Python
data_preprocessing/tweet_api.py
teomores/kafka-twitter
778539c8f2d705c3fc75dfc8e00f9b81750b6d05
[ "Apache-2.0" ]
4
2019-09-22T22:03:41.000Z
2021-03-17T22:36:25.000Z
data_preprocessing/tweet_api.py
tmscarla/kafka-twitter
29d7c48fd1d225e33ec06be9bfed1826fa4d6b60
[ "Apache-2.0" ]
8
2020-03-24T17:31:21.000Z
2022-03-11T23:59:52.000Z
data_preprocessing/tweet_api.py
tmscarla/kafka-twitter
29d7c48fd1d225e33ec06be9bfed1826fa4d6b60
[ "Apache-2.0" ]
null
null
null
# Import the Twython class from twython import Twython import json import os import pandas as pd from tqdm import tqdm try: os.remove('twitter_dataset.csv') except OSError: pass def main(): old_df = pd.read_csv('data/twitter_dataset_2.csv', lineterminator='\n') #first load the dictonary with the top u...
32.819444
122
0.61532
from twython import Twython import json import os import pandas as pd from tqdm import tqdm try: os.remove('twitter_dataset.csv') except OSError: pass def main(): old_df = pd.read_csv('data/twitter_dataset_2.csv', lineterminator='\n') with open('improved_dict.txt') as d: word_list = d.re...
true
true
f7042c05b0bdadade8cd2ea76a032a0075ad7e9d
4,867
py
Python
pygmt/src/grdfilter.py
GenericMappingTools/gmt-python
c9c44854f0968dead5c8c8b5eaa0cb0b04907aa1
[ "BSD-3-Clause" ]
168
2017-03-27T01:13:57.000Z
2019-01-19T02:37:36.000Z
pygmt/src/grdfilter.py
GenericMappingTools/gmt-python
c9c44854f0968dead5c8c8b5eaa0cb0b04907aa1
[ "BSD-3-Clause" ]
167
2017-07-01T02:26:19.000Z
2019-01-22T18:39:13.000Z
pygmt/src/grdfilter.py
GenericMappingTools/gmt-python
c9c44854f0968dead5c8c8b5eaa0cb0b04907aa1
[ "BSD-3-Clause" ]
51
2017-06-08T17:39:09.000Z
2019-01-16T17:33:11.000Z
""" grdfilter - Filter a grid in the space (or time) domain. """ from pygmt.clib import Session from pygmt.helpers import ( GMTTempFile, build_arg_string, fmt_docstring, kwargs_to_strings, use_alias, ) from pygmt.io import load_dataarray @fmt_docstring @use_alias( D="distance", F="filter"...
31.810458
85
0.614547
from pygmt.clib import Session from pygmt.helpers import ( GMTTempFile, build_arg_string, fmt_docstring, kwargs_to_strings, use_alias, ) from pygmt.io import load_dataarray @fmt_docstring @use_alias( D="distance", F="filter", G="outgrid", I="spacing", N="nans", R="region",...
true
true
f7042c2ecf2c1579ad078c46d2e6471a39efed06
4,251
py
Python
shingetsu/rss.py
acemomiage/saku
66ab704106d368f7c916f9ba71b28fe9bef62c48
[ "BSD-2-Clause" ]
78
2015-01-09T10:49:10.000Z
2022-02-16T03:06:28.000Z
shingetsu/rss.py
acemomiage/saku
66ab704106d368f7c916f9ba71b28fe9bef62c48
[ "BSD-2-Clause" ]
5
2015-01-11T16:24:33.000Z
2019-02-18T15:02:32.000Z
shingetsu/rss.py
acemomiage/saku
66ab704106d368f7c916f9ba71b28fe9bef62c48
[ "BSD-2-Clause" ]
24
2015-01-07T08:29:47.000Z
2022-03-23T07:22:20.000Z
"""Data structure of RSS and useful functions. """ # # Copyright (c) 2005-2020 shinGETsu Project. # All rights reserved. # # 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 ...
30.148936
76
0.567866
import html import re import cgi from .template import Template class Item: title = "" link = "" description = "" date = 0 def __init__(self, link="", title="", date=0, creator='', subject=None, description="", content=""): del_eos...
true
true
f7042cc11b1d56e506098d13c8d748a89e62133e
10,272
py
Python
GPy/kern/src/static.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
9
2019-06-16T01:18:52.000Z
2021-11-03T15:43:55.000Z
GPy/kern/src/static.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
3
2020-09-09T06:12:51.000Z
2021-06-01T23:46:18.000Z
GPy/kern/src/static.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
5
2019-07-07T13:17:44.000Z
2020-09-09T06:06:17.000Z
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from .kern import Kern import numpy as np from ...core.parameterization import Param from paramz.transformations import Logexp from paramz.caching import Cache_this class Static(Kern): def __init__(se...
38.328358
163
0.639408
from .kern import Kern import numpy as np from ...core.parameterization import Param from paramz.transformations import Logexp from paramz.caching import Cache_this class Static(Kern): def __init__(self, input_dim, variance, active_dims, name): super(Static, self).__init__(input_dim, active_dims, name)...
true
true
f7042de1f100aeb375f867dcd8fb140922a67444
640
py
Python
setup.py
thanakritju/python-slack-events-sdk
67bdb55e07fd5c76845bad37ea88e506d42f1b2c
[ "MIT" ]
null
null
null
setup.py
thanakritju/python-slack-events-sdk
67bdb55e07fd5c76845bad37ea88e506d42f1b2c
[ "MIT" ]
null
null
null
setup.py
thanakritju/python-slack-events-sdk
67bdb55e07fd5c76845bad37ea88e506d42f1b2c
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="slacksdk", version="0.0.1a", author="Thanakrit Juthamongkhon", author_email="thanakrit.ju.work@gmail.com", description="A minimal slack sdk", long_description=long_description, lon...
30.47619
65
0.675
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="slacksdk", version="0.0.1a", author="Thanakrit Juthamongkhon", author_email="thanakrit.ju.work@gmail.com", description="A minimal slack sdk", long_description=long_description, lon...
true
true
f7042e073beb294e8fce962829b920896e385e2e
5,559
py
Python
inside/pipelines/clevr.py
jacenkow/inside
8b277e2744233a23eb8f55a29417135729fc531d
[ "Apache-2.0" ]
6
2020-08-26T13:15:15.000Z
2021-08-02T22:07:49.000Z
inside/pipelines/clevr.py
SLEEP-CO/inside
6f860420644b50b78981158a59ceed8cdbd209bf
[ "Apache-2.0" ]
13
2020-09-25T22:26:45.000Z
2022-03-12T00:47:04.000Z
inside/pipelines/clevr.py
SLEEP-CO/inside
6f860420644b50b78981158a59ceed8cdbd209bf
[ "Apache-2.0" ]
2
2020-10-07T17:11:57.000Z
2021-05-22T13:20:14.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2020 Grzegorz Jacenków. # # 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...
34.314815
79
0.572585
import csv import os import tensorflow as tf from tensorflow.keras.metrics import Mean from inside import config from inside.callbacks import setup_callbacks from inside.constructor import setup_comet_ml, setup_model from inside.loaders import CLEVR from inside.metrics import DiceScore def _write_res...
true
true
f7042e33a6e4a8e11c00eba052a8af8e91c9a9a7
4,115
py
Python
dataset/generate_tip4p_data.py
BaratiLab/GAMD
7de91526f1c8c06ea005920e6a55c3cf031c26b2
[ "MIT" ]
null
null
null
dataset/generate_tip4p_data.py
BaratiLab/GAMD
7de91526f1c8c06ea005920e6a55c3cf031c26b2
[ "MIT" ]
null
null
null
dataset/generate_tip4p_data.py
BaratiLab/GAMD
7de91526f1c8c06ea005920e6a55c3cf031c26b2
[ "MIT" ]
1
2022-03-17T19:39:18.000Z
2022-03-17T19:39:18.000Z
from openmmtools import testsystems from simtk.openmm.app import * import simtk.unit as unit import logging import numpy as np from openmmtools.constants import kB from openmmtools import respa, utils logger = logging.getLogger(__name__) # Energy unit used by OpenMM unit system from openmmtools import states, inte...
36.741071
121
0.600243
from openmmtools import testsystems from simtk.openmm.app import * import simtk.unit as unit import logging import numpy as np from openmmtools.constants import kB from openmmtools import respa, utils logger = logging.getLogger(__name__) from openmmtools import states, integrators import time import numpy as np i...
true
true
f7042e390a07e1c0d3c7ad4c593ca6540931ac90
966
py
Python
hashing.py
bernardosulzbach/scripts
9c91d9688873d5a41fdc4ff54688f5b042866867
[ "BSD-2-Clause" ]
null
null
null
hashing.py
bernardosulzbach/scripts
9c91d9688873d5a41fdc4ff54688f5b042866867
[ "BSD-2-Clause" ]
5
2015-12-29T14:35:42.000Z
2016-02-06T04:55:48.000Z
hashing.py
mafagafogigante/scripts
9c91d9688873d5a41fdc4ff54688f5b042866867
[ "BSD-2-Clause" ]
null
null
null
import os import hashlib def _update_sha256(filename, sha256): """ Updates a SHA-256 algorithm with the filename and the contents of a file. """ block_size = 64 * 1024 # 64 KB with open(filename, 'rb') as input_file: while True: data = input_file.read(block_size) i...
28.411765
119
0.643892
import os import hashlib def _update_sha256(filename, sha256): block_size = 64 * 1024 with open(filename, 'rb') as input_file: while True: data = input_file.read(block_size) if not data: break sha256.update(data) sha256.update(filename.encode("...
true
true
f7042e6c3b8b3bbe394ec0ff65053648fc05d117
1,139
py
Python
core/functions/__init__.py
annapoulakos/advent-of-code
95bf7eb282045194af46f482c3ab847c91f62c44
[ "MIT" ]
3
2020-12-03T19:56:50.000Z
2021-11-19T00:20:04.000Z
core/functions/__init__.py
annapoulakos/advent-of-code
95bf7eb282045194af46f482c3ab847c91f62c44
[ "MIT" ]
null
null
null
core/functions/__init__.py
annapoulakos/advent-of-code
95bf7eb282045194af46f482c3ab847c91f62c44
[ "MIT" ]
null
null
null
def destructure(obj, *params): import operator return operator.itemgetter(*params)(obj) def greet(**kwargs): year, day, puzzle = destructure(kwargs, 'year', 'day', 'puzzle') print('Advent of Code') print(f'-> {year}-{day}-{puzzle}') print('--------------') def load_data(filename): with fil...
27.119048
77
0.568042
def destructure(obj, *params): import operator return operator.itemgetter(*params)(obj) def greet(**kwargs): year, day, puzzle = destructure(kwargs, 'year', 'day', 'puzzle') print('Advent of Code') print(f'-> {year}-{day}-{puzzle}') print('--------------') def load_data(filename): with fil...
true
true
f7042f27a52d9b6035ccb6bdd9f2e40115fbae3f
3,170
py
Python
stix/common/information_source.py
santosomar/python-stix
cf0ea6861d9fd4dec6003d948b6901cada954c4d
[ "BSD-3-Clause" ]
4
2019-02-25T18:18:16.000Z
2020-12-19T06:23:28.000Z
stix/common/information_source.py
santosomar/python-stix
cf0ea6861d9fd4dec6003d948b6901cada954c4d
[ "BSD-3-Clause" ]
null
null
null
stix/common/information_source.py
santosomar/python-stix
cf0ea6861d9fd4dec6003d948b6901cada954c4d
[ "BSD-3-Clause" ]
1
2019-02-25T18:18:18.000Z
2019-02-25T18:18:18.000Z
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. # external from mixbox import fields import cybox.common from cybox.common.tools import ToolInformationList # internal import stix import stix.bindings.stix_common as stix_common_binding # relative from .vocabs im...
32.346939
128
0.712303
from mixbox import fields import cybox.common from cybox.common.tools import ToolInformationList import stix import stix.bindings.stix_common as stix_common_binding from .vocabs import VocabField from .references import References from .identity import Identity, IdentityFactory from .structured_text import Stru...
true
true
f7042f70611897f37c769bc82c9c072a8a0174f4
16,025
py
Python
django/utils/datastructures.py
graingert/django
784d0c261c76535dc760bc8d76793d92f35c1513
[ "BSD-3-Clause" ]
1
2015-11-11T12:20:45.000Z
2015-11-11T12:20:45.000Z
django/utils/datastructures.py
graingert/django
784d0c261c76535dc760bc8d76793d92f35c1513
[ "BSD-3-Clause" ]
null
null
null
django/utils/datastructures.py
graingert/django
784d0c261c76535dc760bc8d76793d92f35c1513
[ "BSD-3-Clause" ]
null
null
null
import copy from types import GeneratorType class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given dictionaries, only the first occurrenc...
31.237817
131
0.566365
import copy from types import GeneratorType class MergeDict(object): def __init__(self, *dicts): self.dicts = dicts def __getitem__(self, key): for dict_ in self.dicts: try: return dict_[key] except KeyError: pass raise KeyError ...
true
true
f7042fc40e681680f30a61dd7dd41d217592fd03
5,291
py
Python
src/basic1.py
harika-24/Image-Processing-and-Machine-Learning-using-Parallel-Computing
b13b8f20551a9d5960b146713182b167e35d65e7
[ "MIT" ]
null
null
null
src/basic1.py
harika-24/Image-Processing-and-Machine-Learning-using-Parallel-Computing
b13b8f20551a9d5960b146713182b167e35d65e7
[ "MIT" ]
null
null
null
src/basic1.py
harika-24/Image-Processing-and-Machine-Learning-using-Parallel-Computing
b13b8f20551a9d5960b146713182b167e35d65e7
[ "MIT" ]
null
null
null
import os import sys import dlib import glob import csv import pickle as pp from sklearn.neighbors import KNeighborsClassifier import pandas as pd from sklearn import preprocessing # from sklearn.model_selection import train_test_split import webbrowser from timeit import Timer from keras.preprocessing.image import img...
31.682635
122
0.558307
import os import sys import dlib import glob import csv import pickle as pp from sklearn.neighbors import KNeighborsClassifier import pandas as pd from sklearn import preprocessing import webbrowser from timeit import Timer from keras.preprocessing.image import img_to_array from keras.models import load_model import n...
true
true
f7042fdc0b2e66c421515786c31e873a156f7422
262
py
Python
dyn2sel/dcs_techniques/desdd_selection.py
luccaportes/Scikit-DYN2SEL
3e102f4fff5696277c57997fb811139c5e6f8b4d
[ "MIT" ]
1
2021-08-21T21:21:29.000Z
2021-08-21T21:21:29.000Z
dyn2sel/dcs_techniques/desdd_selection.py
luccaportes/Scikit-DYN2SEL
3e102f4fff5696277c57997fb811139c5e6f8b4d
[ "MIT" ]
10
2020-10-27T13:37:36.000Z
2021-09-11T02:40:51.000Z
dyn2sel/dcs_techniques/desdd_selection.py
luccaportes/Scikit-DYN2SEL
3e102f4fff5696277c57997fb811139c5e6f8b4d
[ "MIT" ]
1
2021-11-24T07:20:42.000Z
2021-11-24T07:20:42.000Z
from dyn2sel.dcs_techniques import DCSTechnique import numpy as np from scipy.stats import mode class DESDDSel(DCSTechnique): def predict(self, ensemble, instances, real_labels=None): return ensemble[ensemble.get_max_accuracy()].predict(instances)
29.111111
71
0.790076
from dyn2sel.dcs_techniques import DCSTechnique import numpy as np from scipy.stats import mode class DESDDSel(DCSTechnique): def predict(self, ensemble, instances, real_labels=None): return ensemble[ensemble.get_max_accuracy()].predict(instances)
true
true
f7042fe61841ae00fa3573f79327e8f2bc2dcb99
1,421
py
Python
tests/tests/test_vm_coexist.py
jurobystricky/tdx-tools
c4eedb04a784fdfff724453499045ea6e369a818
[ "Apache-2.0" ]
11
2021-12-21T01:32:59.000Z
2022-03-30T14:37:45.000Z
tests/tests/test_vm_coexist.py
jurobystricky/tdx-tools
c4eedb04a784fdfff724453499045ea6e369a818
[ "Apache-2.0" ]
15
2022-01-12T00:40:59.000Z
2022-03-31T17:03:42.000Z
tests/tests/test_vm_coexist.py
jurobystricky/tdx-tools
c4eedb04a784fdfff724453499045ea6e369a818
[ "Apache-2.0" ]
7
2021-12-20T11:45:46.000Z
2022-03-15T06:22:52.000Z
""" This module provide the case to test the coexistance between TDX guest and non TD guest. There are two types of non-TD guest: 1. Boot with legacy BIOS, it is default loader without pass "-loader" or "-bios" option 2. Boot with OVMF UEFI BIOS, will boot with "-loader" => OVMFD.fd compiled from the late...
29
82
0.695285
import logging import pytest from pycloudstack.vmparam import VM_TYPE_LEGACY, VM_TYPE_EFI, VM_TYPE_TD __author__ = 'cpio' LOG = logging.getLogger(__name__) pytestmark = [ pytest.mark.vm_image("latest-guest-image"), pytest.mark.vm_kernel("latest-guest-kernel"), ] def test_tdguest_with_leg...
true
true
f70430b6d3a2a0dae8784dc1baf8f2c60b7a5d8d
2,002
py
Python
pre_commit_hooks/loaderon_hooks/tests/general_hooks/check_location_test.py
alvaroscelza/pre-commit-hooks
fc9a7a376dc733a1e3cc00b5ed35936bcb3c3b3b
[ "MIT" ]
null
null
null
pre_commit_hooks/loaderon_hooks/tests/general_hooks/check_location_test.py
alvaroscelza/pre-commit-hooks
fc9a7a376dc733a1e3cc00b5ed35936bcb3c3b3b
[ "MIT" ]
null
null
null
pre_commit_hooks/loaderon_hooks/tests/general_hooks/check_location_test.py
alvaroscelza/pre-commit-hooks
fc9a7a376dc733a1e3cc00b5ed35936bcb3c3b3b
[ "MIT" ]
null
null
null
import sys import pytest from pre_commit_hooks.loaderon_hooks.tests.util.test_helpers import perform_test_on_file_expecting_result from pre_commit_hooks.loaderon_hooks.general_hooks.check_location import main @pytest.fixture(autouse=True) def clean_sys_argv(): sys.argv = [] # Each line is a directory that ...
31.777778
132
0.758741
import sys import pytest from pre_commit_hooks.loaderon_hooks.tests.util.test_helpers import perform_test_on_file_expecting_result from pre_commit_hooks.loaderon_hooks.general_hooks.check_location import main @pytest.fixture(autouse=True) def clean_sys_argv(): sys.argv = [] sys.argv.append('--director...
true
true
f704311c1696242df8f2316227f5b99a2b3d08b4
506
py
Python
Week1/Lecture2/Fexes/l2f1.py
MorbidValkyria/MIT6.0001x
3c80ffd50871387f560c2e820ad1fa05c61d9132
[ "MIT" ]
null
null
null
Week1/Lecture2/Fexes/l2f1.py
MorbidValkyria/MIT6.0001x
3c80ffd50871387f560c2e820ad1fa05c61d9132
[ "MIT" ]
null
null
null
Week1/Lecture2/Fexes/l2f1.py
MorbidValkyria/MIT6.0001x
3c80ffd50871387f560c2e820ad1fa05c61d9132
[ "MIT" ]
null
null
null
""" 1) "a" + "bc" -> abc 2) 3 * "bc" -> bcbcbc 3) "3" * "bc" -> error as we can't use the * operator on two strings 4) abcd"[2] -> c (Just takes the character at index 2 in the string. a has index 0 and b index 1) 5) "abcd"[0:2] -> ab (Returns the substring from index 0 all the way to index n -1 in this case b) 6)...
31.625
98
0.626482
true
true
f7043401959412943bac256ec0284c88028ab154
4,508
py
Python
configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py
wangna11BD/mmediting
25410895914edc5938f526fc41b1776a36ac1b51
[ "Apache-2.0" ]
1
2021-04-20T02:24:02.000Z
2021-04-20T02:24:02.000Z
configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py
wangna11BD/mmediting
25410895914edc5938f526fc41b1776a36ac1b51
[ "Apache-2.0" ]
null
null
null
configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py
wangna11BD/mmediting
25410895914edc5938f526fc41b1776a36ac1b51
[ "Apache-2.0" ]
null
null
null
exp_name = 'basicvsr_vimeo90k_bd' # model settings model = dict( type='BasicVSR', generator=dict( type='BasicVSRNet', mid_channels=64, num_blocks=30, spynet_pretrained='pretrained_models/spynet.pth'), pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')...
28.713376
79
0.618234
exp_name = 'basicvsr_vimeo90k_bd' model = dict( type='BasicVSR', generator=dict( type='BasicVSRNet', mid_channels=64, num_blocks=30, spynet_pretrained='pretrained_models/spynet.pth'), pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) train_cfg = d...
true
true
f704346d161ef25a72528a244f15f8a8a9895a9f
1,531
py
Python
setup.py
dbradf/evgflip
5e7408d817ee1cb7823dd299b50d5959126756d4
[ "Apache-2.0" ]
null
null
null
setup.py
dbradf/evgflip
5e7408d817ee1cb7823dd299b50d5959126756d4
[ "Apache-2.0" ]
null
null
null
setup.py
dbradf/evgflip
5e7408d817ee1cb7823dd299b50d5959126756d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from glob import glob from os.path import basename from os.path import splitext from setuptools import find_packages from setuptools import setup with open("README.md", "r") as fh: long_d...
28.351852
74
0.636185
from __future__ import absolute_import from __future__ import print_function from glob import glob from os.path import basename from os.path import splitext from setuptools import find_packages from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='evgfl...
true
true
f704356f4fb720f2bf93b959c1a2be1943a0b37d
2,002
py
Python
examples/devel/importing.py
markdoerr/pymol-open-source
b891b59ffaea812600648aa131ea2dbecd59a199
[ "CNRI-Python" ]
2
2019-05-23T22:17:29.000Z
2020-07-03T14:36:22.000Z
examples/devel/importing.py
markdoerr/pymol-open-source
b891b59ffaea812600648aa131ea2dbecd59a199
[ "CNRI-Python" ]
null
null
null
examples/devel/importing.py
markdoerr/pymol-open-source
b891b59ffaea812600648aa131ea2dbecd59a199
[ "CNRI-Python" ]
null
null
null
# This is an example of firing up PyMOL inside of a subordinate # process via an "import pymol" # # NOTE: for this to work, PyMOL must be installed in a # Python-dependent fashion (e.g. pymol-0_98-bin-win32-py23) etc. # # WARNING: stability issues have been known to occur with this # approach, so anticipate problems.....
24.414634
77
0.67982
import string import __main__ __main__.pymol_argv= string.split("pymol -qxiF -X 300 -Y 100 -H 400 -W 400") import pymol import time time.sleep(1) if 1: pymol.cmd.set("sweep_mode",3) pymol.cmd.rock() pymol.cmd.turn("x",180) pymol.cmd.load("$TUT/1hpv.pdb") pymol.preset.pretty("1...
true
true
f70435e6588b6eff0658bd07e3715657ae154bef
387
py
Python
algorithms/recursion/sum_of_sequence.py
zhijunsheng/tictactoe-py
648bed3bbf56d441805d472c73b7951b73469f20
[ "MIT" ]
null
null
null
algorithms/recursion/sum_of_sequence.py
zhijunsheng/tictactoe-py
648bed3bbf56d441805d472c73b7951b73469f20
[ "MIT" ]
null
null
null
algorithms/recursion/sum_of_sequence.py
zhijunsheng/tictactoe-py
648bed3bbf56d441805d472c73b7951b73469f20
[ "MIT" ]
null
null
null
import unittest def linear_sum(S, n): """Return the sum of the first n numbers of sequence S.""" if n == 0: return 0 else: return linear_sum(S, n - 1) + S[n - 1] class TestLinearSum(unittest.TestCase): def test_linear_sum(self): S = [4, 3, 6, 2, 8] self.assertEqual(23,...
21.5
62
0.589147
import unittest def linear_sum(S, n): if n == 0: return 0 else: return linear_sum(S, n - 1) + S[n - 1] class TestLinearSum(unittest.TestCase): def test_linear_sum(self): S = [4, 3, 6, 2, 8] self.assertEqual(23, linear_sum(S, 5)) if __name__ == '__main__': unittest.mai...
true
true
f704376b4a39e532d7296da675a5c7c10f97297a
593
py
Python
polls/urls.py
FrankCasanova/poll-django
4df8889d2802cd211a993d5de43f663cd6ef9a30
[ "MIT" ]
null
null
null
polls/urls.py
FrankCasanova/poll-django
4df8889d2802cd211a993d5de43f663cd6ef9a30
[ "MIT" ]
null
null
null
polls/urls.py
FrankCasanova/poll-django
4df8889d2802cd211a993d5de43f663cd6ef9a30
[ "MIT" ]
null
null
null
from django.urls import path from . import views #here are our app-connections.(these connection just affect to our app, not at entire system) #each connection going us to a view functionality #these connections needs to be connect with url root, because that's where the requests come from app_name = 'polls' urlpat...
34.882353
97
0.70489
from django.urls import path from . import views app_name = 'polls' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<int:pk>/', views.DetailView.as_view(), name='detail'), path('<int:pk>/result/', views.ResultView.as_view(), name='result'), path('<int:question_id>/vote/',...
true
true
f70438d8f78b8f084550f654f4578c7326e7838c
2,120
py
Python
classes/menu.py
howard-2718/untitled_rpg
49654afbfb548676df5d72d35e47b9e06eefa7a7
[ "MIT" ]
null
null
null
classes/menu.py
howard-2718/untitled_rpg
49654afbfb548676df5d72d35e47b9e06eefa7a7
[ "MIT" ]
null
null
null
classes/menu.py
howard-2718/untitled_rpg
49654afbfb548676df5d72d35e47b9e06eefa7a7
[ "MIT" ]
null
null
null
""" Menu handling file - Every menu is of the Menu class - Menus are initialized with an array of options - What a menu option does is determined by the following table: - "set_state_map": s.set_state('map') - "exit": exit() """ from config import * import sys class Menu: def __init__(self, options, sel_inde...
26.17284
71
0.556132
from config import * import sys class Menu: def __init__(self, options, sel_index, results): self.options = options self.results = results self._sel_index = sel_index self.first_print = True @property def sel_index(self): return self._sel_index @sel_inde...
true
true
f70439ea5e1c811be29ccac4a2c1991c2f496ec6
128,492
py
Python
third_party/ply/ply/yacc.py
albertobarri/idk
a250884f79e2a484251fc750bb915ecbc962be58
[ "MIT" ]
9,724
2015-01-01T02:06:30.000Z
2019-01-17T15:13:51.000Z
third_party/ply/yacc.py
1065672644894730302/Chromium
239dd49e906be4909e293d8991e998c9816eaa35
[ "BSD-3-Clause" ]
7,584
2019-01-17T22:58:27.000Z
2022-03-31T23:10:22.000Z
third_party/ply/yacc.py
1065672644894730302/Chromium
239dd49e906be4909e293d8991e998c9816eaa35
[ "BSD-3-Clause" ]
1,519
2015-01-01T18:11:12.000Z
2019-01-17T14:16:02.000Z
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
39.210253
176
0.470948
# Spark and the GNU bison utility. # # The current implementation is only somewhat object-oriented. The # LR parser itself is defined in terms of an object (which allows multiple # parsers to co-exist). However, most of the variables used during table # construction are defined in ...
true
true
f7043a393c4a30b5d5056296579c11f81244b7d0
150
py
Python
common/enums/game_scenes.py
nikolastojsin/donkey-kong-drs-projekat
f7f837a7195aa731badb25d280c06317e9ada7d1
[ "MIT" ]
null
null
null
common/enums/game_scenes.py
nikolastojsin/donkey-kong-drs-projekat
f7f837a7195aa731badb25d280c06317e9ada7d1
[ "MIT" ]
null
null
null
common/enums/game_scenes.py
nikolastojsin/donkey-kong-drs-projekat
f7f837a7195aa731badb25d280c06317e9ada7d1
[ "MIT" ]
null
null
null
from enum import Enum class GameScenes(Enum): FIRST_LEVEL = 1 SECOND_LEVEL = 2 THIRD_LEVEL = 3 FOURTH_LEVEL = 4 FIFTH_LEVEL = 5
15
23
0.66
from enum import Enum class GameScenes(Enum): FIRST_LEVEL = 1 SECOND_LEVEL = 2 THIRD_LEVEL = 3 FOURTH_LEVEL = 4 FIFTH_LEVEL = 5
true
true
f7043a4617de8a54b3d6ff2a89444c0826f42479
94
py
Python
web/apps/login/app.py
JW709/zoom
3b26a22e569bf44a9856b587771589413b52e81b
[ "MIT" ]
1
2017-05-11T17:24:49.000Z
2017-05-11T17:24:49.000Z
web/apps/login/app.py
sean-hayes/zoom
eda69c64ceb69dd87d2f7a5dfdaeea52ef65c581
[ "MIT" ]
null
null
null
web/apps/login/app.py
sean-hayes/zoom
eda69c64ceb69dd87d2f7a5dfdaeea52ef65c581
[ "MIT" ]
1
2020-07-20T00:33:27.000Z
2020-07-20T00:33:27.000Z
""" login app """ from zoom.apps import App class MyApp(App): pass app = MyApp()
7.230769
25
0.574468
from zoom.apps import App class MyApp(App): pass app = MyApp()
true
true
f7043a58b466f3f8e7c9d564fe527c55e1f9d6fe
825
py
Python
cohere-scripts/beamlines/aps_34idc/diffractometers.py
jacione/cohere-scripts
6bb111035660a57e18da5d86ad9dbf0f1d50c657
[ "BSD-3-Clause" ]
null
null
null
cohere-scripts/beamlines/aps_34idc/diffractometers.py
jacione/cohere-scripts
6bb111035660a57e18da5d86ad9dbf0f1d50c657
[ "BSD-3-Clause" ]
null
null
null
cohere-scripts/beamlines/aps_34idc/diffractometers.py
jacione/cohere-scripts
6bb111035660a57e18da5d86ad9dbf0f1d50c657
[ "BSD-3-Clause" ]
null
null
null
from cohere import Diffractometer class Diffractometer_34idc(Diffractometer): """ Subclass of Diffractometer. Encapsulates "34idc" diffractometer. """ name = "34idc" sampleaxes = ('y+', 'z-', 'y+') # in xrayutilities notation detectoraxes = ('y+', 'x-') incidentaxis = (0, 0, 1) sample...
25
83
0.637576
from cohere import Diffractometer class Diffractometer_34idc(Diffractometer): name = "34idc" sampleaxes = ('y+', 'z-', 'y+') detectoraxes = ('y+', 'x-') incidentaxis = (0, 0, 1) sampleaxes_name = ('th', 'chi', 'phi') detectoraxes_name = ('delta', 'gamma') def __init__(self): s...
true
true
f7043af4f416dadb6f4555672f0616879e32a468
1,479
py
Python
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CheckDomainSunriseClaimRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CheckDomainSunriseClaimRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CheckDomainSunriseClaimRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.214286
79
0.765382
from aliyunsdkcore.request import RpcRequest class CheckDomainSunriseClaimRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Domain', '2018-01-29', 'CheckDomainSunriseClaim') def get_DomainName(self): return self.get_query_params().get('DomainName') def set_DomainName(...
true
true
f7043b12ee54ca5fb24b861efb48efdd876d80e1
1,484
py
Python
Boilermake2018/Lib/site-packages/chatterbot/preprocessors.py
TejPatel98/voice_your_professional_email
9cc48f7bcd6576a6962711755e5d5d485832128c
[ "CC0-1.0" ]
9
2021-08-08T22:42:55.000Z
2021-11-23T06:50:30.000Z
Boilermake2018/Lib/site-packages/chatterbot/preprocessors.py
TejPatel98/voice_your_professional_email
9cc48f7bcd6576a6962711755e5d5d485832128c
[ "CC0-1.0" ]
2
2017-12-06T07:40:08.000Z
2017-12-06T07:42:43.000Z
Boilermake2018/Lib/site-packages/chatterbot/preprocessors.py
TejPatel98/voice_your_professional_email
9cc48f7bcd6576a6962711755e5d5d485832128c
[ "CC0-1.0" ]
7
2018-01-04T10:02:11.000Z
2019-06-18T14:24:04.000Z
# -*- coding: utf-8 -*- """ Statement pre-processors. """ def clean_whitespace(chatbot, statement): """ Remove any consecutive whitespace characters from the statement text. """ import re # Replace linebreaks and tabs with spaces statement.text = statement.text.replace('\n', ' ').replace('\r'...
24.327869
92
0.654987
def clean_whitespace(chatbot, statement): import re statement.text = statement.text.replace('\n', ' ').replace('\r', ' ').replace('\t', ' ') statement.text = statement.text.strip() statement.text = re.sub(' +', ' ', statement.text) return statement def unescape_html(chatbot, ...
true
true
f7043b3ecfc447c28853664acd21eddc6920523e
5,304
py
Python
NREL/custom/packages/nalu-wind/package.py
jfinney10/spack-configs
c230ade92794901eb3563dfc9a0e1ec370b6a27a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
36
2018-07-31T20:35:13.000Z
2022-03-27T16:48:17.000Z
NREL/custom/packages/nalu-wind/package.py
jfinney10/spack-configs
c230ade92794901eb3563dfc9a0e1ec370b6a27a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2018-08-08T16:25:34.000Z
2022-03-11T20:54:27.000Z
NREL/custom/packages/nalu-wind/package.py
jfinney10/spack-configs
c230ade92794901eb3563dfc9a0e1ec370b6a27a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2018-07-31T20:47:10.000Z
2021-12-17T21:21:59.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import sys class NaluWind(CMakePackage): """Nalu-Wind: Wind energy focused variant of Nalu.""" ...
37.352113
178
0.601621
from spack import * import sys class NaluWind(CMakePackage): homepage = "https://github.com/exawind/nalu-wind" git = "https://github.com/exawind/nalu-wind.git" maintainers = ['jrood-nrel'] tags = ['ecp', 'ecp-apps'] version('master', branch='master') variant('shared', defau...
true
true
f7043bacf01e5c86f3a51de97e89c88870e9d8c2
202
py
Python
Kattis/ostgotska.py
ruidazeng/online-judge
6bdf8bbf1af885637dab474d0ccb58aff22a0933
[ "MIT" ]
null
null
null
Kattis/ostgotska.py
ruidazeng/online-judge
6bdf8bbf1af885637dab474d0ccb58aff22a0933
[ "MIT" ]
null
null
null
Kattis/ostgotska.py
ruidazeng/online-judge
6bdf8bbf1af885637dab474d0ccb58aff22a0933
[ "MIT" ]
1
2020-06-22T21:07:24.000Z
2020-06-22T21:07:24.000Z
sentence = input().split() ae = 0 for word in sentence: if 'ae' in word: ae += 1 if ae/len(sentence) >= 0.4: print("dae ae ju traeligt va") else: print("haer talar vi rikssvenska")
18.363636
38
0.59901
sentence = input().split() ae = 0 for word in sentence: if 'ae' in word: ae += 1 if ae/len(sentence) >= 0.4: print("dae ae ju traeligt va") else: print("haer talar vi rikssvenska")
true
true
f7043cb19891a8f93b1476ce2dcbdead32e526d8
117,170
py
Python
env/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
168
2015-05-29T13:56:01.000Z
2022-02-17T07:38:17.000Z
env/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
3,243
2017-02-07T15:30:01.000Z
2022-03-31T16:42:19.000Z
env/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import with_metaclass, viewkeys, PY3 import types try: from collections import OrderedDict except ImportError: from pip._vendor.ordereddict import OrderedDict from . import _inputstream from . import _tokenizer from . im...
42.85662
116
0.547546
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import with_metaclass, viewkeys, PY3 import types try: from collections import OrderedDict except ImportError: from pip._vendor.ordereddict import OrderedDict from . import _inputstream from . import _tokenizer from . im...
true
true
f7043ccf5a72a6b1cf26416838a2233e35f68a0c
732
py
Python
doc/_ext/rst_roles.py
CarsonSlovoka/image-rename
6ff64647aa893ee5c23bfd7e8cc452a7a7d32f29
[ "BSD-3-Clause" ]
2
2020-07-03T12:56:17.000Z
2021-07-07T16:56:12.000Z
doc/_ext/rst_roles.py
CarsonSlovoka/image-rename
6ff64647aa893ee5c23bfd7e8cc452a7a7d32f29
[ "BSD-3-Clause" ]
null
null
null
doc/_ext/rst_roles.py
CarsonSlovoka/image-rename
6ff64647aa893ee5c23bfd7e8cc452a7a7d32f29
[ "BSD-3-Clause" ]
null
null
null
from docutils.parsers.rst import roles from docutils import nodes from docutils.parsers.rst.states import Inliner import docutils.parsers.rst.roles def strike_role(role, rawtext, text, lineno, inliner: Inliner, options={}, content=[]): """ USAGE: :del:`your context` :param role: my-strike :param raw...
24.4
87
0.670765
from docutils.parsers.rst import roles from docutils import nodes from docutils.parsers.rst.states import Inliner import docutils.parsers.rst.roles def strike_role(role, rawtext, text, lineno, inliner: Inliner, options={}, content=[]): node = nodes.inline(rawtext, text, **dict(classes=['strike'])) ...
true
true
f7043dd4a34f458d08244ea0a3dea781fe8dba49
24
py
Python
python_code.py
vervainalthor/Coursera-Capstone
b6a5e4ec2c62cba0b212709c9d8d8d8ee3f6b12f
[ "MIT" ]
null
null
null
python_code.py
vervainalthor/Coursera-Capstone
b6a5e4ec2c62cba0b212709c9d8d8d8ee3f6b12f
[ "MIT" ]
1
2021-03-31T19:41:58.000Z
2021-03-31T19:41:58.000Z
python_code.py
vervainalthor/Coursera-Capstone
b6a5e4ec2c62cba0b212709c9d8d8d8ee3f6b12f
[ "MIT" ]
16
2020-04-13T21:15:59.000Z
2021-07-11T12:13:57.000Z
print("Hello Github!")
8
22
0.666667
print("Hello Github!")
true
true
f7043e99aff18d59102db1415aebe0995652b748
681
py
Python
plagiarismChecker.py
saurabhkumar29/website
41bb1c2850727dcf1a2a8d8664140a6951718ea6
[ "CC-BY-3.0" ]
null
null
null
plagiarismChecker.py
saurabhkumar29/website
41bb1c2850727dcf1a2a8d8664140a6951718ea6
[ "CC-BY-3.0" ]
null
null
null
plagiarismChecker.py
saurabhkumar29/website
41bb1c2850727dcf1a2a8d8664140a6951718ea6
[ "CC-BY-3.0" ]
null
null
null
# Author: Khalid - naam toh suna hi hoga # Steps to run -> # :~$ python yoyo.py from flask import Flask from flask import request from flask import render_template import stringComparison app = Flask(__name__) @app.route('/') def my_form(): return render_template("my-form.html") @app.route('/', methods=['POST'])...
24.321429
86
0.687225
from flask import Flask from flask import request from flask import render_template import stringComparison app = Flask(__name__) @app.route('/') def my_form(): return render_template("my-form.html") @app.route('/', methods=['POST']) def my_form_post(): text1 = request.form['text1'] text2 = request.f...
true
true
f7043f749d59fc0929d6d9c0de4e74f7310101fa
32,980
py
Python
tests/test_pysnooper.py
leozhoujf/Pyasnooper
43bde4b8bf730b4782d8897b601a5925f6621f37
[ "MIT" ]
null
null
null
tests/test_pysnooper.py
leozhoujf/Pyasnooper
43bde4b8bf730b4782d8897b601a5925f6621f37
[ "MIT" ]
null
null
null
tests/test_pysnooper.py
leozhoujf/Pyasnooper
43bde4b8bf730b4782d8897b601a5925f6621f37
[ "MIT" ]
null
null
null
# Copyright 2019 Ram Rachum and collaborators. # This program is distributed under the MIT license. import io import textwrap import threading import types import sys from pysnooper.utils import truncate from python_toolbox import sys_tools, temp_file_tools import pytest import pysnooper from pysnooper.variables imp...
28.068085
79
0.503062
import io import textwrap import threading import types import sys from pysnooper.utils import truncate from python_toolbox import sys_tools, temp_file_tools import pytest import pysnooper from pysnooper.variables import needs_parentheses from .utils import (assert_output, assert_sample_output, VariableEntry, ...
true
true
f7043fdb3cb677c8bc7f76a02ec8ae40c8f1cd3f
3,005
py
Python
tests/templates/test_templates.py
lhenkelm/cabinetry
40120c2718502cd69c8486020de963bde9005989
[ "BSD-3-Clause" ]
13
2020-04-30T04:23:06.000Z
2021-09-06T20:26:31.000Z
tests/templates/test_templates.py
alexander-held/pytfc
fce72088b4a6345304bf8c2e489938d41087a253
[ "BSD-3-Clause" ]
247
2020-05-07T00:26:02.000Z
2021-09-17T14:24:43.000Z
tests/templates/test_templates.py
alexander-held/pytfc
fce72088b4a6345304bf8c2e489938d41087a253
[ "BSD-3-Clause" ]
6
2020-05-07T00:11:27.000Z
2021-03-11T18:26:07.000Z
import logging import pathlib from unittest import mock from cabinetry import templates @mock.patch("cabinetry.route.apply_to_all_templates") @mock.patch("cabinetry.templates.builder._Builder") def test_build(mock_builder, mock_apply): config = {"General": {"HistogramFolder": "path/", "InputPath": "file.root"}} ...
34.147727
86
0.678203
import logging import pathlib from unittest import mock from cabinetry import templates @mock.patch("cabinetry.route.apply_to_all_templates") @mock.patch("cabinetry.templates.builder._Builder") def test_build(mock_builder, mock_apply): config = {"General": {"HistogramFolder": "path/", "InputPath": "file.root"}} ...
true
true
f70440dd09341f241e10da230ab174b5743ee8df
11,582
py
Python
MecademicRobot/RobotFeedback.py
GarrisonJohnston123/meca500_python2_driver
a5b9be9362dba3612b902cc5dfee5553d1a895cd
[ "MIT" ]
null
null
null
MecademicRobot/RobotFeedback.py
GarrisonJohnston123/meca500_python2_driver
a5b9be9362dba3612b902cc5dfee5553d1a895cd
[ "MIT" ]
null
null
null
MecademicRobot/RobotFeedback.py
GarrisonJohnston123/meca500_python2_driver
a5b9be9362dba3612b902cc5dfee5553d1a895cd
[ "MIT" ]
null
null
null
#!/usr/bin/env python import socket import re class RobotFeedback: """Class for the Mecademic Robot allowing for live positional feedback of the Mecademic Robot. Attributes ---------- address : string The IP address associated to the Mecademic robot. socket : socket Socket con...
35.310976
135
0.567864
import socket import re class RobotFeedback: def __init__(self, address, firmware_version): self.address = address self.socket = None self.robot_status = () self.gripper_status = () self.joints = () self.cartesian = () self.joints_vel =() self.to...
true
true
f7044144ec2809f9d7962b59fb909c9753171af5
19,423
py
Python
tests/model_inheritance_regress/tests.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
1
2017-01-11T06:27:15.000Z
2017-01-11T06:27:15.000Z
tests/model_inheritance_regress/tests.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/model_inheritance_regress/tests.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-10-22T12:16:53.000Z
2019-10-22T12:16:53.000Z
""" Regression tests for Model inheritance behavior. """ from __future__ import unicode_literals import datetime from operator import attrgetter from unittest import expectedFailure from django import forms from django.test import TestCase from .models import ( ArticleWithAuthor, BachelorParty, BirthdayParty, Bu...
38.159136
91
0.622973
from __future__ import unicode_literals import datetime from operator import attrgetter from unittest import expectedFailure from django import forms from django.test import TestCase from .models import ( ArticleWithAuthor, BachelorParty, BirthdayParty, BusStation, Child, DerivedM, InternalCertificationAudit...
true
true
f704431757b191fd6a6405e1724d23679ca1b2f0
1,173
py
Python
script/app/agg.py
Intelligent-Systems-Lab/ISL-BCFL
42ceb86708a76e28b31c22b33c15ee9a6a745ec7
[ "Apache-2.0" ]
null
null
null
script/app/agg.py
Intelligent-Systems-Lab/ISL-BCFL
42ceb86708a76e28b31c22b33c15ee9a6a745ec7
[ "Apache-2.0" ]
null
null
null
script/app/agg.py
Intelligent-Systems-Lab/ISL-BCFL
42ceb86708a76e28b31c22b33c15ee9a6a745ec7
[ "Apache-2.0" ]
null
null
null
import os # import torch import argparse import base64 import sys import io import torch import torch.nn as nn from torchvision import transforms from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler def fullmodel2base64(model): buffer = io.BytesIO() torch.save(mode...
19.55
56
0.734868
import os import argparse import base64 import sys import io import torch import torch.nn as nn from torchvision import transforms from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler def fullmodel2base64(model): buffer = io.BytesIO() torch.save(model, buffer) ...
true
true
f7044425b96c1b1b74a77404d1717095d1e2e08e
192
py
Python
q6.py
Babar-Awan/CP19_05
5d852cc4bac724aba3acec6bcefc2e3a1d3b0a58
[ "MIT" ]
null
null
null
q6.py
Babar-Awan/CP19_05
5d852cc4bac724aba3acec6bcefc2e3a1d3b0a58
[ "MIT" ]
null
null
null
q6.py
Babar-Awan/CP19_05
5d852cc4bac724aba3acec6bcefc2e3a1d3b0a58
[ "MIT" ]
null
null
null
#Question No 6 #Risen Each Year For Next 25 Years year =1 millimeter= 1.6 while(year<=25): years=(year * millimeter) print(" The ocean will rises each year is=" , years,) year+=1
24
56
0.661458
year =1 millimeter= 1.6 while(year<=25): years=(year * millimeter) print(" The ocean will rises each year is=" , years,) year+=1
true
true
f704446ccf2cd519c05582e5094cbf2d322f8140
1,530
py
Python
main.py
tomsaudrins/api-service
a1262b63b3c11bed373fe12547f3a41b6478d648
[ "MIT" ]
null
null
null
main.py
tomsaudrins/api-service
a1262b63b3c11bed373fe12547f3a41b6478d648
[ "MIT" ]
null
null
null
main.py
tomsaudrins/api-service
a1262b63b3c11bed373fe12547f3a41b6478d648
[ "MIT" ]
null
null
null
from fastapi import FastAPI import uvicorn from src.routes import ( user, employee, car, inventory, product, service, dealership, department, ) from fastapi.middleware.cors import CORSMiddleware from src.settings.envvariables import Settings Settings().check_variables() app = FastAPI()...
32.553191
96
0.698039
from fastapi import FastAPI import uvicorn from src.routes import ( user, employee, car, inventory, product, service, dealership, department, ) from fastapi.middleware.cors import CORSMiddleware from src.settings.envvariables import Settings Settings().check_variables() app = FastAPI()...
true
true
f70444a08deb7e59f97195740767e6b3556a8c02
4,464
py
Python
server/apps/verticals/shipping/utils/org_quality_report.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/verticals/shipping/utils/org_quality_report.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/verticals/shipping/utils/org_quality_report.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
from django.db.models import Q from apps.configattribute.models import ConfigAttribute from apps.property.models import GenericProperty from apps.utils.data_helpers.manager import DataManager from apps.utils.iotile.variable import SYSTEM_VID from apps.utils.timezone_utils import display_formatted_ts class TripInfo(o...
33.56391
125
0.5625
from django.db.models import Q from apps.configattribute.models import ConfigAttribute from apps.property.models import GenericProperty from apps.utils.data_helpers.manager import DataManager from apps.utils.iotile.variable import SYSTEM_VID from apps.utils.timezone_utils import display_formatted_ts class TripInfo(o...
true
true
f704457c6cc7a2334902e0a96a793b9399fd41ce
157,354
py
Python
core/tests/test_utils.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
core/tests/test_utils.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
core/tests/test_utils.py
luccasparoni/oppia
988f7c1e818faf774ec424e33b5dd0267c40237b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
41.116802
125
0.628023
from __future__ import absolute_import from __future__ import unicode_literals import ast import collections import contextlib import copy import inspect import itertools import json import logging import os import re import unittest from constants import constants from core.controllers import ba...
true
true
f704460cf7ea30ec843e7420c89fc0493ee56776
191
py
Python
velbus/modules/__init__.py
gitd8400/python-velbus
ca5bcbb347b82f2e41b599e7544f560b5f355251
[ "MIT" ]
null
null
null
velbus/modules/__init__.py
gitd8400/python-velbus
ca5bcbb347b82f2e41b599e7544f560b5f355251
[ "MIT" ]
null
null
null
velbus/modules/__init__.py
gitd8400/python-velbus
ca5bcbb347b82f2e41b599e7544f560b5f355251
[ "MIT" ]
null
null
null
""" :author: Thomas Delaet <thomas@delaet.org> """ from velbus.modules.vmb4ry import VMB4RYModule from velbus.modules.vmbin import VMB6INModule from velbus.modules.vmbin import VMB7INModule
23.875
46
0.806283
from velbus.modules.vmb4ry import VMB4RYModule from velbus.modules.vmbin import VMB6INModule from velbus.modules.vmbin import VMB7INModule
true
true
f70446cde10071c4761a7dc95d296e9fa2db3519
1,627
py
Python
hijack/tests/test_admin.py
sondrelg/django-hijack
de8d72fa53cf0abf1ec63105dd7b58ff923528fb
[ "MIT" ]
null
null
null
hijack/tests/test_admin.py
sondrelg/django-hijack
de8d72fa53cf0abf1ec63105dd7b58ff923528fb
[ "MIT" ]
null
null
null
hijack/tests/test_admin.py
sondrelg/django-hijack
de8d72fa53cf0abf1ec63105dd7b58ff923528fb
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock from django.urls import reverse from hijack.contrib.admin import HijackUserAdminMixin from hijack.tests.test_app.models import Post class TestHijackUserAdminMixin: def test_user_admin(self, admin_client): url = reverse("admin:test_app_customuser_changelist") r...
38.738095
87
0.700061
from unittest.mock import MagicMock from django.urls import reverse from hijack.contrib.admin import HijackUserAdminMixin from hijack.tests.test_app.models import Post class TestHijackUserAdminMixin: def test_user_admin(self, admin_client): url = reverse("admin:test_app_customuser_changelist") r...
true
true
f70447682772f8dce75902fd8f48d39c34673f82
3,109
py
Python
modelpractice/modelpractice/settings.py
prernaniraj/python_django_rest_api
b69f5dc015c3d84c81bac4fc345d585513d3dda9
[ "MIT" ]
null
null
null
modelpractice/modelpractice/settings.py
prernaniraj/python_django_rest_api
b69f5dc015c3d84c81bac4fc345d585513d3dda9
[ "MIT" ]
null
null
null
modelpractice/modelpractice/settings.py
prernaniraj/python_django_rest_api
b69f5dc015c3d84c81bac4fc345d585513d3dda9
[ "MIT" ]
null
null
null
""" Django settings for modelpractice project. Generated by 'django-admin startproject' using Django 3.0.2. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import...
25.694215
91
0.696365
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'ligk%x$+)qey=q+&d_nca7%s-_@zn4%g=kg_4+p!ga7n)-4nb@' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f704478779f04dbcbfcffa9eff8c9f6df4e7a789
7,764
py
Python
g_packages/deepImpute/docker/deepimpute/deepimpute/multinet.py
lanagarmire/granatumx
3dee3a8fb2ba851c31a9f6338aef1817217769f9
[ "MIT" ]
1
2021-03-04T13:04:28.000Z
2021-03-04T13:04:28.000Z
g_packages/deepImpute/docker/deepimpute/deepimpute/multinet.py
lanagarmire/granatumx
3dee3a8fb2ba851c31a9f6338aef1817217769f9
[ "MIT" ]
16
2020-01-28T23:03:40.000Z
2022-02-10T00:30:16.000Z
g_packages/deepImpute/docker/deepimpute/deepimpute/multinet.py
lanagarmire/granatumx
3dee3a8fb2ba851c31a9f6338aef1817217769f9
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd import binascii import warnings import tempfile from math import ceil from multiprocessing import cpu_count, sharedctypes from multiprocessing.pool import Pool from sklearn.metrics import r2_score from deepimpute.net import Net from deepimpute.normalizer import Normaliz...
36.971429
146
0.618367
import os import numpy as np import pandas as pd import binascii import warnings import tempfile from math import ceil from multiprocessing import cpu_count, sharedctypes from multiprocessing.pool import Pool from sklearn.metrics import r2_score from deepimpute.net import Net from deepimpute.normalizer import Normaliz...
true
true
f70447f40f7fdf7642cec82e378beb85149aa765
8,476
py
Python
dynamic_dynamodb/config/command_line_parser.py
ponprathip/dynamic-dynamodb
f0968215f606b9ff464fc4b633f01df60a8745b2
[ "Apache-2.0" ]
null
null
null
dynamic_dynamodb/config/command_line_parser.py
ponprathip/dynamic-dynamodb
f0968215f606b9ff464fc4b633f01df60a8745b2
[ "Apache-2.0" ]
null
null
null
dynamic_dynamodb/config/command_line_parser.py
ponprathip/dynamic-dynamodb
f0968215f606b9ff464fc4b633f01df60a8745b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Command line configuration parser """ import sys import os.path import argparse import configparser def parse(): """ Parse command line options """ parser = argparse.ArgumentParser( description='Dynamic DynamoDB - Auto provisioning AWS DynamoDB') parser.add_argument( ...
38.880734
84
0.607126
import sys import os.path import argparse import configparser def parse(): parser = argparse.ArgumentParser( description='Dynamic DynamoDB - Auto provisioning AWS DynamoDB') parser.add_argument( '-c', '--config', help='Read configuration from a configuration file') parser.add_argu...
true
true
f7044a279a20984e104ff69ddf76ab1cc5fa13be
4,076
py
Python
tvizbase/rpc_client.py
inov8ru/thallid-viz
302a44f8af257edad8a5d11be19fc423fe51b89c
[ "MIT" ]
3
2019-09-27T15:21:14.000Z
2019-10-24T15:13:50.000Z
tvizbase/rpc_client.py
inov8ru/thallid-viz
302a44f8af257edad8a5d11be19fc423fe51b89c
[ "MIT" ]
null
null
null
tvizbase/rpc_client.py
inov8ru/thallid-viz
302a44f8af257edad8a5d11be19fc423fe51b89c
[ "MIT" ]
1
2022-02-12T16:27:05.000Z
2022-02-12T16:27:05.000Z
# -*- coding: utf-8 -*- from requests import Session from requests.adapters import HTTPAdapter from requests.exceptions import ConnectionError import json from time import sleep, time from pprint import pprint from itertools import cycle from .storage import nodes, api_total #from .proxy import Proxy class Http(): ...
27.540541
105
0.648921
from requests import Session from requests.adapters import HTTPAdapter from requests.exceptions import ConnectionError import json from time import sleep, time from pprint import pprint from itertools import cycle from .storage import nodes, api_total class Http(): http = Session() proxies = None class RpcCl...
true
true
f7044a71ed7e9f453f633fd06fffede821afd456
3,600
py
Python
tests/integration/projects/general/service.py
DrizzlingCattus/BentoML
3ca0cc134c72d92e2e806113df1677e38f2567e0
[ "Apache-2.0" ]
null
null
null
tests/integration/projects/general/service.py
DrizzlingCattus/BentoML
3ca0cc134c72d92e2e806113df1677e38f2567e0
[ "Apache-2.0" ]
null
null
null
tests/integration/projects/general/service.py
DrizzlingCattus/BentoML
3ca0cc134c72d92e2e806113df1677e38f2567e0
[ "Apache-2.0" ]
null
null
null
import json import pathlib import sys import time from typing import Sequence import bentoml from bentoml.adapters import ( DataframeInput, FileInput, ImageInput, JsonInput, MultiImageInput, ) from bentoml.frameworks.sklearn import SklearnModelArtifact from bentoml.handlers import DataframeHandler ...
34.951456
88
0.695
import json import pathlib import sys import time from typing import Sequence import bentoml from bentoml.adapters import ( DataframeInput, FileInput, ImageInput, JsonInput, MultiImageInput, ) from bentoml.frameworks.sklearn import SklearnModelArtifact from bentoml.handlers import DataframeHandler ...
true
true
f7044b4832232e3b67064f3a65d9a30b120554fc
236
py
Python
scripts/make_gifs.py
bchao1/stereo-magnification
031376675430a459f4bde768eb5c652f1d22a0a4
[ "Apache-2.0" ]
null
null
null
scripts/make_gifs.py
bchao1/stereo-magnification
031376675430a459f4bde768eb5c652f1d22a0a4
[ "Apache-2.0" ]
null
null
null
scripts/make_gifs.py
bchao1/stereo-magnification
031376675430a459f4bde768eb5c652f1d22a0a4
[ "Apache-2.0" ]
null
null
null
from PIL import Image images = [] for i in range(9): images.append(Image.open(f"../examples/lf/results/render_0{i}_{i}.0.png")) images[0].save("../examples/lf/out.gif", save_all=True, append_images=images[1:], duration=100, loop=0)
39.333333
103
0.699153
from PIL import Image images = [] for i in range(9): images.append(Image.open(f"../examples/lf/results/render_0{i}_{i}.0.png")) images[0].save("../examples/lf/out.gif", save_all=True, append_images=images[1:], duration=100, loop=0)
true
true
f7044ca3e16964f42ff76f78419427012e7f0013
8,104
py
Python
src/waldur_vmware/models.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_vmware/models.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_vmware/models.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils import FieldTracker from waldur_core.core import models as core_models from waldur_core.structure import models as structure_models class VirtualMachineMixin(models.Model): class Meta: abstract = True ...
29.576642
102
0.659427
from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils import FieldTracker from waldur_core.core import models as core_models from waldur_core.structure import models as structure_models class VirtualMachineMixin(models.Model): class Meta: abstract = True ...
true
true
f7044cad6db8570c9fda70bb4a54726e8a97dc08
321
py
Python
log_metrics/__init__.py
simpleenergy/log-metrics
af91bfecc2a6f39ee26a2e394e3782495ffc98b1
[ "Apache-2.0" ]
5
2015-09-23T23:15:37.000Z
2017-11-27T06:43:54.000Z
log_metrics/__init__.py
simpleenergy/log-metrics
af91bfecc2a6f39ee26a2e394e3782495ffc98b1
[ "Apache-2.0" ]
1
2015-02-07T23:26:32.000Z
2015-02-07T23:26:32.000Z
log_metrics/__init__.py
simpleenergy/log-metrics
af91bfecc2a6f39ee26a2e394e3782495ffc98b1
[ "Apache-2.0" ]
2
2015-01-19T05:58:43.000Z
2018-07-30T17:24:57.000Z
# -*- coding: utf-8 -*- # Meta __version__ = "0.0.4" __author__ = 'Rhys Elsmore' __email__ = 'me@rhys.io' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2014 Rhys Elsmore' # Module Namespace from .core import MetricsLogger, GroupMetricsLogger from .api import timer, increment, sample, measure, unique, group ...
20.0625
65
0.725857
__version__ = "0.0.4" __author__ = 'Rhys Elsmore' __email__ = 'me@rhys.io' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2014 Rhys Elsmore' from .core import MetricsLogger, GroupMetricsLogger from .api import timer, increment, sample, measure, unique, group
true
true
f7044d3c0712db7cd4bb71dcc732d7614526c066
1,423
bzl
Python
proto/workspace.bzl
Yannic/rules_proto
4a4b83abfbfe018387a5b58986efa888850048c4
[ "Apache-2.0" ]
5
2019-06-13T19:03:50.000Z
2019-08-07T14:23:52.000Z
proto/workspace.bzl
Yannic/rules_proto
4a4b83abfbfe018387a5b58986efa888850048c4
[ "Apache-2.0" ]
5
2019-06-18T11:44:50.000Z
2019-06-24T14:05:35.000Z
proto/workspace.bzl
Yannic/rules_proto
4a4b83abfbfe018387a5b58986efa888850048c4
[ "Apache-2.0" ]
1
2019-06-19T21:50:23.000Z
2019-06-19T21:50:23.000Z
## Copyright 2019 The Rules Protobuf 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 require...
36.487179
91
0.740689
proto_register_toolchains(): print(_DEPRECATED_REPOSITORY_RULE_MESSAGE.format( old_rule = "proto_register_toolchains", new_rule = "rules_proto_toolchains", )) rules_proto_toolchains()
true
true
f7044f1d26e519871cd3864ab2531d33132e654e
21,972
py
Python
test/python/test_tensor.py
XinChCh/singa
93fd9da72694e68bfe3fb29d0183a65263d238a1
[ "Apache-2.0" ]
2,354
2015-05-05T03:01:56.000Z
2019-10-22T15:08:11.000Z
test/python/test_tensor.py
Dadaguaibuhaoyisi/singa
93fd9da72694e68bfe3fb29d0183a65263d238a1
[ "Apache-2.0" ]
332
2019-10-24T15:06:32.000Z
2022-03-07T06:22:32.000Z
test/python/test_tensor.py
Dadaguaibuhaoyisi/singa
93fd9da72694e68bfe3fb29d0183a65263d238a1
[ "Apache-2.0" ]
607
2015-05-03T14:09:05.000Z
2019-10-21T09:49:21.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.495961
83
0.563444
from __future__ import division import math import unittest import random import numpy as np from singa import tensor from singa import singa_wrap as singa_api from singa import autograd from cuda_helper import gpu_dev, cpu_dev class TestTensorMethods(unittest.TestCase): def setUp(self): ...
true
true
f7044ff308e002990bf93fd6f412f89dff8bcf34
4,580
py
Python
authors/apps/articles/tests/endpoints/test_get.py
andela/ah-jumanji-
a304718929936dd4a759d737fb3570d6cc25fb76
[ "BSD-3-Clause" ]
1
2018-12-23T15:31:54.000Z
2018-12-23T15:31:54.000Z
authors/apps/articles/tests/endpoints/test_get.py
andela/ah-jumanji-
a304718929936dd4a759d737fb3570d6cc25fb76
[ "BSD-3-Clause" ]
26
2018-11-27T09:13:15.000Z
2021-06-10T20:58:57.000Z
authors/apps/articles/tests/endpoints/test_get.py
andela/ah-jumanji-
a304718929936dd4a759d737fb3570d6cc25fb76
[ "BSD-3-Clause" ]
2
2019-01-10T22:14:28.000Z
2019-11-04T07:33:43.000Z
import json from rest_framework.test import APITestCase from django.urls import reverse from rest_framework import status from django.contrib.auth import get_user_model from authors.apps.articles.models import Articles from authors.apps.profiles.models import Profile class TestGetEndpoint(APITestCase): def set...
35.230769
76
0.627293
import json from rest_framework.test import APITestCase from django.urls import reverse from rest_framework import status from django.contrib.auth import get_user_model from authors.apps.articles.models import Articles from authors.apps.profiles.models import Profile class TestGetEndpoint(APITestCase): def set...
true
true
f70450e5817c83cfcb1a4c26acddb49086b5df92
566
py
Python
utilities/ResourceManager.py
sanazb/datastories-semeval2017-task4
c752620e3d694a1c5bcd444db8cf3e5ed5cd6651
[ "MIT" ]
218
2017-05-15T13:36:34.000Z
2021-11-07T06:38:39.000Z
utilities/ResourceManager.py
sanazb/datastories-semeval2017-task4
c752620e3d694a1c5bcd444db8cf3e5ed5cd6651
[ "MIT" ]
14
2017-07-24T07:45:58.000Z
2019-11-02T09:22:37.000Z
utilities/ResourceManager.py
sanazb/datastories-semeval2017-task4
c752620e3d694a1c5bcd444db8cf3e5ed5cd6651
[ "MIT" ]
70
2017-05-12T08:06:56.000Z
2022-03-21T14:07:52.000Z
from abc import ABCMeta, abstractmethod from frozendict import frozendict class ResourceManager(metaclass=ABCMeta): def __init__(self): self.wv_filename = "" self.parsed_filename = "" @abstractmethod def write(self): """ parse the raw file/files and write the data to disk...
19.517241
59
0.583039
from abc import ABCMeta, abstractmethod from frozendict import frozendict class ResourceManager(metaclass=ABCMeta): def __init__(self): self.wv_filename = "" self.parsed_filename = "" @abstractmethod def write(self): pass @abstractmethod def read(self): pass ...
true
true
f70451dd563a66eff92f232ce71a939630bab2d2
22,696
py
Python
ssn_dataset.py
hyperfraise/action-detection
a3ee263ed701ed251cd0a79830ef796889ff366e
[ "BSD-3-Clause" ]
1
2020-02-12T09:30:23.000Z
2020-02-12T09:30:23.000Z
ssn_dataset.py
hyperfraise/action-detection
a3ee263ed701ed251cd0a79830ef796889ff366e
[ "BSD-3-Clause" ]
null
null
null
ssn_dataset.py
hyperfraise/action-detection
a3ee263ed701ed251cd0a79830ef796889ff366e
[ "BSD-3-Clause" ]
null
null
null
import torch.utils.data as data import os import os.path from numpy.random import randint from ops.io import load_proposal_file from transforms import * from ops.utils import temporal_iou class SSNInstance: def __init__( self, start_frame, end_frame, video_frame_count, fps...
32.330484
126
0.554195
import torch.utils.data as data import os import os.path from numpy.random import randint from ops.io import load_proposal_file from transforms import * from ops.utils import temporal_iou class SSNInstance: def __init__( self, start_frame, end_frame, video_frame_count, fps...
true
true
f704520d1a228703aaf40ee1af453d7651947d38
45
py
Python
routes/websocket/__init__.py
ceyzaguirre4/starlette-mvc
03d0f38e11669e988a084e84b890ecdcca449f64
[ "MIT" ]
8
2019-06-19T15:32:47.000Z
2021-02-01T19:57:26.000Z
routes/websocket/__init__.py
ceyzaguirre4/starlette-mvc
03d0f38e11669e988a084e84b890ecdcca449f64
[ "MIT" ]
null
null
null
routes/websocket/__init__.py
ceyzaguirre4/starlette-mvc
03d0f38e11669e988a084e84b890ecdcca449f64
[ "MIT" ]
2
2019-07-31T22:23:56.000Z
2021-02-01T19:57:29.000Z
from .routes import app as websockets_routes
22.5
44
0.844444
from .routes import app as websockets_routes
true
true
f7045338c41d6965d06ef3953f92771273c53481
786
py
Python
server/models/utils.py
Justinyu1618/Coronalert
df7d66bec147ea1f47105102582bc25469e4bee2
[ "MIT" ]
2
2020-04-19T07:08:39.000Z
2020-06-01T21:22:07.000Z
server/models/utils.py
HackCameroon/Coronalert
df7d66bec147ea1f47105102582bc25469e4bee2
[ "MIT" ]
3
2020-10-13T01:06:56.000Z
2022-02-27T01:51:31.000Z
server/models/utils.py
HackCameroon/Coronalert
df7d66bec147ea1f47105102582bc25469e4bee2
[ "MIT" ]
1
2020-05-08T08:37:15.000Z
2020-05-08T08:37:15.000Z
import json from server import db from sqlalchemy.ext import mutable class JsonEncodedDict(db.TypeDecorator): impl = db.Text def process_bind_param(self, value, dialect): if value is None: return '{}' else: return json.dumps(value) def process_result_value(self, val...
32.75
110
0.604326
import json from server import db from sqlalchemy.ext import mutable class JsonEncodedDict(db.TypeDecorator): impl = db.Text def process_bind_param(self, value, dialect): if value is None: return '{}' else: return json.dumps(value) def process_result_value(self, val...
true
true
f704533cb05012bfc523241ab664a84ebc5b8dad
7,054
py
Python
obsolete/reports/pipeline_capseq/trackers/macs_replicated_intervals.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
11
2018-09-07T11:33:23.000Z
2022-01-07T12:16:11.000Z
obsolete/reports/pipeline_capseq/trackers/macs_replicated_intervals.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
102
2018-03-22T15:35:26.000Z
2022-03-23T17:46:16.000Z
obsolete/reports/pipeline_capseq/trackers/macs_replicated_intervals.py
kevinrue/cgat-flow
02b5a1867253c2f6fd6b4f3763e0299115378913
[ "MIT" ]
7
2018-06-11T15:01:41.000Z
2020-03-31T09:29:33.000Z
import os import sys import re import types import itertools import matplotlib.pyplot as plt import numpy import scipy.stats import numpy.ma import Stats import Histogram from cgatReport.Tracker import * from cpgReport import * ########################################################################## class replica...
38.546448
164
0.568897
import os import sys import re import types import itertools import matplotlib.pyplot as plt import numpy import scipy.stats import numpy.ma import Stats import Histogram from cgatReport.Tracker import * from cpgReport import *
true
true
f7045379712a0cda1d66cb3115fa1f0870d8720e
689
py
Python
library/migrations/0002_auto_20180704_0002.py
doriclazar/peak_30
a87217e4d0d1f96d39ad214d40a879c7abfaaaee
[ "Apache-2.0" ]
null
null
null
library/migrations/0002_auto_20180704_0002.py
doriclazar/peak_30
a87217e4d0d1f96d39ad214d40a879c7abfaaaee
[ "Apache-2.0" ]
1
2018-07-14T07:35:55.000Z
2018-07-16T07:40:49.000Z
library/migrations/0002_auto_20180704_0002.py
doriclazar/peak_30
a87217e4d0d1f96d39ad214d40a879c7abfaaaee
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-07-04 00:02 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('library', '0001_initial'), ] operations = [ ...
25.518519
120
0.619739
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('library', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='module', ...
true
true
f704561340c1d7a365b883b6ae1bea0dbbbbec2d
333
py
Python
test_settings.py
pwilczynskiclearcode/django-nuit
e1b619c00db36fba48683e9cf3d51cf4460f99c8
[ "Apache-2.0" ]
5
2016-05-15T12:43:24.000Z
2018-10-06T07:45:38.000Z
test_settings.py
pwilczynskiclearcode/django-nuit
e1b619c00db36fba48683e9cf3d51cf4460f99c8
[ "Apache-2.0" ]
12
2016-04-21T22:01:55.000Z
2017-04-20T09:27:56.000Z
test_settings.py
pwilczynskiclearcode/django-nuit
e1b619c00db36fba48683e9cf3d51cf4460f99c8
[ "Apache-2.0" ]
6
2016-04-21T23:27:48.000Z
2018-02-22T16:24:11.000Z
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } ROOT_URLCONF = 'django_autoconfig.autourlconf' INSTALLED_APPS = [ 'django.contrib.auth', 'nuit', ] STATIC_URL = '/static/' STATIC_ROOT = '.static' from django_autoconfig.autoconfig import configure_settings configure_setting...
22.2
59
0.6997
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } ROOT_URLCONF = 'django_autoconfig.autourlconf' INSTALLED_APPS = [ 'django.contrib.auth', 'nuit', ] STATIC_URL = '/static/' STATIC_ROOT = '.static' from django_autoconfig.autoconfig import configure_settings configure_setting...
true
true
f70456c2fe01d36dc70a451996e2eedc3ab16d0d
3,307
py
Python
src/my_blog/settings.py
zainab66/blog-django-ar
5e2643f40afb11f648841fd2192a459f6141505b
[ "bzip2-1.0.6" ]
1
2020-02-16T02:52:25.000Z
2020-02-16T02:52:25.000Z
src/my_blog/settings.py
zainab66/blog-django-ar
5e2643f40afb11f648841fd2192a459f6141505b
[ "bzip2-1.0.6" ]
2
2021-03-18T23:50:25.000Z
2021-09-22T18:35:25.000Z
src/my_blog/settings.py
zainab66/blog-django-ar
5e2643f40afb11f648841fd2192a459f6141505b
[ "bzip2-1.0.6" ]
null
null
null
""" Django settings for my_blog project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os #...
26.03937
91
0.702449
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '@7+q1q@_=iniipvuc%nfs)5qauaax2g0cnc1fxzos52t-9ml=m' DEBUG = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'sarah.1024z@gmail.com' EMAIL_HOST_PASSWORD = 'rzan2015' EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_...
true
true
f70456d0ba561c2a6d0de8e56a180302aea268a7
4,949
py
Python
samcli/commands/package/package_context.py
kylelaker/aws-sam-cli
d2917102ef56ac05b9973f96c716612f9638bb62
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
samcli/commands/package/package_context.py
kylelaker/aws-sam-cli
d2917102ef56ac05b9973f96c716612f9638bb62
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
samcli/commands/package/package_context.py
kylelaker/aws-sam-cli
d2917102ef56ac05b9973f96c716612f9638bb62
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
""" Logic for uploading to s3 based on supplied template file and s3 bucket """ # Copyright 2012-2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License i...
33.214765
110
0.6765
import json import logging import os import boto3 import click import docker from botocore.config import Config from samcli.commands.package.exceptions import PackageFailedError from samcli.lib.package.artifact_exporter import Template from samcli.lib.package.ecr_uploader import ECRUploader from samcli....
true
true
f7045706a79e9f09f2b7bf296887bce361af2fb5
1,658
py
Python
src/model/vdsr.py
delldu/EDSR
98752b57a3091e693c523e710380d369f9913041
[ "MIT" ]
1
2019-10-19T13:28:30.000Z
2019-10-19T13:28:30.000Z
src/model/vdsr.py
delldu/EDSR
98752b57a3091e693c523e710380d369f9913041
[ "MIT" ]
null
null
null
src/model/vdsr.py
delldu/EDSR
98752b57a3091e693c523e710380d369f9913041
[ "MIT" ]
null
null
null
from model import common import torch.nn as nn import torch.nn.init as init url = { 'r20f64': '' } def make_model(args, parent=False): return VDSR(args) class VDSR(nn.Module): def __init__(self, args, conv=common.default_conv): super(VDSR, self).__init__() n_resblocks = args.n_resblocks...
25.507692
73
0.598311
from model import common import torch.nn as nn import torch.nn.init as init url = { 'r20f64': '' } def make_model(args, parent=False): return VDSR(args) class VDSR(nn.Module): def __init__(self, args, conv=common.default_conv): super(VDSR, self).__init__() n_resblocks = args.n_resblocks...
true
true
f704591e6a08033243efa0eee051057ba7a55fd2
9,454
py
Python
src/zeit/content/image/transform.py
ZeitOnline/zeit.content.image
0ea8d125f8ff7a2a4d8333542cded9856e25805a
[ "BSD-3-Clause" ]
null
null
null
src/zeit/content/image/transform.py
ZeitOnline/zeit.content.image
0ea8d125f8ff7a2a4d8333542cded9856e25805a
[ "BSD-3-Clause" ]
11
2016-02-25T15:22:34.000Z
2019-02-26T12:20:59.000Z
src/zeit/content/image/transform.py
ZeitOnline/zeit.content.image
0ea8d125f8ff7a2a4d8333542cded9856e25805a
[ "BSD-3-Clause" ]
3
2015-07-28T11:11:56.000Z
2016-11-15T13:23:57.000Z
import PIL.Image import PIL.ImageColor import PIL.ImageEnhance import zeit.cms.repository.folder import zeit.connector.interfaces import zeit.content.image.interfaces import zope.app.appsetup.product import zope.component import zope.interface import zope.security.proxy class ImageTransform(object): zope.interfa...
38.90535
79
0.649884
import PIL.Image import PIL.ImageColor import PIL.ImageEnhance import zeit.cms.repository.folder import zeit.connector.interfaces import zeit.content.image.interfaces import zope.app.appsetup.product import zope.component import zope.interface import zope.security.proxy class ImageTransform(object): zope.interfa...
true
true
f70459c5cac1ef72f59035358cf6fe0cccf00ab0
3,418
py
Python
tests/unit/test_parameters/test_current_functions.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_parameters/test_current_functions.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_parameters/test_current_functions.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
# # Tests for current input functions # import pybamm import numbers import unittest import numpy as np class TestCurrentFunctions(unittest.TestCase): def test_constant_current(self): # test simplify current = pybamm.electrical_parameters.current_with_time parameter_values = pybamm.Paramet...
32.245283
88
0.622001
import pybamm import numbers import unittest import numpy as np class TestCurrentFunctions(unittest.TestCase): def test_constant_current(self): current = pybamm.electrical_parameters.current_with_time parameter_values = pybamm.ParameterValues( { "Typical cur...
true
true
f7045a7748f2d0754f675332513daaafa28aceaf
940
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/domainservice/models/SubDomainExist.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/domainservice/models/SubDomainExist.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/domainservice/models/SubDomainExist.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
31.333333
75
0.711702
class SubDomainExist(object): def __init__(self, domain=None, isExist=None): self.domain = domain self.isExist = isExist
true
true
f7045a8b76dd75929fb90ffcd1baf9e5c780d065
9,167
py
Python
sdk/python/pulumi_azure_native/network/v20161201/get_public_ip_address.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20161201/get_public_ip_address.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20161201/get_public_ip_address.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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 from ... import _utilities, _tables from...
38.84322
295
0.66423
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetPublicIPAddressResult', 'AwaitableGetPublicIPAddressResult', 'get_public_ip_address', ] @pulumi.output_type class Get...
true
true
f7045aca0807423bddc8738c277100b4972f3dc4
891
py
Python
examples/command/unix_ps.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
examples/command/unix_ps.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
examples/command/unix_ps.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
from moler.cmd.unix.ps import Ps from moler.observable_connection import ObservableConnection, get_connection from moler.io.raw.terminal import ThreadedTerminal # v.1 - combine all manually # moler_conn = ObservableConnection() # terminal = ThreadedTerminal(moler_connection=moler_conn) # v.2 - let factory combine term...
35.64
76
0.728395
from moler.cmd.unix.ps import Ps from moler.observable_connection import ObservableConnection, get_connection from moler.io.raw.terminal import ThreadedTerminal terminal = get_connection(io_type='terminal', variant='threaded') with terminal.open(): ps_cmd = Ps(connection=terminal.moler_connection, options="-...
true
true
f7045b7726258ee50846aef00faea6ad2f193365
5,213
py
Python
hym/ac.py
AugustUnderground/oaceis
73abc3b9703b84322764d2a40def915d8c1e69a7
[ "MIT" ]
null
null
null
hym/ac.py
AugustUnderground/oaceis
73abc3b9703b84322764d2a40def915d8c1e69a7
[ "MIT" ]
null
null
null
hym/ac.py
AugustUnderground/oaceis
73abc3b9703b84322764d2a40def915d8c1e69a7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # __coconut_hash__ = 0xde71c936 # Compiled with Coconut version 2.0.0-a_dev33 [How Not to Be Seen] # Coconut Header: ------------------------------------------------------------- from __future__ import print_function, absolute_import, unicode_literals, division import sy...
46.544643
987
0.750815
from __future__ import print_function, absolute_import, unicode_literals, division import sys as _coconut_sys, os as _coconut_os _coconut_file_dir = _coconut_os.path.dirname(_coconut_os.path.abspath(__file__)) _coconut_cached_module = _coconut_sys.modules.get(str("__coconut__")) if _coconut_cached_module is not...
true
true
f7045cc997340a8708c325c5a56407dc3ecffd1d
1,604
py
Python
SS-GMNN-GraphMix/GraphMix-par/run_citeseer_ss.py
TAMU-VITA/SS-GCNs
644f8a5f3b507be6d59be02747be406fabd8b8f9
[ "MIT" ]
1
2021-06-07T15:18:10.000Z
2021-06-07T15:18:10.000Z
SS-GMNN-GraphMix/GraphMix-par/run_citeseer_ss.py
TAMU-VITA/SS-GCNs
644f8a5f3b507be6d59be02747be406fabd8b8f9
[ "MIT" ]
null
null
null
SS-GMNN-GraphMix/GraphMix-par/run_citeseer_ss.py
TAMU-VITA/SS-GCNs
644f8a5f3b507be6d59be02747be406fabd8b8f9
[ "MIT" ]
null
null
null
import sys import os import copy import json import datetime opt = dict() opt['dataset'] = '../data/citeseer' opt['hidden_dim'] = 16 opt['input_dropout'] = 0.5 opt['dropout'] = 0 opt['optimizer'] = 'adam' opt['lr'] = 0.01 opt['decay'] = 5e-4 opt['self_link_weight'] = 1.0 opt['pre_epoch'] = 2000 opt['epoch'] = 100 opt...
21.675676
51
0.598504
import sys import os import copy import json import datetime opt = dict() opt['dataset'] = '../data/citeseer' opt['hidden_dim'] = 16 opt['input_dropout'] = 0.5 opt['dropout'] = 0 opt['optimizer'] = 'adam' opt['lr'] = 0.01 opt['decay'] = 5e-4 opt['self_link_weight'] = 1.0 opt['pre_epoch'] = 2000 opt['epoch'] = 100 opt...
true
true
f7045d94952b05c34c83c62669bb8a4442772b67
12,907
py
Python
Core/hippoSeg/LiviaNet/startTraining.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
10
2019-09-26T03:12:52.000Z
2022-02-25T06:05:38.000Z
Core/hippoSeg/LiviaNet/startTraining.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
Core/hippoSeg/LiviaNet/startTraining.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
8
2020-02-26T01:54:48.000Z
2022-03-19T01:23:55.000Z
""" Copyright (c) 2016, Jose Dolz .All rights reserved. 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 f...
48.340824
153
0.581777
import os import numpy as np from Modules.IO.sampling import getSamplesSubepoch from Modules.General.Utils import dump_model_to_gzip_file from Modules.General.Utils import getImagesSet from Modules.General.Utils import load_model_from_gzip_file from Modules.Parsers.parsersUtils import parserConfigIni from startTesti...
true
true
f7045e707bad5fe79cb0eae215451a05a660f48a
13,388
py
Python
potion/envs/minigolf.py
T3p/policy-optimization
77006545779823737c4ca3b19e9d80506015c132
[ "MIT" ]
null
null
null
potion/envs/minigolf.py
T3p/policy-optimization
77006545779823737c4ca3b19e9d80506015c132
[ "MIT" ]
null
null
null
potion/envs/minigolf.py
T3p/policy-optimization
77006545779823737c4ca3b19e9d80506015c132
[ "MIT" ]
1
2019-09-08T15:11:55.000Z
2019-09-08T15:11:55.000Z
from numbers import Number import gym from gym import spaces from gym.utils import seeding import numpy as np import math as m from scipy.stats import norm """ Minigolf task. References ---------- - Penner, A. R. "The physics of putting." Canadian Journal of Physics 80.2 (2002): 83-96. """ class MiniGolf(gym.Env)...
33.386534
133
0.561025
from numbers import Number import gym from gym import spaces from gym.utils import seeding import numpy as np import math as m from scipy.stats import norm class MiniGolf(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], 'video.frames_per_second': 30 } def __init__(self): ...
true
true
f7045efad70ff6e1be66e1bccf1a06a420b019bb
636
py
Python
Pyduino/Boards/Uno.py
ItzTheDodo/Pyduino
a68d6a3214d5fb452e8b8e53cb013ee7205734bb
[ "Apache-2.0" ]
null
null
null
Pyduino/Boards/Uno.py
ItzTheDodo/Pyduino
a68d6a3214d5fb452e8b8e53cb013ee7205734bb
[ "Apache-2.0" ]
null
null
null
Pyduino/Boards/Uno.py
ItzTheDodo/Pyduino
a68d6a3214d5fb452e8b8e53cb013ee7205734bb
[ "Apache-2.0" ]
null
null
null
class UnoInfo: def __init__(self): self.dataPins = 13 self.analogInPins = 5 self.GND = 3 self.pow = [3.3, 5] self.TX = 1 self.RX = 0 def getMainInfo(self): return {"0": self.dataPins, "1": self.GND, "2": self.pow} def getDigitalPins(s...
19.875
66
0.536164
class UnoInfo: def __init__(self): self.dataPins = 13 self.analogInPins = 5 self.GND = 3 self.pow = [3.3, 5] self.TX = 1 self.RX = 0 def getMainInfo(self): return {"0": self.dataPins, "1": self.GND, "2": self.pow} def getDigitalPins(s...
true
true
f7046024f61186b826309ccf12e7b065fb9976cb
952
py
Python
Python/Simple-Sender-Receiver/receiver-tls.py
nplab/IOT-Project
b0c1f2b5f4c130ef4e4933801da8792a95609fb4
[ "BSD-3-Clause" ]
null
null
null
Python/Simple-Sender-Receiver/receiver-tls.py
nplab/IOT-Project
b0c1f2b5f4c130ef4e4933801da8792a95609fb4
[ "BSD-3-Clause" ]
null
null
null
Python/Simple-Sender-Receiver/receiver-tls.py
nplab/IOT-Project
b0c1f2b5f4c130ef4e4933801da8792a95609fb4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import paho.mqtt.client as mqtt import json import random import math import time import ssl config_mqtt_broker_ip = "iot.fh-muenster.de" config_mqtt_client_id = "dummy-receiver-" + str(random.randint(1000, 9999)); config_mqtt_topic = "sensor/60:01:94:4A:AF:7A" ts_last_message = int(round(...
27.2
79
0.767857
import paho.mqtt.client as mqtt import json import random import math import time import ssl config_mqtt_broker_ip = "iot.fh-muenster.de" config_mqtt_client_id = "dummy-receiver-" + str(random.randint(1000, 9999)); config_mqtt_topic = "sensor/60:01:94:4A:AF:7A" ts_last_message = int(round(time.time() * 1000)) ...
true
true
f704617f9290ee2bf253dd9c32d76dbfa0b5aedf
5,785
py
Python
WebScraping2.py
jenildesai25/WebScrapping
41937094a7963d53ab09e3ceff055dca4a95f13f
[ "MIT" ]
null
null
null
WebScraping2.py
jenildesai25/WebScrapping
41937094a7963d53ab09e3ceff055dca4a95f13f
[ "MIT" ]
null
null
null
WebScraping2.py
jenildesai25/WebScrapping
41937094a7963d53ab09e3ceff055dca4a95f13f
[ "MIT" ]
null
null
null
# Online References used : # https://github.com/imadmali/movie-scraper/blob/master/MojoLinkExtract.py # https://www.crummy.com/software/BeautifulSoup/bs4/doc/ # https://nycdatascience.com/blog/student-works/scraping-box-office-mojo/ # https://www.youtube.com/watch?v=XQgXKtPSzUI # https://www.youtube.com/watch?v=aIPqt-...
46.28
197
0.584788
from bs4 import BeautifulSoup import pandas as pd import os import requests import glob import re def scrape_data_for_actors(): file_path = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop') file_path = os.path.join(file_path, ...
true
true
f70461a1b7fa5f8f95a75d2f5d58265ffdffea63
4,593
py
Python
var/spack/repos/builtin/packages/py-pyqt5/package.py
fcannini/spack
9b3f5f3890025494ffa620d144d22a4734c8fcee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-pyqt5/package.py
fcannini/spack
9b3f5f3890025494ffa620d144d22a4734c8fcee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-pyqt5/package.py
fcannini/spack
9b3f5f3890025494ffa620d144d22a4734c8fcee
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-03-06T11:04:37.000Z
2020-03-06T11:04:37.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import os class PyPyqt5(SIPPackage): """PyQt is a set of Python v2 and v3 bindings for The Qt Co...
44.592233
118
0.588287
from spack import * import os class PyPyqt5(SIPPackage): homepage = "https://www.riverbankcomputing.com/software/pyqt/intro" url = "https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.13.0/PyQt5_gpl-5.13.0.tar.gz" list_url = "https://www.riverbankcomputing.com/software/pyqt/download5" ...
true
true
f70462794e04bd363c3d9166018d419774a06f8d
138
py
Python
test/fixtures.py
steinnes/pykubeks
20b52f5da2405ce8997a923d526e2e4833ce3c01
[ "Apache-2.0" ]
null
null
null
test/fixtures.py
steinnes/pykubeks
20b52f5da2405ce8997a923d526e2e4833ce3c01
[ "Apache-2.0" ]
2
2019-03-01T15:58:40.000Z
2019-03-04T11:07:24.000Z
test/fixtures.py
steinnes/pykubeks
20b52f5da2405ce8997a923d526e2e4833ce3c01
[ "Apache-2.0" ]
null
null
null
AUTHPLUGIN_FIXTURE = '{"kind":"ExecCredential","apiVersion":"client.authentication.k8s.io/v1alpha1","spec":{},"status":{"token":"test"}}'
69
137
0.710145
AUTHPLUGIN_FIXTURE = '{"kind":"ExecCredential","apiVersion":"client.authentication.k8s.io/v1alpha1","spec":{},"status":{"token":"test"}}'
true
true