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
1c432f914ed6c58dcddeaca1299901b49420cd1b
315
py
Python
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
1
2019-04-01T05:52:37.000Z
2019-04-01T05:52:37.000Z
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
1
2015-03-11T16:18:12.000Z
2015-03-11T16:18:12.000Z
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
null
null
null
from django import forms from mptt.forms import TreeNodeChoiceField from models import Category class CategoryForm(forms.ModelForm): parent = TreeNodeChoiceField(queryset=Category.objects.all(), level_indicator=3*unichr(160), empty_label='---------', required=False) class Meta: model = Category
28.636364
137
0.749206
from django import forms from mptt.forms import TreeNodeChoiceField from models import Category class CategoryForm(forms.ModelForm): parent = TreeNodeChoiceField(queryset=Category.objects.all(), level_indicator=3*unichr(160), empty_label='---------', required=False) class Meta: model = Category
true
true
1c432fd8aafbe155c419a37e9a6e28ef223f4100
2,275
py
Python
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
59.868421
845
0.782857
import unittest from netapp.santricity.models.symbol.raw_data_retrieve_start_result import RawDataRetrieveStartResult class RawDataRetrieveStartResultTest(unittest.TestCase): def test_raw_data_retrieve_start_result(self): raw_data_retrieve_start_result_obj = RawDataRetrieveStartResul...
true
true
1c43316ba426e186d7d74059eb7f554612fcaa26
52,235
py
Python
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
37.606192
79
0.593414
from collections import defaultdict from cStringIO import StringIO import UserDict import time from functools import partial from datetime import datetime, timedelta, tzinfo from email.utils import parsedate import urlparse import urllib2 import re import random import functools import inspect from swift.common.util...
true
true
1c4331b3340c76fc2bb61a1cbefe73cd7b1a46bd
1,663
py
Python
dvc/render/image_converter.py
itcarroll/dvc
55219e9089005ac15d668ecf735aeaf31a771d0b
[ "Apache-2.0" ]
null
null
null
dvc/render/image_converter.py
itcarroll/dvc
55219e9089005ac15d668ecf735aeaf31a771d0b
[ "Apache-2.0" ]
41
2021-11-16T15:38:50.000Z
2022-03-30T10:32:14.000Z
dvc/render/image_converter.py
jhhuh/dvc
fecc81e951efeaa8130264f726c27e92876422ae
[ "Apache-2.0" ]
null
null
null
import base64 import os from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from dvc.render import FILENAME_FIELD, REVISION_FIELD, SRC_FIELD if TYPE_CHECKING: from dvc.types import StrPath class ImageConverter: def __init__(self, plot_properties: Optional[Dict] = None): self.plot_propertie...
28.186441
64
0.594708
import base64 import os from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from dvc.render import FILENAME_FIELD, REVISION_FIELD, SRC_FIELD if TYPE_CHECKING: from dvc.types import StrPath class ImageConverter: def __init__(self, plot_properties: Optional[Dict] = None): self.plot_propertie...
true
true
1c4331f767c85c11f71d344660c6f4ec8a44f48d
636
py
Python
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
109
2020-10-03T16:41:30.000Z
2021-09-16T21:03:34.000Z
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
from datetime import datetime, timezone class Base: """Base class for 'zeitsprung-fm' package classes.""" def __init__(self, verbose: bool = True) -> None: """ Class constructor for the Base class. Parameters ---------- verbose : bool, default True Print m...
24.461538
95
0.575472
from datetime import datetime, timezone class Base: def __init__(self, verbose: bool = True) -> None: self.verbose = verbose def _print(self, message: str) -> None: if self.verbose: print(f'{datetime.now(timezone.utc).replace(microsecond=0).isoformat()} {message}')
true
true
1c43340b8e297014f5f5b70a00221b88898d6631
835
py
Python
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
1
2020-11-07T15:53:19.000Z
2020-11-07T15:53:19.000Z
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
null
null
null
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
1
2020-11-07T15:56:06.000Z
2020-11-07T15:56:06.000Z
import numpy as np import scipy.integrate def predict_orbit_BCBF(vessel, frame): r0 = vessel.position(frame) v0 = vessel.velocity(frame) omega = vessel.orbit.body.rotational_speed mu = vessel.orbit.body.gravitational_parameter y0 = list(r0)+list(v0) t_grid = np.arange(0.0,60.0*20,5.0) re...
29.821429
116
0.657485
import numpy as np import scipy.integrate def predict_orbit_BCBF(vessel, frame): r0 = vessel.position(frame) v0 = vessel.velocity(frame) omega = vessel.orbit.body.rotational_speed mu = vessel.orbit.body.gravitational_parameter y0 = list(r0)+list(v0) t_grid = np.arange(0.0,60.0*20,5.0) re...
true
true
1c4334625377c3c0e7ac7312e2837d4a6d25667d
1,151
py
Python
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
null
null
null
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
1
2020-12-17T02:09:29.000Z
2020-12-17T02:09:29.000Z
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
null
null
null
from exts import db from app.models import User, Preference, Club, Post, Like, Comment def add_items(): u1 = User(id=1, username='jhc', password='hehehe', email='jhc@pku.edu.cn') u2 = User(id=2, username='gf', password='gagaga', email='gf@stu.pku.edu.cn') u3 = User(id=3, username='zhp', password='hailjd',...
37.129032
82
0.655951
from exts import db from app.models import User, Preference, Club, Post, Like, Comment def add_items(): u1 = User(id=1, username='jhc', password='hehehe', email='jhc@pku.edu.cn') u2 = User(id=2, username='gf', password='gagaga', email='gf@stu.pku.edu.cn') u3 = User(id=3, username='zhp', password='hailjd',...
true
true
1c433609b1e3a76fc08d0fd1cbd6dafcf08efe6a
11,179
py
Python
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
2
2021-09-04T03:39:26.000Z
2021-09-05T00:29:20.000Z
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
4
2021-09-04T07:50:41.000Z
2021-09-05T09:35:20.000Z
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
2
2021-09-03T00:01:17.000Z
2021-09-06T06:38:20.000Z
import re import falcon import simplejson as json import mysql.connector import config from datetime import datetime, timedelta, timezone class Reporting: @staticmethod def __init__(): """"Initializes Reporting""" pass @staticmethod def on_options(req, resp): resp.status = fal...
49.684444
120
0.469631
import re import falcon import simplejson as json import mysql.connector import config from datetime import datetime, timedelta, timezone class Reporting: @staticmethod def __init__(): pass @staticmethod def on_options(req, resp): resp.status = falcon.HTTP_200 ...
true
true
1c4336b105b492bd501735393b32c1a2be626606
5,514
py
Python
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
1
2022-01-27T14:51:18.000Z
2022-01-27T14:51:18.000Z
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
null
null
null
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
null
null
null
from airflow.decorators import dag, task from airflow.utils.dates import days_ago from airflow.operators.bash import BashOperator from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.models import Variable from datetime import datet...
38.830986
143
0.591222
from airflow.decorators import dag, task from airflow.utils.dates import days_ago from airflow.operators.bash import BashOperator from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.models import Variable from datetime import datet...
true
true
1c4336c8355df8a2828caa6afe949180f0053eaa
3,088
py
Python
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
2
2021-01-15T15:58:44.000Z
2021-04-15T15:29:04.000Z
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
null
null
null
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
null
null
null
from tkinter import Tk,Radiobutton, Button,Label,StringVar,IntVar,Entry class TipCalculator(): def __init__(self): window = Tk() window.title("Tip Calculator App") window.configure(background="sky blue") window.geometry("375x250") window.resizable(width=False,height=...
35.906977
103
0.647668
from tkinter import Tk,Radiobutton, Button,Label,StringVar,IntVar,Entry class TipCalculator(): def __init__(self): window = Tk() window.title("Tip Calculator App") window.configure(background="sky blue") window.geometry("375x250") window.resizable(width=False,height=...
true
true
1c4336de70a1d80e4e3fa9569e8ca3984e4bbef7
5,855
py
Python
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # filename: build_test_db.py # modified: 2019-10-29 import sys sys.path.append("../") from pprint import pprint from flask import current_app from requests.sessions import Session from requests.compat import json from app import create_app, db from app.models import Adm...
25.34632
86
0.616225
import sys sys.path.append("../") from pprint import pprint from flask import current_app from requests.sessions import Session from requests.compat import json from app import create_app, db from app.models import Admin, User from app.core.const import SAFETY_PROFILE from app.core.exceptions import Success BASE_U...
true
true
1c433737047e09d318ff08a65f9b1dc95a9604fc
2,229
py
Python
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2018-2022, CRS4 - Center for Advanced Studies, Research and Development in Sardinia # # 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...
35.380952
96
0.493046
import sched from time import sleep, time class TaskWrapper(object): def __init__(self, task, period, priority, scheduler, *args, **kwargs): self._task = task self._period = period self._priority = priority self._scheduler = scheduler self._args = args ...
true
true
1c4337947826be9ce90962a0fce2550f49d15f6b
3,284
py
Python
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStrings(Koan): # def test_show_us_what_strings_do(self): # a = 1 # print(string1 = "a == {a}") # print(string2 = 'a == {a}') # print(string3 = """a == {a}""") def test_double_quoted_strings_are_...
32.84
85
0.637028
from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' ...
true
true
1c433794e4e123470798b01d9ce643005c276372
3,411
py
Python
examples/color/colormaps_reference.py
mkcor/matplotlib
016a4e350cf48aa6ebb969abfcb3cee1904969e4
[ "MIT", "BSD-3-Clause" ]
16
2016-06-14T19:45:35.000Z
2020-11-30T19:02:58.000Z
Documentation/matplotlib/mpl_examples/color/colormaps_reference.py
leesavide/pythonista-docs
9ec3363f07e328bde0a58738a16907f11dfd06e1
[ "Apache-2.0" ]
1
2016-06-15T07:10:27.000Z
2016-06-15T07:10:27.000Z
Documentation/matplotlib/mpl_examples/color/colormaps_reference.py
leesavide/pythonista-docs
9ec3363f07e328bde0a58738a16907f11dfd06e1
[ "Apache-2.0" ]
null
null
null
""" Reference for colormaps included with Matplotlib. This reference example shows all colormaps included with Matplotlib. Note that any colormap listed here can be reversed by appending "_r" (e.g., "pink_r"). These colormaps are divided into the following categories: Sequential: These colormaps are approximately...
42.6375
79
0.620053
import numpy as np import matplotlib.pyplot as plt cmaps = [('Sequential', ['binary', 'Blues', 'BuGn', 'BuPu', 'gist_yarg', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', 'Reds', 'YlG...
true
true
1c4337a1a0edfb82064a32346d4a3f22552cfa5d
900
py
Python
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
class Solution: """ @param s: a string @return: reverse only the vowels of a string """ def reverseVowels(self, s): vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] vowels_positions = [] vowels_in_string = [] for i, ss in enumerate(s): ...
28.125
68
0.465556
class Solution: def reverseVowels(self, s): vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] vowels_positions = [] vowels_in_string = [] for i, ss in enumerate(s): if ss in vowels: vowels_positions.append(i) vow...
true
true
1c433806301ab740218f064066f85c2ca5542cfa
1,283
py
Python
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
""" Support for Volkswagen Carnet Platform """ import logging from homeassistant.helpers.entity import ToggleEntity from . import DATA_KEY, VolkswagenEntity _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """ Setup the volkswagen swit...
29.159091
86
0.691348
import logging from homeassistant.helpers.entity import ToggleEntity from . import DATA_KEY, VolkswagenEntity _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): if discovery_info is None: return async_add_entities([Volkswagen...
true
true
1c4338ae38a6705f96e83955c78a4df816be2bda
915
py
Python
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import random class Generator: def __init__(self): pass def random_string(self, length=10): return ''.join([chr(int(random.random() * (ord('z') - ord('a'))) + ord('a')) for c in range(length)]) def random_phrase(self, length=10, word_length=10): ...
32.678571
110
0.602186
import random class Generator: def __init__(self): pass def random_string(self, length=10): return ''.join([chr(int(random.random() * (ord('z') - ord('a'))) + ord('a')) for c in range(length)]) def random_phrase(self, length=10, word_length=10): return ' '.join([se...
true
true
1c43394790c2be2b49bba1d33554a2876abc4543
529
py
Python
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
2
2019-06-27T16:00:17.000Z
2020-08-14T07:46:05.000Z
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
26
2020-02-15T22:39:35.000Z
2022-02-19T21:09:01.000Z
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
1
2021-11-12T22:30:15.000Z
2021-11-12T22:30:15.000Z
# Generated by Django 2.2.10 on 2020-02-15 18:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('landing', '0077_auto_20190618_0829'), ] operations = [ migrations.AlterField( model_name='section', name='featured_...
27.842105
180
0.644612
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('landing', '0077_auto_20190618_0829'), ] operations = [ migrations.AlterField( model_name='section', name='featured_template', field=models.CharField(cho...
true
true
1c433ac930cb19d2d759684e1136fef5a382b3db
3,261
py
Python
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
""" Django settings for unikastaroak project. Generated by 'django-admin startproject' using Django 1.11.7. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ #codi...
26.088
91
0.701625
import os SECURE_SSL_REDIRECT = True BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '1(o*qoluw*3i1brm0(+lum22k7v@jc+l(com94g5up$-*e_9bd' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'd...
true
true
1c433b4735f0971086fcc7a912331746ead9bc23
507
py
Python
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
null
null
null
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
null
null
null
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
1
2020-01-05T21:34:25.000Z
2020-01-05T21:34:25.000Z
# -*- coding: utf-8 -*- class CloudFix(object): """ Fixes the REMOTE_ADDR given if the app is run behind CloudFlare w/ nginx setting CF-Connecting-IP. """ def __init__(self, app): self.app = app def __call__(self, environ, start_response): connecting_ip = environ.get('HTTP_CF...
28.166667
64
0.64497
class CloudFix(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): connecting_ip = environ.get('HTTP_CF_CONNECTING_IP', '') if connecting_ip: environ['REMOTE_ADDR'] = connecting_ip return self.app(environ, start_response)
true
true
1c433bc11c80dadd9785e0089ecbc09c6ace7239
1,465
py
Python
test.py
martinwe001/U-Net-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
3
2021-12-14T09:12:08.000Z
2022-03-14T11:31:13.000Z
test.py
martinwe001/CNNs-for-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
null
null
null
test.py
martinwe001/CNNs-for-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
null
null
null
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" import tensorflow as tf import numpy as np import cv2 from glob import glob from tqdm import tqdm import tensorflow_addons as tfa if __name__ == "__main__": """ Load the test images """ test_images = glob("building-segmentation/test/test_64/*") """ Load ...
27.641509
152
0.606826
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" import tensorflow as tf import numpy as np import cv2 from glob import glob from tqdm import tqdm import tensorflow_addons as tfa if __name__ == "__main__": test_images = glob("building-segmentation/test/test_64/*") model = 'unet' epochs = 300 res =...
true
true
1c433bffa908cc42bff4c65440b2b56678682692
1,975
py
Python
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
1
2022-01-08T01:38:57.000Z
2022-01-08T01:38:57.000Z
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
null
null
null
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
null
null
null
import torch from pytorch.common.blocks import mobilenetv3_block from onnx_export import common class ExportMobilenetV3: default_conditions = { "in_channels": 64, "spatial_dimension": 128, } sequential_conditions = { "in_channels": [32, 64, 128], } def get_all_conditions...
28.623188
85
0.585316
import torch from pytorch.common.blocks import mobilenetv3_block from onnx_export import common class ExportMobilenetV3: default_conditions = { "in_channels": 64, "spatial_dimension": 128, } sequential_conditions = { "in_channels": [32, 64, 128], } def get_all_conditions...
true
true
1c433e01186700b7be39cc948171e3292588ea2d
302
py
Python
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
import math def is_digit_factorial_sum(number): return number == sum((math.factorial(int(i)) for i in str(number))) def find_digit_factorials_below(number): for i in range(10, number): if is_digit_factorial_sum(i): yield(i) print(sum(find_digit_factorials_below(10**7)))
25.166667
71
0.701987
import math def is_digit_factorial_sum(number): return number == sum((math.factorial(int(i)) for i in str(number))) def find_digit_factorials_below(number): for i in range(10, number): if is_digit_factorial_sum(i): yield(i) print(sum(find_digit_factorials_below(10**7)))
true
true
1c433fa7868fe1c11080ceaef1de8eec4bb09f43
974
py
Python
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
from applications.extensions import ma from marshmallow import fields # 权限models序列化类 class PowerSchema(ma.Schema): id = fields.Integer() title = fields.Str(attribute="name") type = fields.Str() code = fields.Str() href = fields.Str(attribute="url") openType = fields.Str(attribute="open_type") ...
29.515152
48
0.679671
from applications.extensions import ma from marshmallow import fields class PowerSchema(ma.Schema): id = fields.Integer() title = fields.Str(attribute="name") type = fields.Str() code = fields.Str() href = fields.Str(attribute="url") openType = fields.Str(attribute="open_type") parent_id =...
true
true
1c4340253aae3fe1b54ac0df1ebeba8097c29baa
9,152
py
Python
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- """YOLOv4 for MS COCO. # Reference: - [tensorflow-yolov4-tflite]( https://github.com/hunglc007/tensorflow-yolov4-tflite) """ import tensorflow as tf import numpy as np import tensorlayer as tl from tensorlayer.activation import mish from tensorlayer.layers import Conv2d...
41.225225
116
0.666412
import tensorflow as tf import numpy as np import tensorlayer as tl from tensorlayer.activation import mish from tensorlayer.layers import Conv2d, MaxPool2d, BatchNorm2d, ZeroPad2d, UpSampling2d, Concat, Input, Elementwise from tensorlayer.models import Model from tensorlayer import logging INPUT_SIZE = 416 weights_u...
true
true
1c4340270dcdef2713ee8a18152ba3aebc09a59b
2,836
py
Python
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
# Heute wollen wir ein externes Paket installieren. # # Dazu wird in Python `pip` verwendet. # # Setzt Datei virtualenv_und_pip.md voraus. # %% Venv erstellen -- Tests 10 20 # Damit man Pakete später wieder einfach löschen kann, legt man am besten ein # Virtual Environment an. # Das geht am besten in der Konsole power...
41.101449
98
0.744711
try: import requests from cat_fact.client import CatClient cat_client = CatClient(requests.Session(), "http://cat-fact.herokuapp.com") cat_client.get_random_fact("cat") except ImportError: "Katzen sind tolle Tiere" except ModuleNotFoundError: "Katzen sind tolle Tiere"
true
true
1c43409cd5f286e144c46827ab418d817bfc839f
9,301
bzl
Python
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
2
2020-01-13T19:37:29.000Z
2021-01-18T05:52:44.000Z
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
null
null
null
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.321033
101
0.641006
def _path_inside_wheel(input_file): # manually instead of using short_path here. root = input_file.root.path if root != "": # TODO: '/' is wrong on windows, but the path separator is not available in skylark. # Fix this once ctx.configuration has directory separator information. ...
true
true
1c43435b0db90baabc818eeeb1b256f1f625d861
838
py
Python
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
import os from flask import Flask from flask_restful import Api from flask_jwt import JWT from security import authenticate, identity from resources.user import UserRegister from resources.item import Item, ItemList from resources.store import Store, StoreList app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_UR...
29.928571
91
0.768496
import os from flask import Flask from flask_restful import Api from flask_jwt import JWT from security import authenticate, identity from resources.user import UserRegister from resources.item import Item, ItemList from resources.store import Store, StoreList app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_UR...
true
true
1c4343837fc4e55a0a92d392000573c4581268cb
2,673
py
Python
networkx/linalg/tests/test_spectrum.py
bjedwards/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
3
2016-02-06T01:18:41.000Z
2020-11-10T08:15:33.000Z
networkx/linalg/tests/test_spectrum.py
tomzhang/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
null
null
null
networkx/linalg/tests/test_spectrum.py
tomzhang/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
7
2015-04-28T19:19:30.000Z
2022-02-06T11:46:29.000Z
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestSpectrum(object): @classmethod def setupClass(cls): global numpy global assert_equal global assert_almost_equal try: import numpy from...
36.616438
74
0.483726
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestSpectrum(object): @classmethod def setupClass(cls): global numpy global assert_equal global assert_almost_equal try: import numpy from...
true
true
1c4343ae4b115bd8ea517c39a6fe9b057f3ad62d
443
py
Python
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
import random import os import json count = int(os.getenv("FILE_COUNT") or 100) words = [word.strip() for word in open('/usr/share/dict/words').readlines()] for identifier in range(count): amount = random.uniform(1.0, 1000) content = { 'topic': random.choice(words), 'value': "%.2f" % amount ...
24.611111
76
0.623025
import random import os import json count = int(os.getenv("FILE_COUNT") or 100) words = [word.strip() for word in open('/usr/share/dict/words').readlines()] for identifier in range(count): amount = random.uniform(1.0, 1000) content = { 'topic': random.choice(words), 'value': "%.2f" % amount ...
true
true
1c43444f6c249fc8b371b96fac7f8df903b98549
89
py
Python
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
16
2018-04-12T22:38:28.000Z
2020-08-19T16:06:33.000Z
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
36
2018-03-23T15:40:26.000Z
2021-06-10T17:51:23.000Z
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
46
2018-04-06T21:03:36.000Z
2021-11-03T04:39:27.000Z
from django.apps import AppConfig class FixtureConfig(AppConfig): name = 'fixture'
14.833333
33
0.752809
from django.apps import AppConfig class FixtureConfig(AppConfig): name = 'fixture'
true
true
1c4345873e6851e4aef8c0d19674b52cae299711
11,920
py
Python
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
2
2020-08-24T00:22:03.000Z
2020-11-14T08:34:43.000Z
#!/usr/bin/env python """The MySQL database methods for GRR users and approval handling.""" from __future__ import absolute_import from __future__ import unicode_literals import MySQLdb from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import random from grr_response_server import db from grr...
35.58209
80
0.660906
from __future__ import absolute_import from __future__ import unicode_literals import MySQLdb from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import random from grr_response_server import db from grr_response_server.databases import mysql_utils from grr_response_server.rdfvalues import obje...
true
true
1c434822c8627f3057f2aef1288f8299aa05dbf6
1,931
py
Python
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function from libtbx.utils import Sorry, Usage import libtbx.phil.command_line import sys master_phil = libtbx.phil.parse(""" resname = None .type = str d_max = None .type = float polymeric_type = *Any Free Polymeric .type = choice xray_only = True .type...
28.820896
78
0.688762
from __future__ import absolute_import, division, print_function from libtbx.utils import Sorry, Usage import libtbx.phil.command_line import sys master_phil = libtbx.phil.parse(""" resname = None .type = str d_max = None .type = float polymeric_type = *Any Free Polymeric .type = choice xray_only = True .type...
true
true
1c4349ace41d27f9430e4589be24e3400d7e2a91
500
py
Python
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """settings.py Udacity conference server-side Python App Engine app user settings $Id$ created/forked from conference.py by wesc on 2014 may 24 """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = '72691056799-4vk1buhvl0r5hkkh04...
26.315789
89
0.788
WEB_CLIENT_ID = '72691056799-4vk1buhvl0r5hkkh04v7r26tv2m29p7k.apps.googleusercontent.com'
true
true
1c4349b3af412aec59ad5423ae460850b44d434f
2,807
py
Python
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
2
2019-10-08T18:59:15.000Z
2021-06-28T09:22:39.000Z
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
null
null
null
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
2
2019-10-03T06:35:20.000Z
2020-08-18T12:44:23.000Z
from .base_options import BaseOptions class TrainOptions(BaseOptions): def initialize(self, parser): parser = BaseOptions.initialize(self, parser) parser.add_argument('--display_freq', type=int, default=400, help='frequency of showing training results on screen') parser.add_argument('--dis...
90.548387
175
0.705023
from .base_options import BaseOptions class TrainOptions(BaseOptions): def initialize(self, parser): parser = BaseOptions.initialize(self, parser) parser.add_argument('--display_freq', type=int, default=400, help='frequency of showing training results on screen') parser.add_argument('--dis...
true
true
1c434aa48f3265b229e2a4c8296bfe89aec06143
811
py
Python
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
null
null
null
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
1
2021-06-10T20:32:59.000Z
2021-06-10T20:32:59.000Z
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
null
null
null
"""nginx_rtmp_wizard URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
32.44
77
0.707768
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('', views.rtmp_conf), path('admin/', admin.site.urls), ]
true
true
1c434ae9bf00b2693b91079d22ca9150a3986139
5,459
gyp
Python
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
27
2016-04-27T01:02:03.000Z
2021-12-13T08:53:19.000Z
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
2
2017-03-09T09:00:50.000Z
2017-09-21T15:48:20.000Z
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
17
2016-04-27T02:06:39.000Z
2019-12-18T08:07:00.000Z
# Copyright 2015 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # GYP file for images project. { 'targets': [ { 'target_name': 'images', 'product_name': 'skia_images', 'type': 'static_library', 'standalone_static_library...
33.697531
90
0.532881
{ 'targets': [ { 'target_name': 'images', 'product_name': 'skia_images', 'type': 'static_library', 'standalone_static_library': 1, 'dependencies': [ 'core.gyp:*', 'giflib.gyp:giflib', 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', 'etc1.gyp:libe...
true
true
1c434b5af497473b6ccd24c93ac7686c7ecb97f5
27,530
py
Python
airflow/providers/google/cloud/operators/workflows.py
Piatachock/airflow
6dd0a0df7e6a2f025e9234bdbf97b41e9b8f6257
[ "Apache-2.0" ]
3
2020-12-25T04:09:44.000Z
2021-04-02T13:37:42.000Z
airflow/providers/google/cloud/operators/workflows.py
XiangchunChen/airflow
56bdfe7a840c25360d596ca94fd11d2ccfadb4ba
[ "Apache-2.0" ]
5
2021-06-16T11:41:36.000Z
2022-01-27T17:20:37.000Z
airflow/providers/google/cloud/operators/workflows.py
XiangchunChen/airflow
56bdfe7a840c25360d596ca94fd11d2ccfadb4ba
[ "Apache-2.0" ]
2
2021-12-28T22:46:07.000Z
2022-01-08T13:29:00.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...
38.720113
104
0.663967
import hashlib import json import re import uuid from datetime import datetime, timedelta from typing import Dict, Optional, Sequence, Tuple, Union import pytz from google.api_core.exceptions import AlreadyExists from google.api_core.retry import Retry from google.cloud.workflows.executions_v1beta import Execution fro...
true
true
1c434bce107c02897258cb87e66f2cdcbcbad14c
1,804
py
Python
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
344
2020-01-10T09:45:02.000Z
2022-03-30T09:48:28.000Z
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
44
2020-01-23T03:00:56.000Z
2022-03-25T17:14:22.000Z
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
93
2020-01-10T21:17:58.000Z
2022-03-31T17:58:52.000Z
import numpy as np from mushroom_rl.algorithms.value.td import TD from mushroom_rl.approximators import Regressor from mushroom_rl.utils.parameters import to_parameter class SARSALambdaContinuous(TD): """ Continuous version of SARSA(lambda) algorithm. """ def __init__(self, mdp_info, policy, approxi...
30.066667
77
0.634701
import numpy as np from mushroom_rl.algorithms.value.td import TD from mushroom_rl.approximators import Regressor from mushroom_rl.utils.parameters import to_parameter class SARSALambdaContinuous(TD): def __init__(self, mdp_info, policy, approximator, learning_rate, lambda_coeff, features, appro...
true
true
1c434c195eeea6ea401b7813cdfd0c50091f02a0
1,219
py
Python
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
cypherdotXd/o3de
bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676
[ "Apache-2.0", "MIT" ]
11
2021-07-08T09:58:26.000Z
2022-03-17T17:59:26.000Z
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
29
2021-07-06T19:33:52.000Z
2022-03-22T10:27:49.000Z
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
4
2021-07-06T19:24:43.000Z
2022-03-31T12:42:27.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Unit tests for ly_test_tools._internal.managers.ly_process_killer """ import unittest.mock as mock import pytest ...
34.828571
114
0.794914
import unittest.mock as mock import pytest import ly_test_tools._internal.managers.ly_process_killer pytestmark = pytest.mark.SUITE_smoke class TestProcessKiller(object): @mock.patch('ly_test_tools.environment.process_utils.process_exists') def test_DetectLumberyardProcesses_ValidProcessesList_ReturnsDet...
true
true
1c434c4469fea787812685fd4db156c4149e329e
4,815
py
Python
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
1
2019-09-15T18:50:36.000Z
2019-09-15T18:50:36.000Z
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
null
null
null
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
null
null
null
rest_api_version = 99 def update_param(name, param): if name == 'metalearner_params': param['type'] = 'KeyValue' param['default_value'] = None return param return None # param untouched def class_extensions(): def metalearner(self): """Print the metalearner of an H2OStac...
37.038462
155
0.675389
rest_api_version = 99 def update_param(name, param): if name == 'metalearner_params': param['type'] = 'KeyValue' param['default_value'] = None return param return None def class_extensions(): def metalearner(self): model = self._model_json["output"] if "metalearn...
true
true
1c434cc6b89ca7223fc6db90e76c420ed7ec4e36
388
py
Python
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pip_services_logging.container.__init__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Container module initialization :copyright: Conceptual Vision Consulting LLC 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ __all__ = [...
22.823529
89
0.615979
__all__ = [ 'LoggingProcess' ] from .LoggingProcess import LoggingProcess
true
true
1c434d23a2e332d1479e4fcf2ae23a2194938eee
655
py
Python
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
"""empty message Revision ID: 373b28e97f76 Revises: 4cf0021cdcd0 Create Date: 2018-08-19 17:24:58.766750 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '373b28e97f76' down_revision = '4cf0021cdcd0' branch_labels = None depends_on = None def upgrade(): # ...
22.586207
77
0.691603
from alembic import op import sqlalchemy as sa revision = '373b28e97f76' down_revision = '4cf0021cdcd0' branch_labels = None depends_on = None def upgrade(): op.add_column('models', sa.Column('next_date', sa.Date(), nullable=True)) def downgrade(): op.drop_column('models', 'next_date')
true
true
1c434e6a0fbec6dbbca77f04a60a8550e6411695
2,210
py
Python
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
null
null
null
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
3
2019-08-13T10:20:32.000Z
2019-08-23T14:52:04.000Z
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from . import __version__ from intake.source.base import DataSource, Schema import json import dask.dataframe as dd from datetime import datetime, timedelta from azureblobfs.dask import DaskAzureBlobFileSystem class AzureBlobSource(DataSource): """Common behaviours for plugins in this rep...
32.028986
151
0.631222
from . import __version__ from intake.source.base import DataSource, Schema import json import dask.dataframe as dd from datetime import datetime, timedelta from azureblobfs.dask import DaskAzureBlobFileSystem class AzureBlobSource(DataSource): name = 'azure_blob' version = __version__ container = 'dataf...
true
true
1c434e783336bce9850898aa4594fc81c24c9d64
5,197
py
Python
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
25
2020-02-14T17:16:31.000Z
2022-02-25T14:58:42.000Z
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
15
2020-02-17T12:13:30.000Z
2021-11-30T09:12:38.000Z
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, G.A. vd. Hoorn # # 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...
37.121429
80
0.666538
import typing as t class Connection(object): def __init__( self, host: str, base_path: str, helpers_uploaded: bool, skipped_helpers_upload: bool, request_timeout: float = 5, kcl_auth: t.Optional[t.Tuple[str, str]] = None, karel_auth: t.Optional[t....
true
true
1c434ea6ac31675f1989083e696631dbcb369f69
43,613
py
Python
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
1
2021-12-31T04:10:42.000Z
2021-12-31T04:10:42.000Z
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
"""Behavioural Analysis Controller Module""" __docformat__ = "numpy" import argparse import difflib from typing import List, Union from datetime import datetime, timedelta import textwrap from prompt_toolkit.completion import NestedCompleter from colorama import Style from gamestonk_terminal import feature_flags as gt...
37.117447
121
0.570243
__docformat__ = "numpy" import argparse import difflib from typing import List, Union from datetime import datetime, timedelta import textwrap from prompt_toolkit.completion import NestedCompleter from colorama import Style from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.helper_funcs impor...
true
true
1c43500ab565f603474d3551abc7e2a246e9e65f
1,243
py
Python
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
9
2015-04-05T00:18:32.000Z
2020-05-10T03:21:19.000Z
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
3
2015-04-11T13:31:13.000Z
2015-06-19T13:45:48.000Z
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
3
2016-09-01T19:20:57.000Z
2021-04-20T08:57:45.000Z
# -*- coding: utf-8 -*- # pylint: disable=bad-continuation """ Extensions to third-party libraries. Note that you need to add the underlying package to your dependencies in addition to ``rudiments``, in case you use one of the modules in here. ``rudiments`` itself does not publish any dependencies on t...
42.862069
74
0.745776
from __future__ import absolute_import, unicode_literals, print_function
true
true
1c4350bca861826476082837fad153d4b6705c52
7,792
py
Python
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
79
2020-02-26T19:20:07.000Z
2022-03-24T11:12:57.000Z
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
34
2020-04-26T01:55:31.000Z
2022-03-15T17:38:34.000Z
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
14
2020-07-15T14:50:14.000Z
2022-01-26T21:51:30.000Z
""" The MIT License (MIT) Copyright (c) 2020 James Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publis...
35.099099
115
0.63963
from __future__ import annotations import abc import sys import traceback from collections.abc import Mapping from typing import TYPE_CHECKING, Any from typing_extensions import final from .commands import Command, Group from .context import Context if TYPE_CHECKING: from steam.ext import commands __all__ = (...
true
true
1c43517a6ac0c278538d2d7dacc69c184b3d16e4
1,340
py
Python
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
25
2020-02-14T17:16:31.000Z
2022-02-25T14:58:42.000Z
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
15
2020-02-17T12:13:30.000Z
2021-11-30T09:12:38.000Z
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2020, G.A. vd. Hoorn # # 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 applicab...
26.27451
79
0.70597
import sys from docopt import docopt from requests import exceptions import dominh def main(argv, skip_upload=False): args = docopt(__doc__, argv=argv) varname = args['<variable>'] try: c = dominh.connect(host=args['<host>'], skip_helper_upload=skip_upload) print(c.variable(varnam...
true
true
1c4351de021e4418f19db6fd841a2bfb0803c8e3
5,517
py
Python
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/DayHR
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
7
2019-07-12T07:37:50.000Z
2020-04-10T00:32:23.000Z
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/dayhr-transfer
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
null
null
null
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/dayhr-transfer
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
2
2019-08-02T21:29:52.000Z
2020-01-02T15:36:28.000Z
# -*- coding: utf-8 -*- """ Created on Thu Nov 1 12:02:27 2018 CNN调参练习version3: 使用一个类似AlexNet和VGG的简单架构 在CNN_v2的基础上,进行数据增强 @author: zyb_as """ # ----------------------------------------------------------- # 基本参数 # ----------------------------------------------------------- trainSetRootPath = '../../../dataset/trai...
32.263158
124
0.589995
trainSetRootPath = '../../../dataset/trainSetExample' validSetRootPath = '../../../dataset/validSetExample/' targetSize = (224, 224, 3) categoryNum = 3 batchSize = 32 epochNum = 100 from keras.preprocessing.image import ImageDataGenerator train_datagen = ImageData...
true
true
1c435271961185b573cfe80263e018907fa38fe0
4,404
py
Python
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # ______________________________________________________________________ '''test_forloop Test the Numba compiler on a simple for loop over an iterable object. ''' # ______________________________________________________________________ from numba.decorators import jit import numpy import unit...
33.363636
94
0.663942
from numba.decorators import jit import numpy import unittest import __builtin__ def for_loop_fn_0 (iterable): acc = 0. for value in iterable: acc += value return acc def for_loop_fn_1 (start, stop, inc): acc = 0 for value in range(start, stop, inc): acc += value return ac...
true
true
1c4353518377089683fe37c0a25d8096adebb750
7,393
py
Python
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
import json import logging import os import pkg_resources from subprocess import Popen, PIPE from .config import ( RELEASE, SUBMITTED, SOURCE, AUTOGRADED, FEEDBACK, EDX_ROOT, CONT_ROOT ) from . import file_manager as fm from . import container_manager as cm from .exceptions import DockerContainerError, Validation...
33.757991
102
0.67361
import json import logging import os import pkg_resources from subprocess import Popen, PIPE from .config import ( RELEASE, SUBMITTED, SOURCE, AUTOGRADED, FEEDBACK, EDX_ROOT, CONT_ROOT ) from . import file_manager as fm from . import container_manager as cm from .exceptions import DockerContainerError, Validation...
true
true
1c4353835cf00f4003b23a6e859d571efa53e899
1,129
py
Python
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.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...
38.931034
95
0.76705
import warnings from airflow.providers.apache.hdfs.hooks.webhdfs import WebHDFSHook warnings.warn( "This module is deprecated. Please use `airflow.providers.apache.hdfs.hooks.webhdfs`.", DeprecationWarning, stacklevel=2, )
true
true
1c4353fef35e15660683e78f01919ecd4744808d
574
py
Python
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
3
2020-07-17T05:37:41.000Z
2021-09-06T19:46:15.000Z
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
null
null
null
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
1
2020-11-21T01:25:51.000Z
2020-11-21T01:25:51.000Z
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash class TestStringHash(unittest.TestCase): def test_stringhash(self): string_hash = StringHash() self.assertEqual(string_hash.hash('abc'), 0) self.assertEqual(string_hash.hash('def'), 1) ...
31.888889
78
0.709059
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash class TestStringHash(unittest.TestCase): def test_stringhash(self): string_hash = StringHash() self.assertEqual(string_hash.hash('abc'), 0) self.assertEqual(string_hash.hash('def'), 1) ...
true
true
1c435454ba87053a25944354013eb38a8d2a0d71
1,220
py
Python
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
1
2016-05-08T18:33:12.000Z
2016-05-08T18:33:12.000Z
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
from Numeric import array, ravel, reshape, shape, alltrue, sometrue from Numeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, \ Float32, Float64, Complex32, Complex64, Float, Int, Complex from numpy import isnan as _isnan class _TypeNamespace: """Numeric compatible type aliases for use with extension fun...
28.372093
75
0.62377
from Numeric import array, ravel, reshape, shape, alltrue, sometrue from Numeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, \ Float32, Float64, Complex32, Complex64, Float, Int, Complex from numpy import isnan as _isnan class _TypeNamespace: Int8 = Int8 UInt8 = UInt8 Int16 ...
true
true
1c4354e052adc0aa774f9c2bc79318c236495b02
403
py
Python
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
1
2021-08-20T14:51:37.000Z
2021-08-20T14:51:37.000Z
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
2
2021-08-20T14:55:50.000Z
2021-08-23T22:09:45.000Z
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
null
null
null
""" ASGI config for TheHouseSteak project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TheHouseSteak.settings') application = get_asgi_application()
true
true
1c43558a0014473f068d0482a8a8fd2d833db805
11,648
py
Python
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
1
2021-08-21T09:21:21.000Z
2021-08-21T09:21:21.000Z
import logging import os from pathlib import Path import torch import torch.nn as nn from torch.optim import Adam from torch.optim.lr_scheduler import LambdaLR from tqdm import trange from config import Config from nere.data_helper import DataHelper from nere.evaluator import Evaluator class BaseTrainer(object): ...
49.777778
120
0.606542
import logging import os from pathlib import Path import torch import torch.nn as nn from torch.optim import Adam from torch.optim.lr_scheduler import LambdaLR from tqdm import trange from config import Config from nere.data_helper import DataHelper from nere.evaluator import Evaluator class BaseTrainer(object): ...
true
true
1c435843fc9b1aa7fb6f57042c4a5dfe1206dd9c
9,063
py
Python
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
2
2022-02-28T02:51:59.000Z
2022-03-24T15:23:18.000Z
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
from typing import Dict from core.constructs.backend import Backend from core.constructs.cloud_output import cloud_output_model from core.constructs.workspace import Workspace, Workspace_State, Workspace_Info from core.constructs.resource import ResourceModel from core.constructs.components import ComponentModel from ...
30.618243
88
0.439038
from typing import Dict from core.constructs.backend import Backend from core.constructs.cloud_output import cloud_output_model from core.constructs.workspace import Workspace, Workspace_State, Workspace_Info from core.constructs.resource import ResourceModel from core.constructs.components import ComponentModel from ...
true
true
1c43596eac0d0b0ab25adde8d4a9d380a9e9bd82
55,039
py
Python
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2015 Benjamin Kiessling # # 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 ...
54.548067
229
0.616708
import os import time import json import glob import uuid import click import logging import unicodedata from click import open_file from bidi.algorithm import get_display from typing import cast, Set, List, IO, Any from collections import defaultdict from kraken.lib import log from kraken.lib.exceptions import Krak...
true
true
1c435aaf0e77dfe1367116e247fb907561430e8a
3,130
py
Python
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
null
null
null
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
22
2020-09-26T00:34:37.000Z
2022-03-29T22:28:45.000Z
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
null
null
null
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sklearn.externals import joblib from sqlalchemy import create_engine from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from ...
27.946429
136
0.64984
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sklearn.externals import joblib from sqlalchemy import create_engine from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from ...
true
true
1c435b85f4b9d6a628a79791664b31d42e045c1c
751
py
Python
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
3
2019-10-09T08:33:41.000Z
2020-02-23T14:20:53.000Z
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
12
2019-10-05T17:27:58.000Z
2019-10-19T15:08:56.000Z
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
10
2019-10-05T17:01:37.000Z
2019-10-20T16:24:20.000Z
"""bikestore URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
34.136364
77
0.70972
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c435c117bd8020ae31707eefb8deb065c4d65d2
1,699
py
Python
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
17
2019-09-11T20:02:09.000Z
2020-04-19T18:20:46.000Z
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
11
2020-02-12T01:17:28.000Z
2022-02-10T18:51:55.000Z
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
5
2019-09-11T19:09:20.000Z
2020-03-09T11:10:19.000Z
# Generated by Django 2.1.3 on 2019-08-10 09:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(setting...
42.475
159
0.621542
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
1c435c7fe5171f2e64440da4f2e365288bf81aad
4,934
py
Python
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
1
2022-03-07T20:46:09.000Z
2022-03-07T20:46:09.000Z
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
null
null
null
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
1
2022-03-18T01:07:23.000Z
2022-03-18T01:07:23.000Z
import datetime as dt import pandas as pd from .client import EIA from collections import namedtuple from typing import Optional, Union CategoryCollection = namedtuple('CategoryCollection', 'items') SeriesCollection = namedtuple('SeriesCollection', 'items') class Category: def __init__( self, ...
31.031447
101
0.542967
import datetime as dt import pandas as pd from .client import EIA from collections import namedtuple from typing import Optional, Union CategoryCollection = namedtuple('CategoryCollection', 'items') SeriesCollection = namedtuple('SeriesCollection', 'items') class Category: def __init__( self, ...
true
true
1c435cc608779fbc867cb796fbc56b574704d723
6,618
py
Python
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
import argparse import csv import json import os import sys from typing import Any, Callable, Dict, Iterable, Set import logthis sys.path.append(os.path.abspath(os.getcwd()) + '/src') from util.utils import getCategories, BASE_CATEGORIES def lower_transform(predictions: Iterable[str]) -> Set[str]: """ Transforms t...
37.602273
212
0.699456
import argparse import csv import json import os import sys from typing import Any, Callable, Dict, Iterable, Set import logthis sys.path.append(os.path.abspath(os.getcwd()) + '/src') from util.utils import getCategories, BASE_CATEGORIES def lower_transform(predictions: Iterable[str]) -> Set[str]: return {pred.lowe...
true
true
1c435dece6ce248772afe2c144485740d027f7cb
27,181
py
Python
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
null
null
null
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
null
null
null
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
1
2020-09-09T16:27:51.000Z
2020-09-09T16:27:51.000Z
""" The RPyC protocol """ import sys import itertools import socket import time import gc from threading import Lock, Condition from rpyc.lib import spawn, Timeout from rpyc.lib.compat import (pickle, next, is_py3k, maxint, select_error, acquire_lock) from rpyc.lib.colls import WeakValueDi...
43.007911
119
0.567124
import sys import itertools import socket import time import gc from threading import Lock, Condition from rpyc.lib import spawn, Timeout from rpyc.lib.compat import (pickle, next, is_py3k, maxint, select_error, acquire_lock) from rpyc.lib.colls import WeakValueDict, RefCountingColl from r...
true
true
1c435df40ccfb869ca74b75601e2b8f81af69a5e
630
py
Python
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
1
2016-08-19T09:33:09.000Z
2016-08-19T09:33:09.000Z
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
null
null
null
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
null
null
null
"""empty message Revision ID: 6a6005dc2d4c Revises: 574cfcd5eb17 Create Date: 2016-09-22 00:24:15.999102 """ # revision identifiers, used by Alembic. revision = '6a6005dc2d4c' down_revision = '574cfcd5eb17' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
23.333333
100
0.7
revision = '6a6005dc2d4c' down_revision = '574cfcd5eb17' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_column('scivalue', 'amount') def downgrade(): op.add_column('scivalue', sa.Column('amount', sa.INTEGER(), autoincrement=False, nullable=True))
true
true
1c435e59e7f071e12abce0d551669c93ab68ebbc
2,289
bzl
Python
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
1
2021-06-24T15:10:49.000Z
2021-06-24T15:10:49.000Z
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
null
null
null
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
null
null
null
EXTENSION_CONFIG_VISIBILITY = ["//visibility:public"] EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"] EXTENSIONS = { "envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster", "envoy.filters.connection_pools.http.generic": "//source/extens...
99.521739
142
0.698558
EXTENSION_CONFIG_VISIBILITY = ["//visibility:public"] EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"] EXTENSIONS = { "envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster", "envoy.filters.connection_pools.http.generic": "//source/extens...
true
true
1c436011cf53472714dfe02473381d8d6a4e7c58
2,560
py
Python
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
6
2020-08-28T22:44:07.000Z
2022-01-24T20:53:00.000Z
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
1
2021-02-20T09:38:46.000Z
2021-02-20T09:38:46.000Z
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
2
2021-10-04T09:25:06.000Z
2022-02-09T09:09:09.000Z
import multiprocessing from abc import abstractmethod, ABCMeta from contextlib import contextmanager from typing import List, Union, Callable, Any, Dict import numpy as np import pandas as pd class HDF5Serializable: @abstractmethod def to_hdf5(self, db, hash, path): pass @staticmethod def fro...
32.820513
131
0.596875
import multiprocessing from abc import abstractmethod, ABCMeta from contextlib import contextmanager from typing import List, Union, Callable, Any, Dict import numpy as np import pandas as pd class HDF5Serializable: @abstractmethod def to_hdf5(self, db, hash, path): pass @staticmethod def fro...
true
true
1c436014310567c0ee3904476243c19fb93b383e
532
py
Python
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
3
2015-09-16T13:32:41.000Z
2015-09-16T15:10:20.000Z
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
81
2015-02-05T07:05:50.000Z
2020-06-02T11:27:24.000Z
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
1
2016-12-14T12:26:38.000Z
2016-12-14T12:26:38.000Z
EXPIRY_SECONDS_FOR_HOUR = 60 * 60 EXPIRY_SECONDS_FOR_DAY = 60 * 60 * 24 EXPIRY_SECONDS_FOR_WEEK = 60 * 60 * 24 * 7 EXPIRY_SECONDS_FOR_MONTH = 60 * 60 * 24 * 31 EXPIRY_SECONDS_FOR_YEAR = 60 * 60 * 24 * 365 EXPIRY_SECONDS_FOR_TIME_UNITS = { 'h': EXPIRY_SECONDS_FOR_HOUR, 'd': EXPIRY_SECONDS_FOR_DAY, 'w': EXPI...
29.555556
46
0.75
EXPIRY_SECONDS_FOR_HOUR = 60 * 60 EXPIRY_SECONDS_FOR_DAY = 60 * 60 * 24 EXPIRY_SECONDS_FOR_WEEK = 60 * 60 * 24 * 7 EXPIRY_SECONDS_FOR_MONTH = 60 * 60 * 24 * 31 EXPIRY_SECONDS_FOR_YEAR = 60 * 60 * 24 * 365 EXPIRY_SECONDS_FOR_TIME_UNITS = { 'h': EXPIRY_SECONDS_FOR_HOUR, 'd': EXPIRY_SECONDS_FOR_DAY, 'w': EXPI...
true
true
1c43614701fd1d9f4f8204066b3f979895e61bb2
140
py
Python
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
7
2020-10-26T21:33:40.000Z
2022-02-14T10:56:06.000Z
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-13T19:17:15.000Z
2022-02-13T19:17:15.000Z
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-14T10:56:08.000Z
2022-02-14T10:56:08.000Z
from .mcc_f1_curve import mcc_f1_curve from ._plot.mcc_f1_curve import plot_mcc_f1_curve from ._plot.mcc_f1_curve import MCCF1CurveDisplay
28
49
0.871429
from .mcc_f1_curve import mcc_f1_curve from ._plot.mcc_f1_curve import plot_mcc_f1_curve from ._plot.mcc_f1_curve import MCCF1CurveDisplay
true
true
1c43626b704050331b0176d0ad3a8b95c275535f
7,675
py
Python
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
10
2021-06-18T16:32:07.000Z
2022-02-11T06:25:03.000Z
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
13
2021-05-27T00:48:15.000Z
2022-01-08T16:13:59.000Z
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
18
2021-06-03T13:43:43.000Z
2022-03-25T11:04:47.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. import datetime import os import re from os.path import join, dirname from skills_finder_utils import ad_ops, blob_ops from skills_finder_utils import arm_...
54.821429
121
0.673746
import datetime import os import re from os.path import join, dirname from skills_finder_utils import ad_ops, blob_ops from skills_finder_utils import arm_ops from config import InstallConfiguration def create_gdc_deployer_identity(install_config: InstallConfiguration, resource_group: str): admin_ad_group_name ...
true
true
1c4362b3e15b08f17949d9f9d632bb7a3c1b0d2e
681
py
Python
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
f = open('input.txt') steps = f.read().strip().split(",") steps = [s.strip() for s in steps] cur_x = 0 cur_y = 0 facing = "N" for step in steps: blocks = int(step[1:]) lr = step[0] if facing == "N": facing = "W" if lr == "L" else "E" elif facing == "S": facing = "E" if lr == "L" else "W...
21.28125
42
0.478708
f = open('input.txt') steps = f.read().strip().split(",") steps = [s.strip() for s in steps] cur_x = 0 cur_y = 0 facing = "N" for step in steps: blocks = int(step[1:]) lr = step[0] if facing == "N": facing = "W" if lr == "L" else "E" elif facing == "S": facing = "E" if lr == "L" else "W...
true
true
1c436417afdedf6574bf5c1a0a23938183ec0be9
3,110
py
Python
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
import csv import json from datetime import datetime from django.contrib import admin from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.http import HttpResponse from django.urls import reverse, NoReverseMatch from django.utils.html import format_html from dataworkspace.apps.eventlog.m...
32.395833
89
0.619614
import csv import json from datetime import datetime from django.contrib import admin from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.http import HttpResponse from django.urls import reverse, NoReverseMatch from django.utils.html import format_html from dataworkspace.apps.eventlog.m...
true
true
1c436436f2326798aaf205de74c074ae0cbd9838
5,245
py
Python
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
29
2020-01-30T00:10:59.000Z
2022-03-26T21:25:25.000Z
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
13
2020-04-28T09:38:58.000Z
2022-03-12T00:15:46.000Z
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
9
2020-09-15T10:34:31.000Z
2021-06-16T20:51:04.000Z
import os import random from collections import deque from collections import namedtuple import torch.nn as nn import torch.nn.functional as F import numpy as np import torch from scipy import signal from scipy.ndimage.interpolation import shift Transition = namedtuple('Transition', ('inputs', 'labels')) class Repl...
31.787879
98
0.638322
import os import random from collections import deque from collections import namedtuple import torch.nn as nn import torch.nn.functional as F import numpy as np import torch from scipy import signal from scipy.ndimage.interpolation import shift Transition = namedtuple('Transition', ('inputs', 'labels')) class Repl...
true
true
1c436493685d5365b2b9572faad7ced80b6cdd9a
2,794
py
Python
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
1
2020-08-04T14:19:30.000Z
2020-08-04T14:19:30.000Z
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
1
2021-09-29T22:44:24.000Z
2021-09-29T22:44:24.000Z
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
2
2020-03-10T19:11:34.000Z
2020-08-04T14:19:30.000Z
#!/usr/bin/env python3 from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase # mocked car interface to work with chffrplus TS...
29.410526
93
0.687903
from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase TS = 0.01 YAW_FR = 0.2 LPG = 2 * 3.1415 * YAW_FR * TS / (1 + 2 * 3.141...
true
true
1c4365c916fd11ebbac04860062e52fb7cd37f81
765
py
Python
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from active_projects.eop.reusable_imports import * from manimlib.imports import * class RandyThinksAboutCoin(PiCreatureScene): def construct(self): randy = self.get_primary_pi_creature() randy.center() self.add(randy) self.wait() h_or_t = BinaryOption(UprightHeads().scal...
23.181818
79
0.542484
from active_projects.eop.reusable_imports import * from manimlib.imports import * class RandyThinksAboutCoin(PiCreatureScene): def construct(self): randy = self.get_primary_pi_creature() randy.center() self.add(randy) self.wait() h_or_t = BinaryOption(UprightHeads().scal...
true
true
1c436727ce1a44e7f9cbc3035c82def6d153f509
37,345
py
Python
nexus/lib/generic.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
null
null
null
nexus/lib/generic.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
11
2020-05-09T20:57:21.000Z
2020-06-10T00:00:17.000Z
nexus/lib/generic.py
williamfgc/qmcpack
732b473841e7823a21ab55ff397eed059f0f2e96
[ "NCSA" ]
null
null
null
################################################################## ## (c) Copyright 2015- by Jaron T. Krogel ## ################################################################## #====================================================================# # generic.py ...
27.622041
188
0.502664
import sys import traceback from copy import deepcopy import pickle from random import randint from utilities import sorted_py2 class generic_settings: devlog = sys.stdout raise_error = False class NexusError(Exception): None exit_call = sys.exit def nocopy(value): return value sort...
true
true
1c4367cf95f9922bb13c21a0d1b1367e1787deb5
63,124
py
Python
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
56.411081
2,956
0.699021
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['DatabaseAccountArgs', 'DatabaseAccount'] @pulumi.input_type class DatabaseAccountArgs: ...
true
true
1c4369aea349a0415f317871e3e85ce3efe8e7c9
3,971
py
Python
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
null
null
null
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
4
2017-08-22T03:15:22.000Z
2017-12-19T17:55:31.000Z
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # author: Serebryakov S., 2019 #https://astro.swarthmore.edu/transits.cgi import os import json import requests from lxml import html page = requests.get('https://astro.swarthmore.edu/print_transits.cgi?observatory_string=28.758333%3B-17.88%3BAtlantic%2FCanary%3BRoque+de+los+Muchachos%2C+La+Palma&use...
70.910714
492
0.458071
import os import json import requests from lxml import html page = requests.get('https://astro.swarthmore.edu/print_transits.cgi?observatory_string=28.758333%3B-17.88%3BAtlantic%2FCanary%3BRoque+de+los+Muchachos%2C+La+Palma&use_utc=1&observatory_latitude=&observatory_longitude=&timezone=UTC&start_date=today&days_to_pri...
true
true
1c4369fdab4c48c1a95e2314a68965d8415983d5
2,686
py
Python
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
1
2022-01-05T05:46:50.000Z
2022-01-05T05:46:50.000Z
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
null
null
null
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
null
null
null
import torch import time import logging from torch_geometric.graphgym.config import cfg from torch_geometric.graphgym.loss import compute_loss from torch_geometric.graphgym.utils.epoch import is_eval_epoch, is_ckpt_epoch from torch_geometric.graphgym.checkpoint import load_ckpt, save_ckpt, \ clean_ckpt from torch...
36.297297
77
0.627699
import torch import time import logging from torch_geometric.graphgym.config import cfg from torch_geometric.graphgym.loss import compute_loss from torch_geometric.graphgym.utils.epoch import is_eval_epoch, is_ckpt_epoch from torch_geometric.graphgym.checkpoint import load_ckpt, save_ckpt, \ clean_ckpt from torch...
true
true
1c436a4ec3351d4cc481420600a5673157ef3b13
4,929
py
Python
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
# coding: utf-8 import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, MaxPooling2D, Input, Flatten from keras.optimizers import Adam from keras.regularizers import l2 from keras import backend as K from keras.models import Model,load_model from ...
31.596154
161
0.695476
import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, MaxPooling2D, Input, Flatten from keras.optimizers import Adam from keras.regularizers import l2 from keras import backend as K from keras.models import Model,load_model from keras.callbacks ...
true
true
1c436b649a82cf4960e00d0baa54f3341444e559
2,087
py
Python
malib/trainers/utils.py
wwxFromTju/malib
7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2
[ "MIT" ]
6
2021-05-19T10:25:36.000Z
2021-12-27T03:30:33.000Z
malib/trainers/utils.py
wwxFromTju/malib
7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2
[ "MIT" ]
1
2021-05-29T04:51:37.000Z
2021-05-30T06:18:10.000Z
malib/trainers/utils.py
ying-wen/malib_deprecated
875338b81c4d87064ad31201f461ef742db05f25
[ "MIT" ]
1
2021-05-31T16:16:12.000Z
2021-05-31T16:16:12.000Z
# Created by yingwen at 2019-06-30 from copy import deepcopy import numpy as np import tensorflow as tf def add_target_actions(batch_n, agents, batch_size, multiagent=True): target_actions_n = [] for i, agent in enumerate(agents): target_actions_n.append( agent.act(batch_n[i]["next_observa...
33.66129
79
0.668903
from copy import deepcopy import numpy as np import tensorflow as tf def add_target_actions(batch_n, agents, batch_size, multiagent=True): target_actions_n = [] for i, agent in enumerate(agents): target_actions_n.append( agent.act(batch_n[i]["next_observations"], use_target=True) )...
true
true
1c436c37a9e54c42d49e6960d46a6ddee487ea78
414
py
Python
day2/test_program_alarm.py
marinmuso/adventofcode
41320aef44b4ade2f36392e5ed77363dbd5c6e79
[ "Apache-2.0" ]
null
null
null
day2/test_program_alarm.py
marinmuso/adventofcode
41320aef44b4ade2f36392e5ed77363dbd5c6e79
[ "Apache-2.0" ]
null
null
null
day2/test_program_alarm.py
marinmuso/adventofcode
41320aef44b4ade2f36392e5ed77363dbd5c6e79
[ "Apache-2.0" ]
null
null
null
import pytest from program_alarm import process_opcodes @pytest.mark.parametrize("test_input, expected", [ ([1, 0, 0, 0, 99], [2, 0, 0, 0, 99]), ([2, 3, 0, 3, 99], [2, 3, 0, 6, 99]), ([2, 4, 4, 5, 99, 0], [2, 4, 4, 5, 99, 9801]), ([1, 1, 1, 4, 99, 5, 6, 0, 99], [30, 1, 1, 4, 2, 5, 6, 0, 99]) ]) def t...
29.571429
66
0.560386
import pytest from program_alarm import process_opcodes @pytest.mark.parametrize("test_input, expected", [ ([1, 0, 0, 0, 99], [2, 0, 0, 0, 99]), ([2, 3, 0, 3, 99], [2, 3, 0, 6, 99]), ([2, 4, 4, 5, 99, 0], [2, 4, 4, 5, 99, 9801]), ([1, 1, 1, 4, 99, 5, 6, 0, 99], [30, 1, 1, 4, 2, 5, 6, 0, 99]) ]) def t...
true
true
1c436cbbda96f2d2fcc0119360c4a52d77484b57
1,436
py
Python
models/fix_sclstm16.py
latte488/smth-smth-v2
8504d10a994458769707108cbbe62adde81ca5aa
[ "Apache-2.0", "MIT" ]
2
2021-08-17T14:16:54.000Z
2021-11-06T06:06:28.000Z
models/fix_sclstm16.py
latte488/smth-smth-v2
8504d10a994458769707108cbbe62adde81ca5aa
[ "Apache-2.0", "MIT" ]
null
null
null
models/fix_sclstm16.py
latte488/smth-smth-v2
8504d10a994458769707108cbbe62adde81ca5aa
[ "Apache-2.0", "MIT" ]
1
2021-11-07T12:27:24.000Z
2021-11-07T12:27:24.000Z
import torch from torch import nn import selected_dropout rnn_units = 16 class Model(nn.Module): def __init__(self, column_units): super(Model, self).__init__() self.cnn = nn.Sequential( nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1), nn.BatchNorm2d(16), n...
29.306122
74
0.510446
import torch from torch import nn import selected_dropout rnn_units = 16 class Model(nn.Module): def __init__(self, column_units): super(Model, self).__init__() self.cnn = nn.Sequential( nn.Conv2d(3, 16, kernel_size=3, stride=1, padding=1), nn.BatchNorm2d(16), n...
true
true
1c436cfd7b87bf108a646221ae9e344c7add96a8
80
py
Python
tiletanic/__init__.py
umeier/tiletanic
461958452a793e781607deddf9828f8e2f55d248
[ "MIT" ]
19
2015-11-09T16:10:20.000Z
2020-11-27T21:28:35.000Z
tiletanic/__init__.py
umeier/tiletanic
461958452a793e781607deddf9828f8e2f55d248
[ "MIT" ]
4
2015-11-06T19:30:08.000Z
2020-03-28T19:10:25.000Z
tiletanic/__init__.py
umeier/tiletanic
461958452a793e781607deddf9828f8e2f55d248
[ "MIT" ]
9
2015-12-22T19:51:28.000Z
2021-01-27T22:52:32.000Z
from .base import Tile, Coords, CoordsBbox from . import tileschemes, tilecover
26.666667
42
0.8
from .base import Tile, Coords, CoordsBbox from . import tileschemes, tilecover
true
true
1c436dd9bb8061c46ffe29a26b483f322f9063aa
98
py
Python
chat/apps.py
Kevin1289/Clique.io_site
01e1d5505b293419da75aedb40bdefb9086696a6
[ "MIT" ]
1
2020-09-01T05:15:33.000Z
2020-09-01T05:15:33.000Z
chat/apps.py
Kevin1289/Clique.io_site
01e1d5505b293419da75aedb40bdefb9086696a6
[ "MIT" ]
null
null
null
chat/apps.py
Kevin1289/Clique.io_site
01e1d5505b293419da75aedb40bdefb9086696a6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ChatConfig(AppConfig): name = 'django_private_chat'
16.333333
33
0.77551
from django.apps import AppConfig class ChatConfig(AppConfig): name = 'django_private_chat'
true
true
1c436e9788ed48c1ecb285aa39a09207734ffac6
1,068
py
Python
992. Subarrays with K Different Integers/solution4.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
992. Subarrays with K Different Integers/solution4.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
992. Subarrays with K Different Integers/solution4.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
from typing import List class Solution: def subarraysWithKDistinct(self, A: List[int], K: int) -> int: ans = 0 d_cnt = {} start = 0 start_k = 0 # start is the starting of the window # start_k is the starting point of k distinct integers # in the windo...
29.666667
66
0.48221
from typing import List class Solution: def subarraysWithKDistinct(self, A: List[int], K: int) -> int: ans = 0 d_cnt = {} start = 0 start_k = 0 for x in A: d_cnt[x] = d_cnt.get(x, 0) + 1 if...
true
true
1c436ef56a0d3571f86e1fca49e76adc1d362e2d
4,610
py
Python
benchmark/startQiskit_QC3054.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC3054.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC3054.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=46 import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from ma...
36.015625
165
0.657918
import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np i...
true
true
1c436f5695176a99b1087e41e25bf532fa3c7feb
18,608
py
Python
tensornets/contrib_layers/optimizers.py
mehrdad-shokri/tensornets
e36eff73e5fc984977c5ceadefc1adb089e7bab5
[ "MIT" ]
1,057
2017-10-13T08:30:16.000Z
2022-03-13T19:20:22.000Z
tensornets/contrib_layers/optimizers.py
mehrdad-shokri/tensornets
e36eff73e5fc984977c5ceadefc1adb089e7bab5
[ "MIT" ]
62
2017-11-13T00:10:56.000Z
2021-11-04T09:22:43.000Z
tensornets/contrib_layers/optimizers.py
mehrdad-shokri/tensornets
e36eff73e5fc984977c5ceadefc1adb089e7bab5
[ "MIT" ]
210
2017-11-02T08:41:49.000Z
2022-03-13T19:20:25.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.195011
124
0.680729
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from .. import contrib_framework from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops im...
true
true
1c436f90b8d2bf1ddeb5aaa0ae0d9ea423af407f
2,692
py
Python
sarpy/io/product/converter.py
jordan-heemskerk/sarpy
9684c3e58a8e0d0db0cb9b16a5adb79fe9852a0a
[ "MIT" ]
null
null
null
sarpy/io/product/converter.py
jordan-heemskerk/sarpy
9684c3e58a8e0d0db0cb9b16a5adb79fe9852a0a
[ "MIT" ]
null
null
null
sarpy/io/product/converter.py
jordan-heemskerk/sarpy
9684c3e58a8e0d0db0cb9b16a5adb79fe9852a0a
[ "MIT" ]
null
null
null
""" This module provide utilities for opening any files analogous to Sensor Independent Derived Data, namely detected images in the ground plane. """ import os import sys import pkgutil from importlib import import_module from sarpy.io.general.base import BaseReader __classification__ = "UNCLASSIFIED" __author__ = ...
24.252252
85
0.641902
import os import sys import pkgutil from importlib import import_module from sarpy.io.general.base import BaseReader __classification__ = "UNCLASSIFIED" __author__ = "Thomas McCullough" _openers = [] _parsed_openers = False def register_opener(open_func): if not callable(open_func): raise TypeError...
true
true
1c436faf2475e151b87920566c243934785ebf80
1,664
py
Python
buff/trinket/spider.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
buff/trinket/spider.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
buff/trinket/spider.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
from buff import LastingBuff class Spider(LastingBuff): def __init__(self): super().__init__('spider', 2 * 60, 15) def equip(self, engine, char_state): char_state.crit += 0.01 def dequip(self, engine, char_state): char_state.crit -= 0.01 def timeout(self, rotation, engine, ...
37.818182
108
0.616587
from buff import LastingBuff class Spider(LastingBuff): def __init__(self): super().__init__('spider', 2 * 60, 15) def equip(self, engine, char_state): char_state.crit += 0.01 def dequip(self, engine, char_state): char_state.crit -= 0.01 def timeout(self, rotation, engine, ...
true
true
1c437097aa7324512cba0b35f6327c391f210265
9,375
py
Python
src/plotmanx/reporting.py
tokenchain/plotman
666e4e34eecda90aa94004ff042fefebfbf3fead
[ "Apache-2.0" ]
null
null
null
src/plotmanx/reporting.py
tokenchain/plotman
666e4e34eecda90aa94004ff042fefebfbf3fead
[ "Apache-2.0" ]
null
null
null
src/plotmanx/reporting.py
tokenchain/plotman
666e4e34eecda90aa94004ff042fefebfbf3fead
[ "Apache-2.0" ]
null
null
null
import math import os import psutil import texttable as tt # from somewhere? from . import archive, job, manager, plot_util, configuration def abbr_path(path, putative_prefix): if putative_prefix and path.startswith(putative_prefix): return os.path.relpath(path, putative_prefix) else: retur...
35.11236
134
0.58464
import math import os import psutil import texttable as tt from . import archive, job, manager, plot_util, configuration def abbr_path(path, putative_prefix): if putative_prefix and path.startswith(putative_prefix): return os.path.relpath(path, putative_prefix) else: return path def phase...
true
true
1c4371ed067b7cc5d0e0120d86bfb0013fc0a9a5
2,906
py
Python
netbox/virtualization/api/views.py
mrevilme/netbox
51f6d2f45e1bb9d53da6a7f7733673a458c50060
[ "Apache-2.0" ]
1
2021-05-04T12:53:09.000Z
2021-05-04T12:53:09.000Z
netbox/virtualization/api/views.py
emersonfelipesp/netbox
fecca5ad83fb6b48a2f15982dfd3242653f105f9
[ "Apache-2.0" ]
null
null
null
netbox/virtualization/api/views.py
emersonfelipesp/netbox
fecca5ad83fb6b48a2f15982dfd3242653f105f9
[ "Apache-2.0" ]
null
null
null
from rest_framework.routers import APIRootView from dcim.models import Device from extras.api.views import ConfigContextQuerySetMixin, CustomFieldModelViewSet, ModelViewSet from utilities.utils import count_related from virtualization import filters from virtualization.models import Cluster, ClusterGroup, ClusterType,...
33.022727
110
0.753269
from rest_framework.routers import APIRootView from dcim.models import Device from extras.api.views import ConfigContextQuerySetMixin, CustomFieldModelViewSet, ModelViewSet from utilities.utils import count_related from virtualization import filters from virtualization.models import Cluster, ClusterGroup, ClusterType,...
true
true
1c43729c8f65039b3f467f122673f02a5cc4cbc1
11,256
py
Python
saleor/payment/gateways/np_atobarai/tests/test_api_helpers.py
victor-abz/saleor
f8e2b49703d995d4304d5a690dbe9c83631419d0
[ "CC-BY-4.0" ]
1,392
2021-10-06T15:54:28.000Z
2022-03-31T20:50:55.000Z
saleor/payment/gateways/np_atobarai/tests/test_api_helpers.py
victor-abz/saleor
f8e2b49703d995d4304d5a690dbe9c83631419d0
[ "CC-BY-4.0" ]
888
2021-10-06T10:48:54.000Z
2022-03-31T11:00:30.000Z
saleor/payment/gateways/np_atobarai/tests/test_api_helpers.py
victor-abz/saleor
f8e2b49703d995d4304d5a690dbe9c83631419d0
[ "CC-BY-4.0" ]
538
2021-10-07T16:21:27.000Z
2022-03-31T22:58:57.000Z
from dataclasses import fields from decimal import Decimal from unittest.mock import DEFAULT, Mock, patch, sentinel import pytest from posuto import Posuto from .....order.fetch import OrderLineInfo from ....interface import AddressData, RefundData from ....utils import price_to_minor_unit from .. import api_helpers,...
28.714286
88
0.676173
from dataclasses import fields from decimal import Decimal from unittest.mock import DEFAULT, Mock, patch, sentinel import pytest from posuto import Posuto from .....order.fetch import OrderLineInfo from ....interface import AddressData, RefundData from ....utils import price_to_minor_unit from .. import api_helpers,...
true
true
1c43741fca9fb5451f7dc34b89f19edff48f1a2f
3,072
py
Python
kfold.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
12
2020-04-10T02:24:20.000Z
2021-11-09T22:52:24.000Z
kfold.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
7
2020-05-03T10:03:29.000Z
2022-02-09T23:38:21.000Z
kfold.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
10
2020-06-14T09:37:35.000Z
2022-02-04T22:21:16.000Z
import numpy as np import pandas as pd import os import pickle import argparse from sklearn.model_selection import KFold from utils.data_utils import * from collections import defaultdict def filt_code(data, code_type, min_=5): """ Filter code sets based on frequency count Args: min_: (int) minimum nu...
36.571429
108
0.62207
import numpy as np import pandas as pd import os import pickle import argparse from sklearn.model_selection import KFold from utils.data_utils import * from collections import defaultdict def filt_code(data, code_type, min_=5): codes = defaultdict(lambda : 0) for k, v in data.items(): for vv in v: ...
true
true
1c437445200f13523ac4b91a040d4bb026052069
134,889
py
Python
h2o-py/h2o/frame.py
DEVESHTARASIA/h2o-3
9bd73fcedb4236b7ea8f214b36ca95f3e00d4548
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/frame.py
DEVESHTARASIA/h2o-3
9bd73fcedb4236b7ea8f214b36ca95f3e00d4548
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/frame.py
DEVESHTARASIA/h2o-3
9bd73fcedb4236b7ea8f214b36ca95f3e00d4548
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ H2O data frame. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals import csv import datetime import functools import os import sys import tempfile import trac...
43.095527
135
0.609086
from __future__ import absolute_import, division, print_function, unicode_literals import csv import datetime import functools import os import sys import tempfile import traceback import warnings from io import StringIO from types import FunctionType import requests import h2o from h2o.display import H2ODisplay fro...
true
true
1c4375d0124e02a4e91d5f16efeedc52c37bb057
17,765
py
Python
sdk/python/pulumi_azure_native/sql/v20190601preview/workload_group.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/sql/v20190601preview/workload_group.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/sql/v20190601preview/workload_group.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
47.373333
663
0.677174
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = ['WorkloadGroupArgs', 'WorkloadGroup'] @pulumi.input_type class WorkloadGroupArgs: def __init__(__self__, *, database_name: pulumi.Input[s...
true
true
1c4376331213d71be83752613cbfb6ce878134b3
143
py
Python
problems/0025/compute.py
Dynortice/Project-Euler
99a0201b5d5f147eab77fc52d9db8995045cded0
[ "MIT" ]
null
null
null
problems/0025/compute.py
Dynortice/Project-Euler
99a0201b5d5f147eab77fc52d9db8995045cded0
[ "MIT" ]
null
null
null
problems/0025/compute.py
Dynortice/Project-Euler
99a0201b5d5f147eab77fc52d9db8995045cded0
[ "MIT" ]
null
null
null
from math import ceil, log, sqrt def compute(n: int) -> int: return int(ceil((log(10) * (n - 1) + log(5) / 2) / log((1 + sqrt(5)) / 2)))
23.833333
79
0.538462
from math import ceil, log, sqrt def compute(n: int) -> int: return int(ceil((log(10) * (n - 1) + log(5) / 2) / log((1 + sqrt(5)) / 2)))
true
true
1c43775eddde1322d48ee5b6171359f9460a3375
325
py
Python
dagology/tests/test_metrics.py
JamesClough/dagology
5421fd0ad439e70a61d0408eb1cacebaa403f671
[ "MIT" ]
5
2017-02-16T21:35:28.000Z
2020-08-09T07:33:30.000Z
dagology/tests/test_metrics.py
JamesClough/dagology
5421fd0ad439e70a61d0408eb1cacebaa403f671
[ "MIT" ]
null
null
null
dagology/tests/test_metrics.py
JamesClough/dagology
5421fd0ad439e70a61d0408eb1cacebaa403f671
[ "MIT" ]
3
2018-04-20T08:58:24.000Z
2020-04-11T02:25:56.000Z
from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_in from nose.tools import assert_raises from nose.tools import assert_true import networkx as nx import numpy as np import dagology as dag class TestEucludea(object): """ Unit tests for interval function""" ...
21.666667
43
0.796923
from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_in from nose.tools import assert_raises from nose.tools import assert_true import networkx as nx import numpy as np import dagology as dag class TestEucludea(object): pass
true
true
1c4377c3dc57f9c21495e90e367e31c935a9a01f
1,824
py
Python
code/hd_Preprocessing.py
snehil1703/Home-Depot-Search-Relevance-Data-Analysis
d036734f48ac35e608b792a3c68b97c97d51357f
[ "Apache-2.0" ]
null
null
null
code/hd_Preprocessing.py
snehil1703/Home-Depot-Search-Relevance-Data-Analysis
d036734f48ac35e608b792a3c68b97c97d51357f
[ "Apache-2.0" ]
null
null
null
code/hd_Preprocessing.py
snehil1703/Home-Depot-Search-Relevance-Data-Analysis
d036734f48ac35e608b792a3c68b97c97d51357f
[ "Apache-2.0" ]
null
null
null
# Importing required packages import pandas import numpy #Importing required files import hd_DataAnalysis as sd import hd_Preprocessing as prep # Extracting the features of the three main attributes def feature_extraction(main_data): main_data['search_term'] = main_data['search_term'].map(lambda x: sd.preprocess_w...
46.769231
142
0.750548
import pandas import numpy import hd_DataAnalysis as sd import hd_Preprocessing as prep def feature_extraction(main_data): main_data['search_term'] = main_data['search_term'].map(lambda x: sd.preprocess_word(x)) main_data['product_title'] = main_data['product_title'].map(lambda x: sd.preprocess_word(x)) main_data...
true
true