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
1c296319654e1f84161a6b6ffeff5183a987e1c4
15,802
py
Python
superset/jinja_context.py
alihankocak/superset
8d0776491aef05f375c7359d11fc9ec04a53ec57
[ "Apache-2.0" ]
null
null
null
superset/jinja_context.py
alihankocak/superset
8d0776491aef05f375c7359d11fc9ec04a53ec57
[ "Apache-2.0" ]
null
null
null
superset/jinja_context.py
alihankocak/superset
8d0776491aef05f375c7359d11fc9ec04a53ec57
[ "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...
34.352174
90
0.646943
import json import re from functools import partial from typing import Any, Callable, cast, Dict, List, Optional, Tuple, TYPE_CHECKING from flask import current_app, g, request from flask_babel import gettext as _ from jinja2 import DebugUndefined from jinja2.sandbox import SandboxedEnvironment from s...
true
true
1c29636aae9375dc21814c26a4eaf2a35e73a50f
161
py
Python
simple_logger.py
soda92/ftp_upload_service
d087ffda7b2920329efac8292fa37731566c6984
[ "MIT" ]
null
null
null
simple_logger.py
soda92/ftp_upload_service
d087ffda7b2920329efac8292fa37731566c6984
[ "MIT" ]
null
null
null
simple_logger.py
soda92/ftp_upload_service
d087ffda7b2920329efac8292fa37731566c6984
[ "MIT" ]
null
null
null
import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logging.info("sdf")
32.2
85
0.602484
import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logging.info("sdf")
true
true
1c2963724712efc4c430269f4eeb69e21a55b217
1,623
py
Python
setup.py
bohan-amplitude/Amplitude-Python
8eb6e5242d77a84d6516dce96e8b8411e6fc1247
[ "MIT" ]
null
null
null
setup.py
bohan-amplitude/Amplitude-Python
8eb6e5242d77a84d6516dce96e8b8411e6fc1247
[ "MIT" ]
null
null
null
setup.py
bohan-amplitude/Amplitude-Python
8eb6e5242d77a84d6516dce96e8b8411e6fc1247
[ "MIT" ]
2
2022-03-31T21:40:43.000Z
2022-03-31T21:42:54.000Z
import sys from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() sys.path.insert(0, str(here / 'src')) from amplitude.constants import SDK_VERSION # Get the long description from the README file long_description = (here / "README.md").read_text(encoding="utf-8") s...
36.066667
93
0.664818
import sys from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() sys.path.insert(0, str(here / 'src')) from amplitude.constants import SDK_VERSION long_description = (here / "README.md").read_text(encoding="utf-8") setup( name="amplitude-analytics", versi...
true
true
1c2963ba8ddbe829c3a4ef63cef22a7b673900f3
237
py
Python
PhantomJS_Sample/phantom_example.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
PhantomJS_Sample/phantom_example.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
PhantomJS_Sample/phantom_example.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
from selenium import webdriver #executable_path 항목의 경로부분 앞에 꼭 r을 추가해야 한다. driver = webdriver.PhantomJS(executable_path=r'C:\phantomjs-2.1.1-windows\bin\phantomjs.exe') driver.get("http://www.naver.com") print(driver.title) driver.quit()
33.857143
93
0.780591
from selenium import webdriver driver = webdriver.PhantomJS(executable_path=r'C:\phantomjs-2.1.1-windows\bin\phantomjs.exe') driver.get("http://www.naver.com") print(driver.title) driver.quit()
true
true
1c29640d0b6577223cbbe4aff401eb8ead60eb4c
1,552
py
Python
merge/merge.py
AnSchwarzkopf/MergeIntervals
30d771fa3546016919969aa9adb39c0be6f014ac
[ "MIT" ]
null
null
null
merge/merge.py
AnSchwarzkopf/MergeIntervals
30d771fa3546016919969aa9adb39c0be6f014ac
[ "MIT" ]
null
null
null
merge/merge.py
AnSchwarzkopf/MergeIntervals
30d771fa3546016919969aa9adb39c0be6f014ac
[ "MIT" ]
null
null
null
# @Andreas Schwarzkopf (schwarzkopf.and@gmail.com) # standard library # using List to handle duplicates and order of the intervals and to define input/output of function from typing import List # example input [[25,30],[2,19],[14,23],4,8]] # Expected type for input and output are a List of Lists of Integers ...
44.342857
130
0.691366
from typing import List def mergeIntervals(intervals: List[List[int]]) -> List[List[int]]: mergedIntervals = [] if not isinstance(intervals, List): raise TypeError if not intervals: return [] intervals.sort(key=lambda x: x[0]) for interval i...
true
true
1c29645ed4ee1464c59e6701c954ef54fb85f6b0
3,368
py
Python
kimp_calc.py
owen151128/kimp_calc
8900cad1bb8871dba348258a2315a3d1c0348c4d
[ "Apache-2.0" ]
1
2021-05-28T04:15:38.000Z
2021-05-28T04:15:38.000Z
kimp_calc.py
owen151128/kimp_calc
8900cad1bb8871dba348258a2315a3d1c0348c4d
[ "Apache-2.0" ]
null
null
null
kimp_calc.py
owen151128/kimp_calc
8900cad1bb8871dba348258a2315a3d1c0348c4d
[ "Apache-2.0" ]
1
2022-03-22T21:55:31.000Z
2022-03-22T21:55:31.000Z
# -*- coding:utf8 -*- from rich.console import Console from rich.table import Table from rich.live import Live from time import sleep import requests import ccxt import pyupbit version = '1.0.0' headers = {'User-Agent': 'Mozilla/5.0 ' '(Macintosh; Intel Mac OS X 10_15_7) ' ...
42.632911
117
0.680523
from rich.console import Console from rich.table import Table from rich.live import Live from time import sleep import requests import ccxt import pyupbit version = '1.0.0' headers = {'User-Agent': 'Mozilla/5.0 ' '(Macintosh; Intel Mac OS X 10_15_7) ' 'AppleWebKit/...
true
true
1c296460c9e31b7636c6b712b5d15268a5ace7d8
2,417
py
Python
setup.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
setup.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
setup.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
#!/usr/bin/env python # # Copyright (C) 2003-2006 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE ...
38.365079
77
0.693008
import sys from distutils.core import setup version = '1.5.0' kwargs = { 'name' : 'dnspython', 'version' : version, 'description' : 'DNS toolkit', 'long_description' : \ """dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone...
true
true
1c2966b2b3d6c5ad00db52513056e6c66d4a98b1
381
py
Python
experiments/realdata/scripts/extract_subsam.py
Parsoa/SVSS
0f36b268b9a0bf83b4d909d4d485cf75f58f9401
[ "MIT" ]
null
null
null
experiments/realdata/scripts/extract_subsam.py
Parsoa/SVSS
0f36b268b9a0bf83b4d909d4d485cf75f58f9401
[ "MIT" ]
null
null
null
experiments/realdata/scripts/extract_subsam.py
Parsoa/SVSS
0f36b268b9a0bf83b4d909d4d485cf75f58f9401
[ "MIT" ]
null
null
null
import sys import pysam def main(): sampath = sys.argv[1] fpath = sys.argv[2] idxs = set() for line in open(fpath): idxs.add(line.strip('\n')) sam = pysam.AlignmentFile(sampath, 'r') print(sam.header, end='') for al in sam.fetch(): if al.query_name in idxs: pr...
18.142857
43
0.572178
import sys import pysam def main(): sampath = sys.argv[1] fpath = sys.argv[2] idxs = set() for line in open(fpath): idxs.add(line.strip('\n')) sam = pysam.AlignmentFile(sampath, 'r') print(sam.header, end='') for al in sam.fetch(): if al.query_name in idxs: pr...
true
true
1c296886c5b793096c817ea34a9d8244ea5f3175
71,417
py
Python
keras-ssd-master/data_generator/object_detection_2d_data_generator.py
dlsaavedra/Detector_GDXray
1e120f8fa548819eef1b86ccfbbe306b44405b6f
[ "MIT" ]
3
2021-05-27T07:27:44.000Z
2022-02-19T05:20:16.000Z
keras-ssd-master/data_generator/object_detection_2d_data_generator.py
dlsaavedra/Detector_GDXray
1e120f8fa548819eef1b86ccfbbe306b44405b6f
[ "MIT" ]
8
2020-09-25T22:34:27.000Z
2022-02-10T01:09:19.000Z
keras-ssd-master/data_generator/object_detection_2d_data_generator.py
dlsaavedra/Detector_GDXray
1e120f8fa548819eef1b86ccfbbe306b44405b6f
[ "MIT" ]
3
2020-03-18T20:27:18.000Z
2021-11-03T03:10:11.000Z
''' A data generator for 2D object detection. Copyright (C) 2018 Pierluigi Ferrari 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...
58.109845
211
0.578826
from __future__ import division import numpy as np import inspect from collections import defaultdict import warnings import sklearn.utils from copy import deepcopy from PIL import Image import cv2 import csv import os import sys from tqdm import tqdm, trange try: import h5py except ImportError: warnings.warn(...
true
true
1c2969c81f21d96b7a740e516fdd647185eba6a4
8,547
py
Python
tests/python/test_mpm88.py
mzmzm/taichi
39129820a922fdd936728d6feb7944ae208345a5
[ "MIT" ]
11,699
2020-01-09T03:02:46.000Z
2022-03-31T20:59:08.000Z
tests/python/test_mpm88.py
mzmzm/taichi
39129820a922fdd936728d6feb7944ae208345a5
[ "MIT" ]
3,589
2020-01-09T03:18:25.000Z
2022-03-31T19:06:42.000Z
tests/python/test_mpm88.py
mzmzm/taichi
39129820a922fdd936728d6feb7944ae208345a5
[ "MIT" ]
1,391
2020-01-09T03:02:54.000Z
2022-03-31T08:44:29.000Z
import os import pytest import taichi as ti from taichi import approx def run_mpm88_test(): dim = 2 N = 64 n_particles = N * N n_grid = 128 dx = 1 / n_grid inv_dx = 1 / dx dt = 2.0e-4 p_vol = (dx * 0.5)**2 p_rho = 1 p_mass = p_vol * p_rho E = 400 x = ti.Vector.field(...
35.46473
78
0.468234
import os import pytest import taichi as ti from taichi import approx def run_mpm88_test(): dim = 2 N = 64 n_particles = N * N n_grid = 128 dx = 1 / n_grid inv_dx = 1 / dx dt = 2.0e-4 p_vol = (dx * 0.5)**2 p_rho = 1 p_mass = p_vol * p_rho E = 400 x = ti.Vector.field(...
true
true
1c296a68f364078e70e7ea9462ad9201eb4ecef5
198
py
Python
src/checkPalindrome/200202_selftest.py
kasimte/coding-challenges
975506a7257ad0d2d234a7856006472b79ebfdc3
[ "MIT" ]
null
null
null
src/checkPalindrome/200202_selftest.py
kasimte/coding-challenges
975506a7257ad0d2d234a7856006472b79ebfdc3
[ "MIT" ]
null
null
null
src/checkPalindrome/200202_selftest.py
kasimte/coding-challenges
975506a7257ad0d2d234a7856006472b79ebfdc3
[ "MIT" ]
null
null
null
def checkPalindrome(inputString): return inputString == inputString[::-1] print(checkPalindrome("aabaa")) # True print(checkPalindrome("010110")) # False print(checkPalindrome("ab3ba")) # True
28.285714
43
0.742424
def checkPalindrome(inputString): return inputString == inputString[::-1] print(checkPalindrome("aabaa")) print(checkPalindrome("010110")) print(checkPalindrome("ab3ba"))
true
true
1c296ae42ec35d10bf0b1f6703f926fca28d11ea
2,773
py
Python
scons-local-1.1.0/SCons/Tool/pdflatex.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
scons-local-1.1.0/SCons/Tool/pdflatex.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
scons-local-1.1.0/SCons/Tool/pdflatex.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
"""SCons.Tool.pdflatex Tool-specific initialization for pdflatex. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation # # Per...
36.486842
89
0.73855
__revision__ = "src/engine/SCons/Tool/pdflatex.py 3603 2008/10/10 05:46:45 scons" import SCons.Action import SCons.Util import SCons.Tool.pdf import SCons.Tool.tex PDFLaTeXAction = None def PDFLaTeXAuxFunction(target = None, source= None, env=None): result = SCons.Tool.tex.InternalLaTeXAu...
true
true
1c296b00a260c7a1ccf92333c7050a8726f95e30
4,157
py
Python
cornbread/__main__.py
tomislacker/cornbread
160a2733a516154ac6831798d40d405de0f10ff8
[ "Apache-2.0" ]
1
2017-06-07T23:05:50.000Z
2017-06-07T23:05:50.000Z
cornbread/__main__.py
tomislacker/cornbread
160a2733a516154ac6831798d40d405de0f10ff8
[ "Apache-2.0" ]
null
null
null
cornbread/__main__.py
tomislacker/cornbread
160a2733a516154ac6831798d40d405de0f10ff8
[ "Apache-2.0" ]
null
null
null
""" cornbread - Daemon to track your window focus Usage: cornbread daemon [options] cornbread process [options] Options: -h, --help See this dialogue -l, --log-level=L Logging module level [default: debug] -v, --version See program version """ import logging import time from queue...
27.713333
76
0.605725
import logging import time from queue import Queue from threading import Condition from threading import Thread from . import __version__ from .xorg import FocusedWindow from .xorg import FocusedWindowWatcher log = logging.getLogger("cornbread") class ObjectBuffer(object): def __init__(self): self.cond...
true
true
1c296badaae805dc980f7b2b556029e186852ea7
3,726
py
Python
running_times/time_coxcc.py
georgehc/dksa
bcd9eab6c9ded47f5b166cf1351b06e26e0c8f90
[ "MIT" ]
8
2020-07-31T00:46:32.000Z
2021-12-07T08:16:00.000Z
running_times/time_coxcc.py
georgehc/dksa
bcd9eab6c9ded47f5b166cf1351b06e26e0c8f90
[ "MIT" ]
1
2021-01-21T15:30:44.000Z
2021-01-22T17:52:02.000Z
running_times/time_coxcc.py
georgehc/dksa
bcd9eab6c9ded47f5b166cf1351b06e26e0c8f90
[ "MIT" ]
1
2021-01-21T12:37:23.000Z
2021-01-21T12:37:23.000Z
#!/usr/bin/env python import ast import configparser import os os.environ['QT_QPA_PLATFORM'] = 'offscreen' import pickle import sys sys.path.insert(1, os.path.dirname(sys.path[0])) __package__ = 'running_times' import numpy as np survival_estimator_name = 'coxcc' if not (len(sys.argv) == 2 and os.path.isfile(sys.ar...
36.529412
79
0.612453
import ast import configparser import os os.environ['QT_QPA_PLATFORM'] = 'offscreen' import pickle import sys sys.path.insert(1, os.path.dirname(sys.path[0])) __package__ = 'running_times' import numpy as np survival_estimator_name = 'coxcc' if not (len(sys.argv) == 2 and os.path.isfile(sys.argv[1])): print('U...
true
true
1c296c0bec2050515836b7494975f337426c74f1
35,080
py
Python
hue.py
TWoolhouse/Libraries
26079ed387cb800cb97f20980720ae094008c7bf
[ "MIT" ]
1
2020-10-11T15:34:56.000Z
2020-10-11T15:34:56.000Z
hue.py
TWoolhouse/Libraries
26079ed387cb800cb97f20980720ae094008c7bf
[ "MIT" ]
null
null
null
hue.py
TWoolhouse/Libraries
26079ed387cb800cb97f20980720ae094008c7bf
[ "MIT" ]
null
null
null
import enum import json import asyncio import datetime import http.client import urllib.request from bitfield import BitField from interface import Interface from collections import defaultdict from typing import Iterable, Union, Any def Address(obj) -> str: if isinstance(obj, type): # Root return { ...
39.151786
339
0.552395
import enum import json import asyncio import datetime import http.client import urllib.request from bitfield import BitField from interface import Interface from collections import defaultdict from typing import Iterable, Union, Any def Address(obj) -> str: if isinstance(obj, type): return { ...
true
true
1c296c519ea59d6b7f47e29e3615169082772789
9,544
py
Python
tests/providers/google/cloud/operators/test_datafusion.py
troywinter/airflow
ba66ba0d97941c55d9f00f66329a9d3c7ad673e7
[ "Apache-2.0" ]
1
2019-05-07T06:46:55.000Z
2019-05-07T06:46:55.000Z
tests/providers/google/cloud/operators/test_datafusion.py
troywinter/airflow
ba66ba0d97941c55d9f00f66329a9d3c7ad673e7
[ "Apache-2.0" ]
37
2020-07-21T07:50:02.000Z
2022-03-29T22:31:28.000Z
tests/providers/google/cloud/operators/test_datafusion.py
vuppalli/airflow
dfe8337ca2d3ed173d9ecc112938271519792c40
[ "Apache-2.0" ]
2
2020-03-08T14:12:55.000Z
2020-06-10T10:17:32.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.879699
88
0.685562
import mock from airflow import DAG from airflow.providers.google.cloud.operators.datafusion import ( CloudDataFusionCreateInstanceOperator, CloudDataFusionCreatePipelineOperator, CloudDataFusionDeleteInstanceOperator, CloudDataFusionDeletePipelineOperator, CloudDataFusionGetInstanceOperat...
true
true
1c296d319c64003939a24110eb6d1a89936d3ed2
741
py
Python
darts/base_actions/ActionStack.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
darts/base_actions/ActionStack.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
darts/base_actions/ActionStack.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
from typing import List, Sequence from .Action import Action from .ActionList import ActionList class ActionStack: def __init__(self): self.actions: List[Action] = [] def append(self, action: Action) -> None: """Append action to the stack.""" self.actions.append(action) def exte...
26.464286
71
0.618084
from typing import List, Sequence from .Action import Action from .ActionList import ActionList class ActionStack: def __init__(self): self.actions: List[Action] = [] def append(self, action: Action) -> None: self.actions.append(action) def extend(self, actions: Sequence[Action]) -> Non...
true
true
1c296de61cff9e8bba2f875987501871a2ee9cc7
30
py
Python
flot/models/__init__.py
Yang-L1/FLOT
92a96cbdba684cffff5529d9eb09a506216900f4
[ "Apache-2.0" ]
71
2020-07-20T16:50:42.000Z
2022-03-24T05:13:56.000Z
flot/models/__init__.py
Yang-L1/FLOT
92a96cbdba684cffff5529d9eb09a506216900f4
[ "Apache-2.0" ]
4
2020-08-14T07:41:38.000Z
2021-06-17T02:46:37.000Z
flot/models/__init__.py
Yang-L1/FLOT
92a96cbdba684cffff5529d9eb09a506216900f4
[ "Apache-2.0" ]
9
2020-07-23T01:25:20.000Z
2022-01-20T08:16:44.000Z
from .scene_flow import FLOT
15
29
0.8
from .scene_flow import FLOT
true
true
1c296ef1270e30744b8f8e9ca7425ed4af29fa11
2,187
py
Python
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
src/model/window.py
alanludke/computer_graphics
37188307b21c7fca165b73826fa050fc885b4a39
[ "MIT" ]
null
null
null
from src.model.point import Point from src.utils.object import GraphicObject from PyQt5.QtGui import QColor, QPainter, QPen class Window: def __init__(self, w_center, width, height): self.type_object = "window" self.origin = Point("origin", 0.5, 0.5, 1) self.w_center_position = Point("w_ce...
31.695652
96
0.575674
from src.model.point import Point from src.utils.object import GraphicObject from PyQt5.QtGui import QColor, QPainter, QPen class Window: def __init__(self, w_center, width, height): self.type_object = "window" self.origin = Point("origin", 0.5, 0.5, 1) self.w_center_position = Point("w_ce...
true
true
1c296f9c8091cc7bd5598e4c1f092e521ee76ee5
1,787
py
Python
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
null
null
null
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
1
2022-01-21T09:45:21.000Z
2022-01-21T12:10:25.000Z
setup.py
MBPhys/Label-Creator
a50936c91ceeea2deb1b3b4b77464e009b6fbaa3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs from setuptools import setup, find_packages def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() # Add your dependencies in requirements.txt # Note: you can ad...
30.288136
105
0.642417
import os import codecs from setuptools import setup, find_packages def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() requirements = [] with open('requirements.txt') as f: for line in f: stripped = line.split("...
true
true
1c296fb9b021fbc61c0e665d797ae6e8713439fc
3,498
py
Python
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
45.428571
104
0.702115
from http import HTTPStatus import requests from azext_ai_did_you_mean_this._cmd_table import CommandTable from azext_ai_did_you_mean_this.custom import ( call_aladdin_service, get_recommendations_from_http_response) from azext_ai_did_you_mean_this.tests.latest.aladdin_scenario_test_base import \ Aladdin...
true
true
1c2970bd3ab1d791f286d53b34e37f4a39dead1e
7,010
py
Python
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
sockets.py
bqi1/CMPUT404-assignment-websockets
79a7859992599e957c40c9ffeb8ed3448599ec99
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2013-2014 Abram Hindle # 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 b...
33.54067
132
0.63067
import flask from flask import Flask, request, redirect, jsonify from flask_sockets import Sockets import gevent from gevent import queue import time import json import os app = Flask(__name__) sockets = Sockets(app) app.debug = True class World: def __init__(self): self.clear() ...
true
true
1c2970ce1efb2cb1317b5c2b49381a674c72370c
3,058
py
Python
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
8,027
2015-01-02T05:31:44.000Z
2022-03-31T07:08:09.000Z
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
2,355
2015-01-01T15:30:53.000Z
2022-03-30T20:21:16.000Z
test/com/facebook/buck/android/testdata/android_project/test_runner.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
1,280
2015-01-09T03:29:04.000Z
2022-03-30T15:14:14.000Z
#!/usr/bin/env python2.7 import json import os import re import sys from pprint import pformat, pprint """ This is an external test runner for integration tests that checks the command arguments passed to external test runners. Right now it checks the following arguments: - "-Dbuck.robolectric_res_directories", whi...
31.204082
98
0.721387
import json import os import re import sys from pprint import pformat, pprint def read_command_arguments_from_spec_file(spec_file): with open(spec_file) as data_file: data = json.load(data_file) return data[0]["command"] def get_robolectric_res_directories(command_args): return find_key_in_...
true
true
1c2972135cde0ca21444ee9c1d6d7e42b5c7cafb
855
py
Python
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
OAuth2DjangoSampleApp/urls.py
VT-Zhang/IntuitPayment
b588603b01d7432b6dd3559a174ac9796adc2cdd
[ "Apache-2.0" ]
null
null
null
"""OAuth2DjangoSampleApp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
35.625
79
0.708772
from django.conf.urls import include,url from django.contrib import admin urlpatterns = [ url(r'^(?i)sampleAppOAuth2', include('sampleAppOAuth2.urls')), url(r'^(?i)admin/', admin.site.urls), ]
true
true
1c2972e07b9d557b7d1250a587f21850cc680346
6,203
py
Python
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
13
2021-11-08T02:05:59.000Z
2022-03-29T22:38:45.000Z
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
2
2022-01-15T01:31:58.000Z
2022-03-12T02:36:41.000Z
predict.py
coleygroup/Graph2SMILES
1b87f9ffdb739346b94853dfe8e5d63ac0198a38
[ "MIT" ]
3
2021-11-08T03:42:14.000Z
2022-01-05T08:23:55.000Z
import argparse import logging import numpy as np import os import sys import torch from models.graph2seq_series_rel import Graph2SeqSeriesRel from models.seq2seq import Seq2Seq from torch.utils.data import DataLoader from utils import parsing from utils.data_utils import canonicalize_smiles, load_vocab, S2SDataset, G2...
36.488235
95
0.589876
import argparse import logging import numpy as np import os import sys import torch from models.graph2seq_series_rel import Graph2SeqSeriesRel from models.seq2seq import Seq2Seq from torch.utils.data import DataLoader from utils import parsing from utils.data_utils import canonicalize_smiles, load_vocab, S2SDataset, G2...
true
true
1c2973145e8bcafaa4825ff11792d86abb27b794
985
py
Python
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/iam/policies/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 Google Inc. 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 requir...
31.774194
74
0.764467
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base @base.ReleaseTracks(base.ReleaseTrack.ALPHA) class Policies(base.Group):
true
true
1c2973d2be709e96b6f62a8d0eea5c956361bc47
2,818
py
Python
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
1
2021-08-29T03:34:30.000Z
2021-08-29T03:34:30.000Z
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
null
null
null
server/core/serializers.py
webclinic017/trading-bot-1
c567b1d865a88aa025e589b8c403cc7749ab52ad
[ "MIT" ]
1
2021-08-16T22:33:24.000Z
2021-08-16T22:33:24.000Z
from assets.models import Asset from rest_framework import serializers from users.models import User from users.serializers import UserSerializer from .models import Strategy class StrategySerializer(serializers.ModelSerializer): """Serializer for listing/retrieving a user strategy.""" user = UserSerializer...
29.663158
80
0.570263
from assets.models import Asset from rest_framework import serializers from users.models import User from users.serializers import UserSerializer from .models import Strategy class StrategySerializer(serializers.ModelSerializer): user = UserSerializer(fields=("id", "first_name", "last_name")) asset = serial...
true
true
1c2974095646c30b10f4961afa734c8d388cf267
7,191
py
Python
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
null
null
null
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
null
null
null
intake_hypothetic/hypothetic.py
informatics-lab/intake-hypothetic
6ebc8b800aac4caa37820e2a5d1a01346fb65ecd
[ "BSD-2-Clause" ]
1
2021-04-10T23:57:51.000Z
2021-04-10T23:57:51.000Z
from datetime import datetime, timedelta import importlib import itertools import warnings import urllib import iris import iris_hypothetic import pandas as pd import numpy as np import tempfile import boto3 from botocore.handlers import disable_signing from intake.source.base import DataSource, Schema from . import...
34.907767
176
0.633431
from datetime import datetime, timedelta import importlib import itertools import warnings import urllib import iris import iris_hypothetic import pandas as pd import numpy as np import tempfile import boto3 from botocore.handlers import disable_signing from intake.source.base import DataSource, Schema from . import...
true
true
1c29754cd09e6e38b14eb2c80136edcbb80dca20
5,576
py
Python
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
main.py
wgoulet/ChiArtInstituteBrowser
bed86ccc3daa6effd3981e87a62b60b00e1dcb41
[ "MIT" ]
null
null
null
import os import subprocess import requests import pprint import time import json import urllib.parse import csv from PIL import Image import re import math import moviepy.editor import moviepy.Clip import mutagen import ffmpeg import sys def main(argv): print ("hello world") pprint.pprint(argv) artist = "...
33.590361
113
0.47023
import os import subprocess import requests import pprint import time import json import urllib.parse import csv from PIL import Image import re import math import moviepy.editor import moviepy.Clip import mutagen import ffmpeg import sys def main(argv): print ("hello world") pprint.pprint(argv) artist = "...
true
true
1c2975e41d6f59fa071124a5934b78c9367cdf9b
3,511
py
Python
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
1
2021-11-13T01:30:34.000Z
2021-11-13T01:30:34.000Z
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
null
null
null
to_do_list/tasks/tests/test_forms.py
arnaudblois/to_do_list
07a9e443110d14271a59bd8ff1a2f55ac753ea9d
[ "MIT" ]
null
null
null
from test_plus.test import TestCase from ..forms import ProfileForm, UserUpdateForm, UserProfileForm from to_do_list.tasks.tests.factories import TaskFactory, ProfileFactory, TeamFactory from to_do_list.users.tests.factories import UserFactory class TestProfileForm(TestCase): def setUp(self): UserFactory...
33.122642
95
0.616918
from test_plus.test import TestCase from ..forms import ProfileForm, UserUpdateForm, UserProfileForm from to_do_list.tasks.tests.factories import TaskFactory, ProfileFactory, TeamFactory from to_do_list.users.tests.factories import UserFactory class TestProfileForm(TestCase): def setUp(self): UserFactory...
true
true
1c297620523b1959ea805f260d406d29fe5a7e29
25,433
py
Python
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/desktopvirtualization/azext_desktopvirtualization/vendored_sdks/desktopvirtualization/aio/operations_async/_host_pool_operations_async.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.173038
480
0.678607
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import Pipeli...
true
true
1c2976302fea31d3f377e5dd0e1cee1e38d44c7d
27,420
py
Python
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/engine/test_rules.py
SergeKireev/pants
cd92c65aeb3dfdcee3e0946f2b68a301ef2f4541
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re import sys import unittest from dataclasses import dataclass from textwrap import dedent from pants.engine.build_files import create_graph_rules from pants.engine.console import...
30.165017
155
0.527243
import re import sys import unittest from dataclasses import dataclass from textwrap import dedent from pants.engine.build_files import create_graph_rules from pants.engine.console import Console from pants.engine.fs import create_fs_rules from pants.engine.goal import Goal from pants.engine.mapper import AddressMa...
true
true
1c29775e42a65603f1c9778f9c7b42fbc4da91f8
985
py
Python
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
setup.py
kapoorlab/FAQT
2f3bc0574a350341988987ca3beb7bcf68203b6c
[ "MIT" ]
null
null
null
import setuptools from setuptools import find_packages, setup with open('README.md') as f: long_description = f.read() setup( name="faqt", version='0.0.1', author='Varun Kapoor,Blanco Obregon Dalmiro,Laura Boulan', author_email='randomaccessiblekapoor@gmail.com', url='https://github.com/kapo...
26.621622
62
0.627411
import setuptools from setuptools import find_packages, setup with open('README.md') as f: long_description = f.read() setup( name="faqt", version='0.0.1', author='Varun Kapoor,Blanco Obregon Dalmiro,Laura Boulan', author_email='randomaccessiblekapoor@gmail.com', url='https://github.com/kapo...
true
true
1c29779caac0c3295123139d66fd444935447eab
10,930
py
Python
openpeerpower/components/broadlink/config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/broadlink/config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/broadlink/config_flow.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Config flow for Broadlink devices.""" import errno from functools import partial import logging import socket import broadlink as blk from broadlink.exceptions import ( AuthenticationError, BroadlinkException, NetworkTimeoutError, ) import voluptuous as vol from openpeerpower import config_entries, dat...
34.698413
87
0.574565
import errno from functools import partial import logging import socket import broadlink as blk from broadlink.exceptions import ( AuthenticationError, BroadlinkException, NetworkTimeoutError, ) import voluptuous as vol from openpeerpower import config_entries, data_entry_flow from openpeerpower.component...
true
true
1c2977d70ab998d69add73019a920a769418c5a0
8,781
py
Python
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/user_registration/core.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2014 Universidad Politecnica de Madrid # # 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 la...
35.550607
88
0.65972
from __future__ import absolute_import import abc import datetime import six import uuid from keystone import exception from keystone import notifications from keystone.common import dependency from keystone.common import extension from keystone.common import manager from keystone.openstack.common impor...
true
true
1c29783378ba1d13e6ed6f0e82d3088348c98350
1,314
py
Python
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
gcn_test/cora.py
lmb633/gnn
98289d32f4be88a10714f1ac3bd0539e8cbc221f
[ "MIT" ]
null
null
null
import os.path as osp from torch_geometric.datasets import Planetoid from torch_geometric.data import NeighborSampler import torch_geometric.transforms as T from gcn_test.models import GCNNet import torch from torch import nn import numpy as np embedding = 16 lr = 0.001 epoch = 300 dataset = 'Cora' path...
26.816327
113
0.683409
import os.path as osp from torch_geometric.datasets import Planetoid from torch_geometric.data import NeighborSampler import torch_geometric.transforms as T from gcn_test.models import GCNNet import torch from torch import nn import numpy as np embedding = 16 lr = 0.001 epoch = 300 dataset = 'Cora' path...
true
true
1c29795ca24db6e46e8e39c06d0a5b049e208751
937
py
Python
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
web/app/sapl/app/config.py
fumiya-kubota/sapl
1b1f58e9d1dcb5ba913cfc11820d3465cfb45525
[ "Apache-2.0" ]
null
null
null
import os class BaseConfig: DATABASE_URI = '' REDIS_HOST = '' REDIS_PORT = 0 class DevelopmentConfig(BaseConfig): DATABASE_SERVER = 'postgresql+asyncpg://sapl@127.0.0.1:5432' DATABASE_NAME = 'sapl' REDIS_HOST = '127.0.0.1' REDIS_PORT = 16379 class ProductionConfig(BaseConfig): DATA...
24.025641
69
0.689434
import os class BaseConfig: DATABASE_URI = '' REDIS_HOST = '' REDIS_PORT = 0 class DevelopmentConfig(BaseConfig): DATABASE_SERVER = 'postgresql+asyncpg://sapl@127.0.0.1:5432' DATABASE_NAME = 'sapl' REDIS_HOST = '127.0.0.1' REDIS_PORT = 16379 class ProductionConfig(BaseConfig): DATA...
true
true
1c29798635d284b0b0474b62aff15c3cdf76896f
5,294
py
Python
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
doc/source/ray-core/examples/lbfgs/driver.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import numpy as np import os import scipy.optimize import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import ray import ray.experimental.tf_utils class LinearModel(object): """Simple class for a one layer neural network. Note that this code does not initialize the network we...
36.510345
82
0.657348
import numpy as np import os import scipy.optimize import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import ray import ray.experimental.tf_utils class LinearModel(object): def __init__(self, shape): x = tf.placeholder(tf.float32, [None, shape[0]]) w = tf.Variabl...
true
true
1c297b323b22d04ab0738a77cb457c4600fe7e89
5,189
py
Python
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
1
2020-06-19T01:49:39.000Z
2020-06-19T01:49:39.000Z
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
5
2020-03-24T18:14:50.000Z
2022-03-02T06:56:50.000Z
h/tweens.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import collections import logging from codecs import open from pkg_resources import resource_filename from pyramid import httpexceptions from pyramid.util import DottedNameResolver from h.util.redirects import lookup as lookup_redirects from h.util.redirects import parse as parse_redirects lo...
35.29932
119
0.683754
import collections import logging from codecs import open from pkg_resources import resource_filename from pyramid import httpexceptions from pyramid.util import DottedNameResolver from h.util.redirects import lookup as lookup_redirects from h.util.redirects import parse as parse_redirects log = logging.getLogger(_...
true
true
1c297bd2b09c2317db748b29f27f84515e88e03e
42
py
Python
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
2
2020-04-08T23:54:04.000Z
2020-08-01T01:37:00.000Z
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
76
2019-10-16T01:10:39.000Z
2022-03-29T14:12:29.000Z
mati/version.py
cuenca-mx/mati-python
0f87f583ad923dd06011532af75c94045fe20f75
[ "MIT" ]
1
2020-01-29T21:01:46.000Z
2020-01-29T21:01:46.000Z
__version__ = '0.3.1' # pragma: no cover
21
41
0.642857
__version__ = '0.3.1'
true
true
1c297c702caf8ac4580956cb5bfe297237bf5bce
9,620
py
Python
bot/cogs/setup_bot.py
lsglucas/DiscordMackBot
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
5
2020-09-06T00:45:04.000Z
2020-10-14T18:43:56.000Z
bot/cogs/setup_bot.py
lsglucas/MoodleV
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
8
2021-09-02T00:41:51.000Z
2022-02-14T14:08:33.000Z
bot/cogs/setup_bot.py
lsglucas/DiscordMackBot
70bbced34c5e561a595b901c719f309f7cfc1c0a
[ "MIT" ]
2
2020-09-06T00:45:09.000Z
2020-09-06T00:45:37.000Z
import discord import asyncio from discord.ext.commands import Cog, command from discord.ext.commands.core import has_permissions from discord import Embed from utilities import ( main_messages_style, timeout_message, positive_emojis_list, negative_emojis_list, footer, defaultcolor, ) from sec...
31.437908
160
0.568295
import discord import asyncio from discord.ext.commands import Cog, command from discord.ext.commands.core import has_permissions from discord import Embed from utilities import ( main_messages_style, timeout_message, positive_emojis_list, negative_emojis_list, footer, defaultcolor, ) from sec...
true
true
1c297c8064f33f328c3b86a48818a0e5c4ce8af9
13,712
py
Python
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
26
2020-05-29T16:11:56.000Z
2022-03-24T19:56:45.000Z
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
10
2020-07-18T04:12:04.000Z
2022-02-10T01:53:42.000Z
4. Evaluate/pascalvoc.py
Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3
6503d029b3e3a7da5c373ca500777cc38d49d54b
[ "MIT" ]
7
2020-06-08T12:20:28.000Z
2021-01-17T12:57:26.000Z
########################################################################################### # # # This sample shows how to evaluate object detections applying the following metrics: # # * Precision x Recall curve ----> ...
36.860215
99
0.599475
er) is False: errors.append('folder %s not found' % detFolder) if args.savePath is not None: savePath = os.path.join(currentPath, args.savePath) else: savePath = os.path.join(currentPath, 'results') if not os.path.exists(savePath): os.makedirs(savePath) if len(errors) != 0: print("""usa...
true
true
1c297e2b1c3d84e46d805713ff276ba6620d2b82
12,292
py
Python
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
205
2015-01-20T08:26:09.000Z
2022-03-27T19:59:33.000Z
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
249
2015-02-10T09:56:35.000Z
2022-03-23T19:54:36.000Z
modules/templates/historic/RW/controllers.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
231
2015-02-10T09:33:17.000Z
2022-02-18T19:56:05.000Z
# -*- coding: utf-8 -*- import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.http import redirect from s3 import FS, ICON, S3CustomController from s3theme import formstyle_foundation_inline THEME = "historic.RW" # =========================...
36.366864
118
0.489261
import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.http import redirect from s3 import FS, ICON, S3CustomController from s3theme import formstyle_foundation_inline THEME = "historic.RW" class index(S3CustomController): def __call_...
true
true
1c297f3e2ada36b66c372efd4cf53df350c19e7a
19,662
py
Python
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
2
2019-12-31T14:22:54.000Z
2019-12-31T14:23:42.000Z
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/groupby/aggregate/test_other.py
krey/pandas
4a51a4e0cff0111856ef3888ec41c2cfd65210c5
[ "BSD-3-Clause" ]
null
null
null
""" test all other .agg behavior """ from collections import OrderedDict import datetime as dt from functools import partial import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, PeriodIndex, Series, date_range, period_range, ) from pandas...
30.578538
96
0.543078
from collections import OrderedDict import datetime as dt from functools import partial import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, PeriodIndex, Series, date_range, period_range, ) from pandas.core.base import SpecificationError ...
true
true
1c297f3ff993416454b3b84066d11bccaf513d4f
218
py
Python
facein_api/settings/databases.py
gda2048/facein-backend
01a8500ffcdaef91540b0cdf94d50dd64cb46276
[ "MIT" ]
1
2021-12-27T12:35:06.000Z
2021-12-27T12:35:06.000Z
facein_api/settings/databases.py
Sirkirill/facetracker-backend
462dff11e7dccc379a6e04250b121120ec954c8d
[ "MIT" ]
10
2021-06-07T16:41:35.000Z
2022-03-12T01:04:23.000Z
facein_api/settings/databases.py
gda2048/facein-backend
01a8500ffcdaef91540b0cdf94d50dd64cb46276
[ "MIT" ]
null
null
null
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases import dj_database_url from decouple import config DATABASES = { 'default': dj_database_url.config( default=config('DATABASE_URL') ), }
19.818182
63
0.715596
_database_url from decouple import config DATABASES = { 'default': dj_database_url.config( default=config('DATABASE_URL') ), }
true
true
1c297f7612200b7ec237b8bc59870554869c5eb2
892
py
Python
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
PyDPriv/DPMechanism/BaseMechanism.py
xymeng16/PyDPriv
1516e82fac4c3a9a697e623a6502fa761333355e
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod class BaseMechanism(ABC): """ Base class for all DP mechanisms, abstracted. """ def __init__(self): self._eps = None self._delta = None self._type = None @abstractmethod def noisy(self, val): return NotImplemented @abstr...
23.473684
84
0.588565
from abc import ABC, abstractmethod class BaseMechanism(ABC): def __init__(self): self._eps = None self._delta = None self._type = None @abstractmethod def noisy(self, val): return NotImplemented @abstractmethod def var(self, val): return NotImplemented ...
true
true
1c297f9558012f9ab06dba2c75f4bc82b04d91b2
7,321
py
Python
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
214
2017-02-06T17:52:18.000Z
2022-02-14T08:42:34.000Z
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
447
2016-12-16T11:33:43.000Z
2022-02-25T10:44:14.000Z
hydrus/data/db_models.py
Dhairya3124/hydrus
4c737d9f7df08c705cef5a30536b871fd0a83728
[ "MIT" ]
233
2017-05-30T08:33:05.000Z
2022-03-04T12:05:17.000Z
"""Models for Hydra Classes.""" import datetime import uuid from sqlite3 import Connection as SQLite3Connection from typing import Any from sqlalchemy import ( Column, DateTime, ForeignKey, Integer, Float, String, create_engine, event, ) from sqlalchemy.engine import Engine from sqlalc...
32.251101
89
0.60866
import datetime import uuid from sqlite3 import Connection as SQLite3Connection from typing import Any from sqlalchemy import ( Column, DateTime, ForeignKey, Integer, Float, String, create_engine, event, ) from sqlalchemy.engine import Engine from sqlalchemy.ext.declarative import decl...
true
true
1c297febe0a3ab0a7dd8bb4713c6a5143759aee1
1,195
py
Python
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
src/utils/allutills.py
sandeepjena7/Ricefield
06227b41708d990e62c9bd1aebb820e6d246e01d
[ "MIT" ]
null
null
null
import yaml from pathlib import Path from typing import Optional,Dict,List,TypeVar import os import time import io import logging __all__ = ['Read_Yaml','Create_Dir',"Unique_Filename"] keras_model = TypeVar('keras_model') keras_summary = TypeVar('keras_summary') def Read_Yaml(config:Optional[Path]) -> Dict[str,any] :...
24.387755
75
0.699582
import yaml from pathlib import Path from typing import Optional,Dict,List,TypeVar import os import time import io import logging __all__ = ['Read_Yaml','Create_Dir',"Unique_Filename"] keras_model = TypeVar('keras_model') keras_summary = TypeVar('keras_summary') def Read_Yaml(config:Optional[Path]) -> Dict[str,any] :...
true
true
1c29800226945ba6350ff87d0c3b8f49544b15af
12,476
py
Python
saleor/order/notifications.py
Kibria7533/saleor
d72f5bff9afeab13d2e2e09c9a32a964bfd9476d
[ "CC-BY-4.0" ]
2
2021-05-16T13:46:07.000Z
2021-05-16T13:49:21.000Z
saleor/order/notifications.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
1
2021-06-24T03:23:56.000Z
2021-06-24T03:23:56.000Z
saleor/order/notifications.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
1
2021-06-18T10:18:48.000Z
2021-06-18T10:18:48.000Z
from typing import TYPE_CHECKING, Iterable, List, Optional from urllib.parse import urlencode from django.forms import model_to_dict from ..account.models import StaffNotificationRecipient from ..core.notifications import get_site_context from ..core.notify_events import NotifyEventType from ..core.utils.url import p...
34.946779
88
0.670968
from typing import TYPE_CHECKING, Iterable, List, Optional from urllib.parse import urlencode from django.forms import model_to_dict from ..account.models import StaffNotificationRecipient from ..core.notifications import get_site_context from ..core.notify_events import NotifyEventType from ..core.utils.url import p...
true
true
1c2980eafb137d6d8cd51ee90fe0c4819e354db1
2,578
py
Python
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
2
2018-10-02T15:47:45.000Z
2018-10-02T15:50:55.000Z
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
null
null
null
lib/bin/jwdecrypt.py
uetopia/metagame
4f48418e5a8e691698ff347370ef1447021b9a4f
[ "Apache-2.0" ]
null
null
null
#!/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python import sys __author__ = 'rohe0002' import argparse import requests from jwkest.jwk import load_jwks_from_url, RSAKey from jwkest.jwk import rsa_load from jwkest.jwk import load_x509_cert from jwkest.jwk import load_jwks fro...
32.632911
94
0.616757
import sys __author__ = 'rohe0002' import argparse import requests from jwkest.jwk import load_jwks_from_url, RSAKey from jwkest.jwk import rsa_load from jwkest.jwk import load_x509_cert from jwkest.jwk import load_jwks from jwkest.jwk import import_rsa_key_from_file from jwkest.jwe import JWE def assign(lst): ...
true
true
1c29841f86b5329f965fa144d327f5a90226d320
2,243
py
Python
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
7
2020-09-24T22:38:01.000Z
2021-07-14T15:58:35.000Z
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
9
2021-02-08T20:51:18.000Z
2021-09-23T23:27:38.000Z
Tests/scripts/hook_validations/tests/conf_test.py
vibhuabharadwaj/content
30d639dbea0015536a3040ec18f93e50322bded0
[ "MIT" ]
2
2020-12-08T17:03:33.000Z
2021-07-13T18:32:06.000Z
from Tests.scripts.hook_validations.conf_json import ConfJsonValidator WITH_DESCRIPTION = { "test": "description" } MISSING_DESCRIPTION = { "test": "", "test2": "description" } TESTS_SECTION = [ { "playbookID": "siri" }, { "playbookID": "alexa" } ] def test_conf_json_desc...
27.691358
100
0.720909
from Tests.scripts.hook_validations.conf_json import ConfJsonValidator WITH_DESCRIPTION = { "test": "description" } MISSING_DESCRIPTION = { "test": "", "test2": "description" } TESTS_SECTION = [ { "playbookID": "siri" }, { "playbookID": "alexa" } ] def test_conf_json_desc...
true
true
1c2984e3fec5140bc3ea95e242b52cac8273d79c
3,511
py
Python
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/ansible_collections/cisco/ise/plugins/modules/network_access_dictionary.py
saeedya/docker-ansible
6fb0cfc6bc4a5925b21380952a5a4502ec02119a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: network_access_dictionary short_description: Resource module for Network Access Dictionary description: - Manage o...
24.552448
92
0.642267
DOCUMENTATION = r""" --- module: network_access_dictionary short_description: Resource module for Network Access Dictionary description: - Manage operations create, update and delete of the resource Network Access Dictionary. version_added: '1.0.0' extends_documentation_fragment: - cisco.ise.module author: Rafa...
true
true
1c298595a2511a3f9a684895c84f1e82099272b7
3,251
py
Python
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
magnum/tests/fakes.py
ISCAS-VDI/magnum-base
5bb88e12b3e5d665ae1b345b62023d1016217e08
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34.585106
76
0.567518
import mock fakeAuthTokenHeaders = {'X-User-Id': u'773a902f022949619b5c2f32cd89d419', 'X-Project-Id': u'5588aebbcdc24e17a061595f80574376', 'X-Project-Name': 'test', 'X-User-Name': 'test', 'X-Auth-Token': u'5588a...
true
true
1c2986d8ee32a242a398455732d5440bf6485765
1,769
py
Python
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
setup.py
cr0hn/sanic-jwt
a91a2c5751b8a77e7ab33d2d1bcbf5d1826a4a26
[ "MIT" ]
null
null
null
import codecs import re from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) def open_local(paths, mode="r", encoding="utf8"): p = path.join(here, *paths) return codecs.open(p, mode, encoding) with open_local(["sanic_jwt", "__init__.py"], encoding="la...
29.483333
76
0.655738
import codecs import re from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) def open_local(paths, mode="r", encoding="utf8"): p = path.join(here, *paths) return codecs.open(p, mode, encoding) with open_local(["sanic_jwt", "__init__.py"], encoding="la...
true
true
1c298804799c2bc4a3271b42836529b2ad0227f6
386
py
Python
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2020/sena-martinez-angel-david/Practica2/view.py
bryanbalderas/DAS_Sistemas
1e31f088c0de7134471025a5730b0abfc19d936e
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
from flask import Flask, render_template import pymongo import random app = Flask(__name__) @app.route('/') def mostrar_usuario(): client = pymongo.MongoClient("mongodb://db:27017/") db = client["mi-bd"] personas = [] for x in db.coll.find(): personas.append(x) persona = personas[random.randint(0, len(persona...
22.705882
57
0.717617
from flask import Flask, render_template import pymongo import random app = Flask(__name__) @app.route('/') def mostrar_usuario(): client = pymongo.MongoClient("mongodb://db:27017/") db = client["mi-bd"] personas = [] for x in db.coll.find(): personas.append(x) persona = personas[random.randint(0, len(persona...
true
true
1c2988931d4c9d67b87f1d0d34a1e6c3d822226b
348
py
Python
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
null
null
null
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
null
null
null
test.py
Kumaken/fyp-vehicle-counting-system
51adb3bfc762d5489bc643da5f79bec3fa9eeb84
[ "MIT" ]
1
2021-08-08T07:06:57.000Z
2021-08-08T07:06:57.000Z
import torch # Model model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) # Images dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images # Inference results = model(imgs) print(results.xyxy[0]) results.s...
26.769231
77
0.692529
import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] results = model(imgs) print(results.xyxy[0]) results.show()
true
true
1c298940e5d79a599afb471e9ca2d5c970aef700
737
py
Python
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-30 15:35 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0013_alter_event_event_date_alter_event_event_time'), ] operations = [ migrati...
28.346154
107
0.628223
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('core', '0013_alter_event_event_date_alter_event_event_time'), ] operations = [ migrations.AlterField( model_name='event',...
true
true
1c298947356cf70f04fd0dd8986f85a2d43f5366
8,338
py
Python
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
homeassistant/components/upnp/sensor.py
provinzio/core
2440f25aaf7863a83b266a5b728a062498a354b4
[ "Apache-2.0" ]
null
null
null
"""Support for UPnP/IGD Sensors.""" from __future__ import annotations from datetime import timedelta from typing import Any, Mapping from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_BYTES, DATA_RATE_KIBIBYTES_PER_SECOND...
33.620968
81
0.667426
from __future__ import annotations from datetime import timedelta from typing import Any, Mapping from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_BYTES, DATA_RATE_KIBIBYTES_PER_SECOND from homeassistant.core import Home...
true
true
1c298a80442215679e57d86d8cac1e588596569e
16,497
py
Python
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/splits.py
brettkoonce/datasets
55bb2a80ab674c2f6254ac74d90bd6e5f478e895
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
34.297297
109
0.693217
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import operator import six from six.moves import range from six.moves import zip from tensorflow_datasets.core import proto from tensorflow_datasets.core impo...
true
true
1c298be3e533bcc0cc5e6ad3a7d213db3cbd5c45
769
py
Python
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
4
2021-10-17T00:26:12.000Z
2021-12-06T08:41:02.000Z
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
python/tests/test_version.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
import ecole.core def test_version(): """Extract version of library and git revision.""" version = ecole.core.get_build_version() assert isinstance(version.major, int) assert isinstance(version.minor, int) assert isinstance(version.patch, int) assert isinstance(version.revision, str) asser...
33.434783
64
0.739922
import ecole.core def test_version(): version = ecole.core.get_build_version() assert isinstance(version.major, int) assert isinstance(version.minor, int) assert isinstance(version.patch, int) assert isinstance(version.revision, str) assert isinstance(version.build_type, str) assert isinst...
true
true
1c298c12910e2a405707f7ba2bfcd33cd79fc220
28,878
py
Python
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
weasyprint/layout/preferred.py
timgates42/WeasyPrint
e83d5b772be480f4694fca2cbd96b4170f16a5e2
[ "BSD-3-Clause" ]
null
null
null
""" weasyprint.layout.preferred --------------------------- Preferred and minimum preferred width, aka. max-content and min-content width, aka. the shrink-to-fit algorithm. Terms used (max-content width, min-content width) are defined in David Baron's unofficial draft (http://dbaron.org/css/in...
38.606952
79
0.609945
import sys from .. import text from ..formatting_structure import boxes from .replaced import default_image_sizing def shrink_to_fit(context, box, available_content_width): return min( max( min_content_width(context, box, outer=False), available_content_width), max_conten...
true
true
1c298d360707dacb92264afddbb9b8672df345c0
1,843
py
Python
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
progressive_photon_mapping.py
JuanAsensioAyesa/ProyectoCGEIM_2021
9025c23fa7e2429a9846dae1146fbbf6314685cb
[ "MIT" ]
null
null
null
import os import numpy import random import PIL from PIL import Image if __name__ == "__main__": lista = [10,15,20,25,30,35,40,50,100,200] lista = numpy.arange(100) for i in numpy.arange(len(lista)): command = "./bin/yscene render" out_file = "imagen_"+str(lista[i]) photons = str(lis...
36.137255
97
0.639718
import os import numpy import random import PIL from PIL import Image if __name__ == "__main__": lista = [10,15,20,25,30,35,40,50,100,200] lista = numpy.arange(100) for i in numpy.arange(len(lista)): command = "./bin/yscene render" out_file = "imagen_"+str(lista[i]) photons = str(lis...
true
true
1c298d3611feb3825af82f900779495baf80bb1c
448
py
Python
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
358
2018-05-03T15:09:08.000Z
2022-03-30T02:18:02.000Z
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
473
2018-05-01T14:55:20.000Z
2022-03-31T18:09:31.000Z
tests/pylon_tests/usb/pylonusbtestcase.py
matt-phair/pypylon
f81385a838ac0786f1a3f9b61db8eb4cdd2a905e
[ "BSD-3-Clause" ]
176
2018-07-05T20:16:05.000Z
2022-03-16T10:59:52.000Z
import unittest from pypylon import pylon def get_class_and_filter(): device_class = "BaslerUsb" di = pylon.DeviceInfo() di.SetDeviceClass(device_class) return device_class, [di] class PylonTestCase(unittest.TestCase): device_class, device_filter = get_class_and_filter() def create_first(self...
28
80
0.743304
import unittest from pypylon import pylon def get_class_and_filter(): device_class = "BaslerUsb" di = pylon.DeviceInfo() di.SetDeviceClass(device_class) return device_class, [di] class PylonTestCase(unittest.TestCase): device_class, device_filter = get_class_and_filter() def create_first(self...
true
true
1c298e1ed7034da734235be9d0228d22f012eff4
1,453
py
Python
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2018-07-26T09:32:46.000Z
2019-05-28T20:57:43.000Z
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
3
2018-03-18T21:55:07.000Z
2019-04-18T18:26:06.000Z
harnessed_jobs/brighter_fatter_raft/v0/producer_brighter_fatter_raft.py
duncanwood/EO-analysis-jobs
26d22e49c0d2e32fbf2759f504048754f66ecc45
[ "BSD-3-Clause-LBNL" ]
2
2020-11-12T19:47:42.000Z
2022-02-25T21:43:03.000Z
#!/usr/bin/env ipython """ Producer script for raft-level brighter-fatter analysis. """ def run_bf_task(sensor_id): import lsst.eotest.sensor as sensorTest import siteUtils import eotestUtils file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber()) flat_files = siteUtils.dependency_glob('S*/%...
40.361111
98
0.615967
def run_bf_task(sensor_id): import lsst.eotest.sensor as sensorTest import siteUtils import eotestUtils file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber()) flat_files = siteUtils.dependency_glob('S*/%s_flat*flat1*.fits' % sensor_id, jobname=sit...
true
true
1c298ea5cbbaeaf9667784c255bcf78b3f0210c1
1,275
py
Python
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
visualization.py
ronen85/causal_inference_project
aa2688ba0629f9984aa714fe07e9c319228bb461
[ "MIT" ]
null
null
null
from collections import defaultdict from matplotlib.pylab import plt from matplotlib import pyplot as mp from utilities import * def bar_graph(category, age_grp, sex, x, y, year=None, country=None): plt.figure() plt.ylabel('ATE = Y1 - Y0') plt.xlabel('Years') plt.bar(range(len(x)), x, align='center')...
37.5
103
0.569412
from collections import defaultdict from matplotlib.pylab import plt from matplotlib import pyplot as mp from utilities import * def bar_graph(category, age_grp, sex, x, y, year=None, country=None): plt.figure() plt.ylabel('ATE = Y1 - Y0') plt.xlabel('Years') plt.bar(range(len(x)), x, align='center')...
true
true
1c298ff0d0f9642f654e81d4f06c943f20972b04
1,033
py
Python
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
setup.py
jelmer04/Keypad
dfaeeb093e3c185a9874eb7c67b9b52d1c8bece7
[ "BSD-3-Clause" ]
null
null
null
# -- coding: utf-8 -- """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup, find_packages import os APP = ['keypad.py'] APP_NAME = "Keypad" VERSION = "0.0.1" DATA_FILES = [(d, [os.path.join(d,f) for f in files]) for d, folders, files in os.walk...
22.456522
87
0.637948
from setuptools import setup, find_packages import os APP = ['keypad.py'] APP_NAME = "Keypad" VERSION = "0.0.1" DATA_FILES = [(d, [os.path.join(d,f) for f in files]) for d, folders, files in os.walk('./share')] OPTIONS = { 'iconfile': './share/Keypad.icns', 'plist': { 'LSUIElement': True, ...
true
true
1c29906b5e34d62b7c9535e0adb73fe2ed01f429
152,554
py
Python
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
modules/s3db/setup.py
AlexanderLaughlin/eden
8f7bc2dfd2fe221fc98b0b80d67f796d66a3673c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Sahana Eden Setup Model: * Installation of a Deployment * Configuration of a Deployment * Managing a Deployment (Start/Stop/Clean instances) * Monitoring of a Deployment * Upgrading a Deployment (tbc) @copyright: 2015-2020 (c) Sahana Software Fou...
42.107094
293
0.412687
__all__ = ("S3DNSModel", "S3GandiDNSModel", "S3CloudModel", "S3AWSCloudModel", "S3SetupModel", "S3SetupMonitorModel", "setup_monitor_run_task", "setup_monitor_check_email_reply", "setup_instanc...
true
true
1c2991d3f0a79cfaadaa0c1916b558f0f3f38958
7,943
py
Python
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
docs/conf.py
alexanderkell/clicSAND-converter
e3317521679a23835ffd5bbf4690fe6d750ddf5f
[ "FTL" ]
null
null
null
# -*- coding: utf-8 -*- # # clicSAND-converter documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration va...
32.420408
115
0.709304
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'clicSAND-converter' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1...
true
true
1c299277b6e4bc2e8f32eaa6cd05e0ffb0851156
8,050
py
Python
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
3
2015-06-01T18:32:50.000Z
2015-11-05T01:07:01.000Z
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
null
null
null
nova/tests/cells/test_cells_state_manager.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
1
2020-07-24T06:01:37.000Z
2020-07-24T06:01:37.000Z
# Copyright (c) 2013 Rackspace Hosting # 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 req...
36.261261
78
0.640373
from oslo.config import cfg from nova.cells import state from nova import db from nova.db.sqlalchemy import models from nova import exception from nova import test FAKE_COMPUTES = [ ('host1', 1024, 100, 0, 0), ('host2', 1024, 100, -1, -1), ('host3', 1024, 100, 1024, 100), ('host4', 102...
true
true
1c29927f2a163f6afabb855ee2870ef00283ca48
22,491
py
Python
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
functions/POM_build.py
NavarreCML/National-EAT-Lancet-Diets
d61ffb59829a64d1bfca3f43e593e656d4543f33
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from functions import fao_regions as regions data = 'data/' def data_build(crop_proxie, diet_div_crop, diet_source_crop, diet_ls_only, diet_ls_only_source, min_waste): """*** Import of country data to build national diets ***""" WPR_height = pd.read_csv(r"data/worldpopu...
62.301939
347
0.640834
import pandas as pd import numpy as np from functions import fao_regions as regions data = 'data/' def data_build(crop_proxie, diet_div_crop, diet_source_crop, diet_ls_only, diet_ls_only_source, min_waste): WPR_height = pd.read_csv(r"data/worldpopulationreview_height_data.csv") WPR_height.loc[WPR_height.Area...
true
true
1c29928991cde82eed3e30826fceb5681c4d7617
11,627
py
Python
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
1
2020-08-18T16:49:16.000Z
2020-08-18T16:49:16.000Z
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/io/pytables/test_timezones.py
treuherz/pandas
a313f7ff5c003bc14fa36714d41c9842209b4e6a
[ "BSD-3-Clause" ]
2
2021-07-17T19:28:31.000Z
2021-11-28T17:14:58.000Z
import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timestamp, date_range import pandas._testing as tm from pandas.tests.io.pytables.common import ( _maybe_remove, ensure_clean_path, ensure_cle...
30.840849
88
0.572117
import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timestamp, date_range import pandas._testing as tm from pandas.tests.io.pytables.common import ( _maybe_remove, ensure_clean_path, ensure_cle...
true
true
1c2994ee14db8c7dd8b9c0113116f15720b1ab35
20
py
Python
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
3
2021-04-19T17:17:21.000Z
2021-09-06T06:31:09.000Z
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
checkov/version.py
nimrodkor/checkov
d0bda627bb43f5e79042c716fdd0f3bd3380424e
[ "Apache-2.0" ]
1
2022-01-06T08:04:56.000Z
2022-01-06T08:04:56.000Z
version = '1.0.970'
10
19
0.6
version = '1.0.970'
true
true
1c29963351aaea34198a32be654d524111ad3472
600
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLSC2/OES/rgb8_rgba8.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLSC2 import _types as _cs # End users want this... from OpenGL.raw.GLSC2._types import * from OpenGL.raw.GLSC2 import _errors from OpenGL.constant import Constant as _C ...
35.294118
118
0.778333
from OpenGL import platform as _p, arrays from OpenGL.raw.GLSC2 import _types as _cs from OpenGL.raw.GLSC2._types import * from OpenGL.raw.GLSC2 import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GLSC2_OES_rgb8_rgba8' def _f( function ): return _p.createFunction( ...
true
true
1c29967c7d005bd697fee672e61c97d395ef220b
1,137
py
Python
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
blog/migrations/0003_blogpagegalleryimage.py
jtmolon/homepage
878b9f4a564953c344a348fb63dc1ee679e3a835
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-14 20:46 from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0022_uploadedimage'), ('blog', '0002_blogpage'), ] operations =...
36.677419
154
0.608619
from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0022_uploadedimage'), ('blog', '0002_blogpage'), ] operations = [ migrations.CreateModel( ...
true
true
1c299824e6ae403d08e851a546ace18cdbb6ae12
5,101
py
Python
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import json import os import ssl import uuid from collections import namedtuple from configparser import ConfigParser from pathlib import Path import pytest import saltext.vmware.modules.cluster as cluster_mod import saltext.vmware.modules.cluster_drs...
27.572973
92
0.693786
import json import os import ssl import uuid from collections import namedtuple from configparser import ConfigParser from pathlib import Path import pytest import saltext.vmware.modules.cluster as cluster_mod import saltext.vmware.modules.cluster_drs as cluster_drs_mod import saltext.vmware.modules.cluster_ha as cl...
true
true
1c299861369b549140418ab13bfd2f28ff620532
5,869
py
Python
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
g2base/remoteObjects/ro_test.py
naojsoft/g2cam
4f01cdccae7978d5c16af59a90ff7459ed6c2997
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Remote objects tests # from __future__ import print_function import sys, time import logging from g2base import Task, ssdlog from g2base.remoteObjects import remoteObjects as ro class TestRO(ro.remoteObjectServer): def __init__(self, options, logger, threadPool, threaded=True, ...
32.787709
75
0.54643
from __future__ import print_function import sys, time import logging from g2base import Task, ssdlog from g2base.remoteObjects import remoteObjects as ro class TestRO(ro.remoteObjectServer): def __init__(self, options, logger, threadPool, threaded=True, usethread=False): authDict =...
true
true
1c2999438d249cae19d9039c2c4d679652a5ede4
175
py
Python
Classes/Logic/LogicStringUtil.py
AkulaBs/BSDS-Server-V42
2cf195f87838d8ad96b1852b367d39fd7e06b276
[ "Apache-2.0" ]
19
2021-12-23T19:15:09.000Z
2022-03-03T12:40:33.000Z
Classes/Logic/LogicStringUtil.py
KulerDev/BSDS-V42
80d78c9a6e7ac57121fca6a3a404e630f2792603
[ "Apache-2.0" ]
12
2021-12-23T19:16:31.000Z
2022-03-04T08:58:18.000Z
Classes/Logic/LogicStringUtil.py
KulerDev/BSDS-V42
80d78c9a6e7ac57121fca6a3a404e630f2792603
[ "Apache-2.0" ]
13
2021-12-24T10:00:11.000Z
2022-03-14T02:03:54.000Z
class LogicStringUtil: @staticmethod def getBytes(string): return string.encode() @staticmethod def getByteLength(string): return len(string)
19.444444
30
0.662857
class LogicStringUtil: @staticmethod def getBytes(string): return string.encode() @staticmethod def getByteLength(string): return len(string)
true
true
1c299a1b5dd99565592f0ab5133c590293a75a7f
1,112
py
Python
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
tests/serial_mock.py
Jakeler/ut61e-pygatt
7554951e02687fee0b9ea2b5c9a1f9b6901a1042
[ "Apache-2.0" ]
null
null
null
import Queue class SerialMock(object): """ Spoof a serial.Serial object. """ def __init__(self, port, timeout): self._isOpen = True self._port = port self._timeout = timeout self._output_queue = Queue.Queue() self._active_packet = None self._expected_inp...
27.121951
80
0.591727
import Queue class SerialMock(object): def __init__(self, port, timeout): self._isOpen = True self._port = port self._timeout = timeout self._output_queue = Queue.Queue() self._active_packet = None self._expected_input_queue = Queue.Queue() def open(self): ...
true
true
1c299afa3a95b6c7978a060616773c0cf101e5c7
3,158
py
Python
redisbench_admin/run_remote/standalone.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
5
2021-08-03T12:38:30.000Z
2022-03-23T07:35:38.000Z
redisbench_admin/run_remote/standalone.py
RedisLabsModules/redisbench-admin
d8573d3414e5e846411d2875555deca5c8a7d0f1
[ "Apache-2.0" ]
91
2021-03-17T12:05:35.000Z
2022-03-29T22:20:00.000Z
redisbench_admin/run_remote/standalone.py
filipecosta90/redisbench-admin
d00ac6834c22f17f82bd8fba55d14a989e41ad2b
[ "Apache-2.0" ]
2
2021-06-07T14:06:58.000Z
2021-07-27T10:37:15.000Z
# BSD 3-Clause License # # Copyright (c) 2021., Redis Labs Modules # All rights reserved. # # import logging import os from redisbench_admin.utils.remote import ( copy_file_to_remote_setup, execute_remote_commands, ) from redisbench_admin.utils.ssh import SSHSession def spin_up_standalone_remote_redis( ...
30.07619
114
0.652312
import logging import os from redisbench_admin.utils.remote import ( copy_file_to_remote_setup, execute_remote_commands, ) from redisbench_admin.utils.ssh import SSHSession def spin_up_standalone_remote_redis( temporary_dir, server_public_ip, username, private_key, remote_module_fil...
true
true
1c299b2b0e8e9844eaea8749d2b95f3dbaaf7cf5
11,827
py
Python
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
conans/test/integration/system_reqs_test.py
Ignition/conan
84a38590987ecb9f3011f73babc95598ea62535f
[ "MIT" ]
null
null
null
import os import stat import unittest import six from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient from conans.util.files import load base_conanfile = ''' from conans import ConanFile class TestSystemReqs(ConanFile): name = "...
46.93254
106
0.668555
import os import stat import unittest import six from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient from conans.util.files import load base_conanfile = ''' from conans import ConanFile class TestSystemReqs(ConanFile): name = "...
true
true
1c299ba00aa6a8de3074014fd36a1c53722f5725
77,744
py
Python
dreamcoder/grammar.py
Dragon-hxl/LARC
c9f13f110a56aa2ecf837e464745375d9521409e
[ "MIT" ]
null
null
null
dreamcoder/grammar.py
Dragon-hxl/LARC
c9f13f110a56aa2ecf837e464745375d9521409e
[ "MIT" ]
2
2022-03-30T15:20:31.000Z
2022-03-30T17:38:33.000Z
dreamcoder/grammar.py
mlb2251/stitch_dreamcoder
e13295d7217b621e6e2691b57cd58c88cded5830
[ "MIT" ]
null
null
null
from frozendict import frozendict from collections import defaultdict from dreamcoder.frontier import * from dreamcoder.program import * from dreamcoder.type import * from dreamcoder.utilities import * import time import itertools class GrammarFailure(Exception): pass class SketchEnumerationFailure(Exception):...
44.047592
158
0.503885
from frozendict import frozendict from collections import defaultdict from dreamcoder.frontier import * from dreamcoder.program import * from dreamcoder.type import * from dreamcoder.utilities import * import time import itertools class GrammarFailure(Exception): pass class SketchEnumerationFailure(Exception):...
true
true
1c299e68803173d5b84ddcf180e0f41fd5946d7a
9,726
py
Python
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:13:11.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/elkm1/alarm_control_panel.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Each ElkM1 area will be created as a separate alarm_control_panel.""" import logging from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState from elkm1_lib.util import username import voluptuous as vol from homeassistant.components.alarm_control_panel import ( ATTR_CHANGED_BY, FORMAT_NUMB...
36.022222
88
0.683117
import logging from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState from elkm1_lib.util import username import voluptuous as vol from homeassistant.components.alarm_control_panel import ( ATTR_CHANGED_BY, FORMAT_NUMBER, AlarmControlPanelEntity, ) from homeassistant.components.alarm_co...
true
true
1c299f9f94e7677c50320107cbf4ba63465973ae
2,955
py
Python
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
35
2018-07-30T13:59:12.000Z
2019-04-10T11:13:30.000Z
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
12
2018-07-30T13:42:26.000Z
2019-01-24T18:08:13.000Z
django_stubs_ext/django_stubs_ext/patch.py
TypedDjango/django-stubs
644052148aec0114daf3d75a18f9bab48057ff17
[ "MIT" ]
1
2018-11-01T22:59:56.000Z
2018-11-01T22:59:56.000Z
from typing import Any, Generic, Iterable, List, Optional, Tuple, Type, TypeVar from django import VERSION as VERSION from django.contrib.admin import ModelAdmin from django.contrib.admin.options import BaseModelAdmin from django.contrib.syndication.views import Feed from django.core.paginator import Paginator from dj...
37.405063
111
0.734349
from typing import Any, Generic, Iterable, List, Optional, Tuple, Type, TypeVar from django import VERSION as VERSION from django.contrib.admin import ModelAdmin from django.contrib.admin.options import BaseModelAdmin from django.contrib.syndication.views import Feed from django.core.paginator import Paginator from dj...
true
true
1c29a024663a7767d1adc11c7eda326e8025770d
19,513
py
Python
tests/api/test_checkout.py
rohan3107/saleor
357489a74dec1a6e0f4ee2fd55290c67285e4f85
[ "BSD-3-Clause" ]
null
null
null
tests/api/test_checkout.py
rohan3107/saleor
357489a74dec1a6e0f4ee2fd55290c67285e4f85
[ "BSD-3-Clause" ]
3
2020-02-11T23:51:31.000Z
2022-02-10T22:42:12.000Z
tests/api/test_checkout.py
anonyo/henna-products-ecomerce
4b25bac38fd483e75e632ecf5c1cbdc1be2216fa
[ "BSD-3-Clause" ]
null
null
null
import uuid from unittest.mock import patch, ANY import graphene import pytest from tests.api.utils import get_graphql_content from saleor.checkout.models import Cart from saleor.order.models import Order def test_checkout_create(user_api_client, variant, graphql_address_data): """Create checkout object using G...
32.905565
99
0.61067
import uuid from unittest.mock import patch, ANY import graphene import pytest from tests.api.utils import get_graphql_content from saleor.checkout.models import Cart from saleor.order.models import Order def test_checkout_create(user_api_client, variant, graphql_address_data): query = """ mutation createCh...
true
true
1c29a15af1fb4394a7ead680d69cc2406f921ba4
5,634
py
Python
rpython/translator/translator.py
SeraphRoy/PyPy-Functional
e825dce7f7c484fa666566974a93ed5d59fb73be
[ "Apache-2.0", "OpenSSL" ]
4
2019-02-11T06:58:43.000Z
2020-03-15T14:12:32.000Z
rpython/translator/translator.py
murtyjones/kiwi-pypy
1419c7de61a11b2d29602b25506cb3b4f225996e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/translator/translator.py
murtyjones/kiwi-pypy
1419c7de61a11b2d29602b25506cb3b4f225996e
[ "Apache-2.0", "OpenSSL" ]
null
null
null
"""PyPy Translator Frontend The Translator is a glue class putting together the various pieces of the translation-related code. It can be used for interactive testing of the translator; see pypy/bin/translatorshell.py. """ import sys import types from rpython.translator import simplify from rpython.flowspace.model i...
37.311258
88
0.642705
import sys import types from rpython.translator import simplify from rpython.flowspace.model import FunctionGraph, checkgraph, Block from rpython.flowspace.objspace import build_flow from rpython.tool.ansi_print import AnsiLogger from rpython.tool.sourcetools import nice_repr_for_func from rpython.config.translationop...
true
true
1c29a1a658dfd9ccc64ac33c1dc70d16ea8d30a3
888
py
Python
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.116.Populating Next Right Pointers in Each Node/leetcode.116.Populating Next Right Pointers in Each Node.submission5.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: # @param root, a tree node # @return nothing def connect(self, root): if root == None: return ...
888
888
0.509009
true
true
1c29a1c796b3dfb415363109c8df2ef9a828f833
1,337
py
Python
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
1
2018-11-08T12:33:26.000Z
2018-11-08T12:33:26.000Z
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
null
null
null
lenstronomy/LightModel/Profiles/nie.py
franyancr/lenstronomy
3a7b33512a474bf1796d23276d9028b580580cf1
[ "MIT" ]
1
2019-06-25T18:55:26.000Z
2019-06-25T18:55:26.000Z
import numpy as np import lenstronomy.Util.util as util import lenstronomy.Util.param_util as param_util class NIE(object): """ non-divergent isothermal ellipse (projected) """ param_names = ['amp', 'e1', 'e2', 's_scale', 'center_x', 'center_y'] lower_limit_default = {'amp': 0, 'e1': -0.5, 'e2': -...
27.854167
110
0.525804
import numpy as np import lenstronomy.Util.util as util import lenstronomy.Util.param_util as param_util class NIE(object): param_names = ['amp', 'e1', 'e2', 's_scale', 'center_x', 'center_y'] lower_limit_default = {'amp': 0, 'e1': -0.5, 'e2': -0.5, 's_scale': 0, 'center_x': -100, 'center_y': -100} upper_...
true
true
1c29a21da72c705cd441ea30b81dee9268add44c
1,585
py
Python
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
47
2020-04-26T20:00:03.000Z
2022-02-19T14:32:04.000Z
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
84
2020-05-25T14:49:21.000Z
2022-01-26T01:55:04.000Z
tests/unit/test_workspace.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
14
2020-07-01T11:03:25.000Z
2022-01-11T06:37:31.000Z
# Copyright (c) 2020, Moritz E. Beber. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
29.90566
74
0.683281
import pytest from structurizr.workspace import Workspace, WorkspaceIO @pytest.mark.parametrize( "attributes", [ {}, {"id": 42, "name": "Marvin", "description": "depressed robot"}, ], ) def test_workspace_io_init(attributes: dict): workspace = WorkspaceIO(**attributes...
true
true
1c29a3f5ce6bfda98e3d9b96c329a0d569e85ab9
13,264
py
Python
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
65
2020-02-09T07:08:25.000Z
2022-03-28T03:27:30.000Z
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
12
2020-05-22T15:45:20.000Z
2022-01-27T16:44:57.000Z
spacy_ann/ann_kb.py
r-b-g-b/spacy-ann-linker
3a625052686fc745fa1508c238fc68a5c7f50053
[ "MIT" ]
22
2020-05-06T11:30:32.000Z
2021-11-10T08:17:32.000Z
from pathlib import Path from timeit import default_timer as timer from typing import List, Set, Tuple import joblib import nmslib import numpy as np import scipy import srsly from nmslib.dist import FloatIndex from sklearn.feature_extraction.text import TfidfVectorizer from spacy.kb import KnowledgeBase from spacy.ut...
40.562691
114
0.652518
from pathlib import Path from timeit import default_timer as timer from typing import List, Set, Tuple import joblib import nmslib import numpy as np import scipy import srsly from nmslib.dist import FloatIndex from sklearn.feature_extraction.text import TfidfVectorizer from spacy.kb import KnowledgeBase from spacy.ut...
true
true
1c29a40cfe35e44d0a8c53edae63ec34dbd49a77
2,300
py
Python
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
1
2022-01-30T16:20:33.000Z
2022-01-30T16:20:33.000Z
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
null
null
null
chrono/parsers/en/month_name_middle_endian.py
OmniInc/chrono-python
9f3f36cb8c98e15014252bc5dd16e5e6f20cbed6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- import re from ..parser import Parser from ..parser import ParsedResult from ..parser import ParsedComponent from datetime import datetime from .util import month_index from .util import date_exist from .util import find_closest_year FULL_PATTERN = "(\W|^)((Sunday|Monday...
37.096774
353
0.621304
import re from ..parser import Parser from ..parser import ParsedResult from ..parser import ParsedComponent from datetime import datetime from .util import month_index from .util import date_exist from .util import find_closest_year FULL_PATTERN = "(\W|^)((Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday...
true
true
1c29a46678a9a2220dc9a4075839dde2d16879ff
2,065
py
Python
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
2
2018-02-26T15:57:04.000Z
2019-03-11T15:21:38.000Z
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
1
2018-07-25T16:36:11.000Z
2018-07-25T16:36:11.000Z
src/MediaPlayer/Util/Network.py
JKorf/MediaPi
4b21bb9cfa692534d0098ad947dd99beb7b0c1ed
[ "MIT" ]
null
null
null
import struct def write_short(buffer, short, offset): struct.pack_into('!h', buffer, offset, short) offset += 2 return offset def write_int(buffer, integer, offset): struct.pack_into('!i', buffer, offset, integer) offset += 4 return offset def write_long(buffer, long, offset): struct.p...
21.071429
55
0.661985
import struct def write_short(buffer, short, offset): struct.pack_into('!h', buffer, offset, short) offset += 2 return offset def write_int(buffer, integer, offset): struct.pack_into('!i', buffer, offset, integer) offset += 4 return offset def write_long(buffer, long, offset): struct.p...
true
true
1c29a515ce6367d4b3ebbfec790eaa302081fe15
365
py
Python
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
blinkatest.py
Lusorede/lr-hr-cr
fa4244517db2c778d3f09762599007be26b88f3c
[ "MIT" ]
null
null
null
import board import digitalio import busio print("Hello blinka!") # Try to great a Digital input pin = digitalio.DigitalInOut(board.D18) print("Digital IO ok!") # Try to create an I2C device i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") # Try to create an SPI device spi = busio.SPI(board.SCLK, board.MOSI, ...
18.25
51
0.717808
import board import digitalio import busio print("Hello blinka!") pin = digitalio.DigitalInOut(board.D18) print("Digital IO ok!") i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) print("SPI ok!") print("done!")
true
true
1c29a7ea883312dbb58d06302a94b543acdbdfea
2,557
py
Python
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
1
2020-05-01T03:36:49.000Z
2020-05-01T03:36:49.000Z
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
9
2020-01-28T22:21:05.000Z
2022-02-10T00:23:18.000Z
predict_with_lstm.py
reo11/aes-for-japanese-learner
a2a400cf651b6ce967db8c1e1b72d08bfc44d280
[ "MIT" ]
null
null
null
from src.lstm import LSTM from src.attention import Attention from src.regressor import AttnRegressor from src.make_data import DataGenerator from src.optimize import OptimizedRounder import pandas as pd import numpy as np import warnings import os import argparse import joblib import pickle import torch from torch.uti...
34.093333
112
0.658193
from src.lstm import LSTM from src.attention import Attention from src.regressor import AttnRegressor from src.make_data import DataGenerator from src.optimize import OptimizedRounder import pandas as pd import numpy as np import warnings import os import argparse import joblib import pickle import torch from torch.uti...
true
true
1c29ab0376d0a55dfe28d5bc4156b498f7fa9615
3,143
py
Python
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
phonenumber_field/modelfields.py
hwkns/django-phonenumber-field
197d9f3a6d118321f3513f7095747d086fa9bce6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.conf import settings from django.core import validators from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import validate_international_phonenumber from .phonenumber import ...
31.118812
78
0.652561
from __future__ import unicode_literals, absolute_import from django.conf import settings from django.core import validators from django.db import models from django.utils.translation import ugettext_lazy as _ from .validators import validate_international_phonenumber from .phonenumber import PhoneNumber, to_python,...
true
true
1c29ab428d573c8fe2979d6c5359ee7ff1d4f27e
6,179
py
Python
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
curvefit/test/text_test.py
eerkela/CurveFit
4c25a196860cc62900618ea01dd59b903edbfc8d
[ "MIT" ]
null
null
null
from functools import partial import unittest import numpy as np from matplotlib.figure import Figure from matplotlib.text import Text from curvefit.callback import add_callback from curvefit.color import DynamicColor, to_rgba from curvefit.text import DynamicText assert_equal_float = partial(np.testing.assert_almo...
40.385621
79
0.608351
from functools import partial import unittest import numpy as np from matplotlib.figure import Figure from matplotlib.text import Text from curvefit.callback import add_callback from curvefit.color import DynamicColor, to_rgba from curvefit.text import DynamicText assert_equal_float = partial(np.testing.assert_almo...
true
true
1c29ab958ae870b27f1e34bddcf8cb30bc163edf
2,664
py
Python
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
1
2015-01-20T16:02:38.000Z
2015-01-20T16:02:38.000Z
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
2
2015-01-19T21:29:44.000Z
2015-01-20T15:26:26.000Z
docs/source/examples/breakdowns.py
appliedopt/gpkit
647ef0a2a0ff625026943bfd7fb5ca560100898b
[ "MIT" ]
null
null
null
"An example to show off Breakdowns" import os import sys import pickle import pint from packaging import version from gpkit.breakdowns import Breakdowns dirpath = os.path.dirname(os.path.realpath(__file__)) + os.sep if version.parse(pint.__version__) >= version.parse("0.13"): sol = pickle.load(open(dirpath+"solar_...
40.984615
79
0.644895
import os import sys import pickle import pint from packaging import version from gpkit.breakdowns import Breakdowns dirpath = os.path.dirname(os.path.realpath(__file__)) + os.sep if version.parse(pint.__version__) >= version.parse("0.13"): sol = pickle.load(open(dirpath+"solar_13.p", "rb")) elif version.parse(pin...
true
true
1c29ac1f48f6c0b3d53336d578c7d82c8126cb1a
1,247
py
Python
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
2
2020-06-05T07:50:29.000Z
2020-06-05T20:53:55.000Z
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
4
2020-07-07T16:51:39.000Z
2021-03-08T03:11:50.000Z
play/pyFire.py
WorldViews/FlowerGarden
af274812bd4de1b0bb1e1f17898cc2f7853c65a1
[ "CC0-1.0" ]
1
2020-07-27T08:29:19.000Z
2020-07-27T08:29:19.000Z
import pyrebase firebaseConfig = { "apiKey": "AIzaSyBqAsqHaBZGT-UsC82ShV3koGWWgu-l8to", "authDomain": "fir-helloworld-39759.firebaseapp.com", "databaseURL": "https://fir-helloworld-39759.firebaseio.com", 'projectId': "fir-helloworld-39759", 'storageBucket': "fir-helloworld-39759.appspot.com", ...
25.979167
84
0.696071
import pyrebase firebaseConfig = { "apiKey": "AIzaSyBqAsqHaBZGT-UsC82ShV3koGWWgu-l8to", "authDomain": "fir-helloworld-39759.firebaseapp.com", "databaseURL": "https://fir-helloworld-39759.firebaseio.com", 'projectId': "fir-helloworld-39759", 'storageBucket': "fir-helloworld-39759.appspot.com", ...
true
true
1c29ac2481c795531fa78f129018764b0534515c
446
py
Python
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
setup.py
qgallouedec/deep_rl
33d1138939173bc5dddd1a4b03824f7c18dabbfe
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name="deep_rl", description="My RL package.", author="Quentin GALLOUÉDEC", author_email="gallouedec.quentin@gmail.com", long_description=long_description, long_description_conte...
26.235294
50
0.695067
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name="deep_rl", description="My RL package.", author="Quentin GALLOUÉDEC", author_email="gallouedec.quentin@gmail.com", long_description=long_description, long_description_conte...
true
true
1c29ad2b2badf60735122b292dcb3c1e3f2b1d71
3,793
py
Python
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
18
2019-09-19T03:24:47.000Z
2021-12-05T14:39:58.000Z
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
26
2019-09-04T19:18:10.000Z
2022-03-08T08:40:28.000Z
tests/test_authenticate.py
Dayflare/galaxy-integration-rpcs3
99e5f6bf9ff375400b1334e8c39ede9f04a1cf5d
[ "MIT" ]
5
2020-07-21T07:24:05.000Z
2022-01-08T01:48:28.000Z
import pytest from galaxy.api.types import Authentication from galaxy.api.errors import ( UnknownError, InvalidCredentials, NetworkError, LoggedInElsewhere, ProtocolError, BackendNotAvailable, BackendTimeout, BackendError, TemporaryBlocked, Banned, AccessDenied ) from galaxy.unittest.mock import async_return_v...
31.347107
97
0.628263
import pytest from galaxy.api.types import Authentication from galaxy.api.errors import ( UnknownError, InvalidCredentials, NetworkError, LoggedInElsewhere, ProtocolError, BackendNotAvailable, BackendTimeout, BackendError, TemporaryBlocked, Banned, AccessDenied ) from galaxy.unittest.mock import async_return_v...
true
true
1c29adb73b6a0e40e78d0fe10a6f5254bb36c338
886
py
Python
zilencer/tests.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-02-13T20:43:29.000Z
2021-02-13T20:43:29.000Z
zilencer/tests.py
eric-erki/zulip
a063dd3b26f7ada794e14ace0d24ea1834611446
[ "Apache-2.0" ]
8
2021-02-08T20:23:34.000Z
2022-02-11T03:40:24.000Z
zilencer/tests.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-04-09T05:50:23.000Z
2021-04-09T05:50:23.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import import ujson from django.test import TestCase class EndpointDiscoveryTest(TestCase): def test_staging_user(self): # type: () -> None response = self.client.get("/api/v1/deployments/endpoints", {"email": "lfaraone@zulip.com"}) ...
38.521739
100
0.651242
from __future__ import absolute_import import ujson from django.test import TestCase class EndpointDiscoveryTest(TestCase): def test_staging_user(self): response = self.client.get("/api/v1/deployments/endpoints", {"email": "lfaraone@zulip.com"}) data = ujson.loads(response.content) ...
true
true