hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7534670d85b577a161a1b22f813beb55a6cff0a
506
py
Python
src/fidalgo/azext_fidalgo/vendored_sdks/fidalgo/_version.py
tbyfield/azure-cli-extensions
e7e5f37fdcea3afb5c4aecb61fa72eac72c2128e
[ "MIT" ]
null
null
null
src/fidalgo/azext_fidalgo/vendored_sdks/fidalgo/_version.py
tbyfield/azure-cli-extensions
e7e5f37fdcea3afb5c4aecb61fa72eac72c2128e
[ "MIT" ]
null
null
null
src/fidalgo/azext_fidalgo/vendored_sdks/fidalgo/_version.py
tbyfield/azure-cli-extensions
e7e5f37fdcea3afb5c4aecb61fa72eac72c2128e
[ "MIT" ]
1
2022-02-14T21:43:29.000Z
2022-02-14T21:43:29.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.6
94
0.543478
VERSION = "2021-06-01-privatepreview"
true
true
f75348bae679f8b1170f53bcf2ccbdb72b438872
7,388
py
Python
staffing/staffing/report/employee_timesheet/employee_timesheet.py
exvas/staffing
98812d5bb326d5b01274c6edf9e10eff142410c2
[ "MIT" ]
null
null
null
staffing/staffing/report/employee_timesheet/employee_timesheet.py
exvas/staffing
98812d5bb326d5b01274c6edf9e10eff142410c2
[ "MIT" ]
null
null
null
staffing/staffing/report/employee_timesheet/employee_timesheet.py
exvas/staffing
98812d5bb326d5b01274c6edf9e10eff142410c2
[ "MIT" ]
null
null
null
# Copyright (c) 2013, jan and contributors # For license information, please see license.txt import frappe from frappe.utils import money_in_words from calendar import monthrange def get_columns(filters): columns = [ # {"label": "SL#","fieldname": "sl_number", "fieldtype": "Data", "width": "50"}, ...
49.583893
171
0.599756
import frappe from frappe.utils import money_in_words from calendar import monthrange def get_columns(filters): columns = [ {"label": "Iqama No", "fieldname": "employee", "fieldtype": "Data", "width": "100"}, {"label": "Reference Details", "fieldname": "charge_type", "fieldtype": "Data", "...
true
true
f75349b5b63d5e2881b4b8bbe6a8ab98a9fbeb31
594
py
Python
src/portals/customer/urls.py
IkramKhan-DevOps/cw-dj-eventmanagement
29985447e1a62cdb7d961f7629ced6869210dc99
[ "MIT" ]
1
2021-12-27T10:49:52.000Z
2021-12-27T10:49:52.000Z
src/portals/customer/urls.py
IkramKhan-DevOps/cw-dj-eventmanagement
29985447e1a62cdb7d961f7629ced6869210dc99
[ "MIT" ]
null
null
null
src/portals/customer/urls.py
IkramKhan-DevOps/cw-dj-eventmanagement
29985447e1a62cdb7d961f7629ced6869210dc99
[ "MIT" ]
null
null
null
from django.urls import path from django.views.generic import TemplateView from .views import ( EventsListView, EventDetailView, EventCreateView, EventDeleteView, DashboardView ) app_name = "customer-portal" urlpatterns = [ path('dashboard', DashboardView.as_view(), name='dashboard'), path('event/', Event...
34.941176
84
0.718855
from django.urls import path from django.views.generic import TemplateView from .views import ( EventsListView, EventDetailView, EventCreateView, EventDeleteView, DashboardView ) app_name = "customer-portal" urlpatterns = [ path('dashboard', DashboardView.as_view(), name='dashboard'), path('event/', Event...
true
true
f75349c20b075bd84d6541b1ffe488faa4ec453f
4,484
py
Python
lib/surface/compute/project_info/set_default_service_account.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/compute/project_info/set_default_service_account.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/project_info/set_default_service_account.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2016 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
37.680672
80
0.730375
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions from googlecloudsdk.core import properties @base.ReleaseTrack...
true
true
f75349e713804b08e8aeac53186a96a8036ad114
662
py
Python
src/data/475.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/475.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/475.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
n, q = map(int, input().split()) adj = [[] for _ in range(n)] for _ in range(n - 1): a, b = map(int, input().split()) adj[a - 1].append(b - 1) adj[b - 1].append(a - 1) c = [0] * q d = [0] * q for i in range(q): c[i], d[i] = map(int, input().split()) c[i] -= 1 d[i] -= 1 from collections import d...
19.470588
42
0.460725
n, q = map(int, input().split()) adj = [[] for _ in range(n)] for _ in range(n - 1): a, b = map(int, input().split()) adj[a - 1].append(b - 1) adj[b - 1].append(a - 1) c = [0] * q d = [0] * q for i in range(q): c[i], d[i] = map(int, input().split()) c[i] -= 1 d[i] -= 1 from collections import d...
true
true
f7534a50fcac6d0f8c8844f6bcaa9af2f4d717ee
2,219
py
Python
models/randomforest.py
chrishwiggins/pepperon.ai
8df7c41463939c6358c0a60b8189f378c2c1df72
[ "MIT" ]
null
null
null
models/randomforest.py
chrishwiggins/pepperon.ai
8df7c41463939c6358c0a60b8189f378c2c1df72
[ "MIT" ]
null
null
null
models/randomforest.py
chrishwiggins/pepperon.ai
8df7c41463939c6358c0a60b8189f378c2c1df72
[ "MIT" ]
null
null
null
""" A Random forest model """ __author__ = "Jon Wiggins" from decisiontree import * import pandas as pd import operator class RandomForest: """ A Random forest model """ def __init__(self): self.forest = [] self.target_label = None def train( self, ...
29.586667
87
0.571429
__author__ = "Jon Wiggins" from decisiontree import * import pandas as pd import operator class RandomForest: def __init__(self): self.forest = [] self.target_label = None def train( self, examples, target_label, depth_budget=1, tree...
true
true
f7534c8cd70b6098ea7d5a92904007791df06586
1,707
py
Python
tests/modules/seq2seq_encoders/gated_cnn_encoder_test.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
11,433
2017-06-27T03:08:46.000Z
2022-03-31T18:14:33.000Z
tests/modules/seq2seq_encoders/gated_cnn_encoder_test.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
4,006
2017-06-26T21:45:43.000Z
2022-03-31T02:11:10.000Z
tests/modules/seq2seq_encoders/gated_cnn_encoder_test.py
MSLars/allennlp
2cdb8742c8c8c3c38ace4bdfadbdc750a1aa2475
[ "Apache-2.0" ]
2,560
2017-06-26T21:16:53.000Z
2022-03-30T07:55:46.000Z
import torch from allennlp.common.testing import AllenNlpTestCase from allennlp.modules.seq2seq_encoders.gated_cnn_encoder import GatedCnnEncoder class TestGatedCnnEncoder(AllenNlpTestCase): def test_gated_cnn_encoder(self): cnn_encoder = GatedCnnEncoder( input_dim=32, layers=[[[4...
33.470588
89
0.565319
import torch from allennlp.common.testing import AllenNlpTestCase from allennlp.modules.seq2seq_encoders.gated_cnn_encoder import GatedCnnEncoder class TestGatedCnnEncoder(AllenNlpTestCase): def test_gated_cnn_encoder(self): cnn_encoder = GatedCnnEncoder( input_dim=32, layers=[[[4...
true
true
f7535088ae1d4391c878358529b73d6509e87284
805
py
Python
nmostesting/suites/IS0601Test.py
maxwalter79/nmos-testing
15a4918adb65a9127fe60fdb4350b73931ece48b
[ "Apache-2.0" ]
25
2018-12-20T16:38:44.000Z
2021-12-21T08:13:52.000Z
nmostesting/suites/IS0601Test.py
maxwalter79/nmos-testing
15a4918adb65a9127fe60fdb4350b73931ece48b
[ "Apache-2.0" ]
409
2018-12-19T17:00:27.000Z
2022-03-30T14:11:45.000Z
nmostesting/suites/IS0601Test.py
maxwalter79/nmos-testing
15a4918adb65a9127fe60fdb4350b73931ece48b
[ "Apache-2.0" ]
38
2018-12-21T08:50:24.000Z
2022-02-16T09:10:13.000Z
# Copyright (C) 2018 British Broadcasting Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.541667
75
0.718012
from ..GenericTest import GenericTest class IS0601Test(GenericTest): def __init__(self, apis): GenericTest.__init__(self, apis)
true
true
f75351773efa20b8f15389d8a1be1e9efb9e8143
3,156
py
Python
chainer/functions/math/minmax.py
fukuta0614/Chainer
337fe78e1c27924c1195b8b677a9b2cd3ea68828
[ "MIT" ]
null
null
null
chainer/functions/math/minmax.py
fukuta0614/Chainer
337fe78e1c27924c1195b8b677a9b2cd3ea68828
[ "MIT" ]
1
2016-11-09T06:32:32.000Z
2016-11-09T10:20:04.000Z
chainer/functions/math/minmax.py
fukuta0614/Chainer
337fe78e1c27924c1195b8b677a9b2cd3ea68828
[ "MIT" ]
null
null
null
from chainer import cuda from chainer import function from chainer.utils import type_check class SelectorBase(function.Function): """Select an array element from a given axis or set of axes.""" def __init__(self, axis=None, keepdims=False): self.keepdims = keepdims if axis is None: ...
29.773585
79
0.563688
from chainer import cuda from chainer import function from chainer.utils import type_check class SelectorBase(function.Function): def __init__(self, axis=None, keepdims=False): self.keepdims = keepdims if axis is None: self.axis = None elif isinstance(axis, int): s...
true
true
f7535199a30c24e865ccc4ae89dd6349346f1ccf
149
py
Python
employees_app/employees_app/template_examples/urls_templates.py
LBistrev/python-web-basic
e798d5eb22657a014d3dd0f98e4c3c585336c4fc
[ "MIT" ]
null
null
null
employees_app/employees_app/template_examples/urls_templates.py
LBistrev/python-web-basic
e798d5eb22657a014d3dd0f98e4c3c585336c4fc
[ "MIT" ]
null
null
null
employees_app/employees_app/template_examples/urls_templates.py
LBistrev/python-web-basic
e798d5eb22657a014d3dd0f98e4c3c585336c4fc
[ "MIT" ]
null
null
null
from django.urls import path from employees_app.template_examples.views import index urlpatterns = ( path('', index, name='templates index'), )
21.285714
55
0.751678
from django.urls import path from employees_app.template_examples.views import index urlpatterns = ( path('', index, name='templates index'), )
true
true
f75351d06dab9a29c74aefca82d6598fd2cec556
353
py
Python
backend/mongodb/initialize-db.py
ThodoriKapouranis/ECE464-Databases-Final-Quizlet
1231b5a4a683c4dffd354d044dff02100edb9b97
[ "MIT" ]
null
null
null
backend/mongodb/initialize-db.py
ThodoriKapouranis/ECE464-Databases-Final-Quizlet
1231b5a4a683c4dffd354d044dff02100edb9b97
[ "MIT" ]
null
null
null
backend/mongodb/initialize-db.py
ThodoriKapouranis/ECE464-Databases-Final-Quizlet
1231b5a4a683c4dffd354d044dff02100edb9b97
[ "MIT" ]
null
null
null
from enum import unique from flask_pymongo import PyMongo from pymongo import MongoClient from settings import MONGO_URI Client = MongoClient(MONGO_URI) db = Client["Quizlet"] users_db = db.users auths_db = db.auths decks_db = db.decks cards_db = db.cards users_db.create_index(("email"), unique=True) users_db.create_...
23.533333
48
0.790368
from enum import unique from flask_pymongo import PyMongo from pymongo import MongoClient from settings import MONGO_URI Client = MongoClient(MONGO_URI) db = Client["Quizlet"] users_db = db.users auths_db = db.auths decks_db = db.decks cards_db = db.cards users_db.create_index(("email"), unique=True) users_db.create_...
true
true
f753536b15df71ca169bfe10d61189997161cdb0
83
py
Python
jonze/__init__.py
zeionara/jonze
fe6abb7f81ae23ba1b05a9afef45a2d60a2ce900
[ "MIT" ]
null
null
null
jonze/__init__.py
zeionara/jonze
fe6abb7f81ae23ba1b05a9afef45a2d60a2ce900
[ "MIT" ]
null
null
null
jonze/__init__.py
zeionara/jonze
fe6abb7f81ae23ba1b05a9afef45a2d60a2ce900
[ "MIT" ]
null
null
null
from . import __main__ name = "jonze" train = __main__.train test = __main__.test
13.833333
22
0.73494
from . import __main__ name = "jonze" train = __main__.train test = __main__.test
true
true
f75353ba9c7c8463785cea6e7de65f4b806949bc
2,127
py
Python
anchore_manager/util/logging.py
Nordix/anchore-engine
f25baa5cbf9aa34d56e56b341a90f577d85e6146
[ "Apache-2.0" ]
null
null
null
anchore_manager/util/logging.py
Nordix/anchore-engine
f25baa5cbf9aa34d56e56b341a90f577d85e6146
[ "Apache-2.0" ]
3
2021-07-15T19:58:01.000Z
2021-09-16T09:39:46.000Z
anchore_manager/util/logging.py
Nordix/anchore-engine
f25baa5cbf9aa34d56e56b341a90f577d85e6146
[ "Apache-2.0" ]
null
null
null
import json import sys from collections import OrderedDict from anchore_engine.subsys import logger from anchore_manager.util.proc import ExitCode from anchore_manager.util.config import DEFAULT_CONFIG import logging # Sane default _log_config = DEFAULT_CONFIG def format_error_output(config, op, params, payload): ...
24.170455
93
0.637047
import json import sys from collections import OrderedDict from anchore_engine.subsys import logger from anchore_manager.util.proc import ExitCode from anchore_manager.util.config import DEFAULT_CONFIG import logging _log_config = DEFAULT_CONFIG def format_error_output(config, op, params, payload): try: ...
true
true
f753543130b19ca986ec0330c329be6cc1c73889
1,657
py
Python
mlfromscratch/lda.py
Guangrui-best/ML_from_scratch
afbdfb7046544bd5639a2b73fa4fe711b4c86593
[ "MIT" ]
1
2021-01-29T02:16:40.000Z
2021-01-29T02:16:40.000Z
mlfromscratch/lda.py
iliasprc/MLfromscratch
afbdfb7046544bd5639a2b73fa4fe711b4c86593
[ "MIT" ]
null
null
null
mlfromscratch/lda.py
iliasprc/MLfromscratch
afbdfb7046544bd5639a2b73fa4fe711b4c86593
[ "MIT" ]
1
2021-08-03T21:17:01.000Z
2021-08-03T21:17:01.000Z
import numpy as np class LDA: def __init__(self, n_components): self.n_components = n_components self.linear_discriminants = None def fit(self, X, y): n_features = X.shape[1] class_labels = np.unique(y) # Within class scatter matrix: # SW = sum((X_c - mean_X_c...
33.816327
83
0.568497
import numpy as np class LDA: def __init__(self, n_components): self.n_components = n_components self.linear_discriminants = None def fit(self, X, y): n_features = X.shape[1] class_labels = np.unique(y) mean_overall = np.mean(X, axis=...
true
true
f75356abe88cff2051d9c63cdb8d2416ff2e6c8d
2,892
py
Python
teardrops/teardrop_dialog.py
gymb2015/kicad6-nightly-teardrops-fix
638fcac5636f4f48af5a2153269914c14f70985b
[ "BSD-3-Clause" ]
null
null
null
teardrops/teardrop_dialog.py
gymb2015/kicad6-nightly-teardrops-fix
638fcac5636f4f48af5a2153269914c14f70985b
[ "BSD-3-Clause" ]
null
null
null
teardrops/teardrop_dialog.py
gymb2015/kicad6-nightly-teardrops-fix
638fcac5636f4f48af5a2153269914c14f70985b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Teardrop for pcbnew using filled zones # This is the plugin WX dialog # (c) Niluje 2019 thewireddoesntexist.org # # Based on Teardrops for PCBNEW by svofski, 2014 http://sensi.org/~svo # Cubic Bezier upgrade by mitxela, 2021 mitxela.com # Fixed fpr KiCAD 6 nightly by Gymb2015 (MISC) import wx ...
39.081081
138
0.618603
import wx import pcbnew import os import time from .teardrop_gui import teardrop_gui from .td import SetTeardrops, RmTeardrops, __version__ class TeardropDialog(teardrop_gui): def __init__(self, board): super(TeardropDialog, self).__init__(None) self.board = board self.SetTitle("Teardro...
true
true
f75357021e0bc3d13785b48ec9ae7ac26802445e
67,883
py
Python
tests/test_layout.py
Flowdalic/herbstluftwm
a4705f3247eef3ba388daaae04191d805fcb8f91
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_layout.py
Flowdalic/herbstluftwm
a4705f3247eef3ba388daaae04191d805fcb8f91
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_layout.py
Flowdalic/herbstluftwm
a4705f3247eef3ba388daaae04191d805fcb8f91
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import pytest import re import math import textwrap from decimal import Decimal def normalize_layout_string(layout_string): """normalize a layout string such that it is characterwise identical to the output of the 'dump' command """ layout_string = layout_string.replace('\n', ' ') # drop multiple ...
38.115104
116
0.633679
import pytest import re import math import textwrap from decimal import Decimal def normalize_layout_string(layout_string): layout_string = layout_string.replace('\n', ' ') layout_string = re.sub(r'[ ]+', ' ', layout_string) layout_string = re.sub(r'[(] ', r'(', layout_string) layout_strin...
true
true
f7535737d92a4aa2922fbd1356f95c56dcd17ba6
3,768
py
Python
liked_songs_cleaner.py
sorny/spotify-legacy-liked-songs-cleaner
321ab6316c9e9be3966852954f54c62097d57ac1
[ "MIT" ]
1
2020-12-02T19:19:36.000Z
2020-12-02T19:19:36.000Z
liked_songs_cleaner.py
sorny/spotify-legacy-liked-songs-cleaner
321ab6316c9e9be3966852954f54c62097d57ac1
[ "MIT" ]
null
null
null
liked_songs_cleaner.py
sorny/spotify-legacy-liked-songs-cleaner
321ab6316c9e9be3966852954f54c62097d57ac1
[ "MIT" ]
null
null
null
import datetime import math from time import sleep import spotipy from spotipy.oauth2 import SpotifyOAuth from tqdm import trange, tqdm # params # for client id and secret, create a new application over at https://developer.spotify.com/dashboard # when running this script for the first time, your browser will be redi...
38.44898
118
0.657909
import datetime import math from time import sleep import spotipy from spotipy.oauth2 import SpotifyOAuth from tqdm import trange, tqdm CLIENT_ID = "" CLIENT_SECRET = "" REDIRECT_URI = "http://localhost:8888/callback" DRYRUN = True sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=CLIENT_ID, ...
true
true
f753574b12bf81830458483bf4108f8ae9a32ed8
459
py
Python
Curso Python/desafios/venv/Scripts/easy_install-3.7-script.py
marcos-saba/Cursos
1c063392867e9ed86d141dad8861a2a35488b1c6
[ "MIT" ]
null
null
null
Curso Python/desafios/venv/Scripts/easy_install-3.7-script.py
marcos-saba/Cursos
1c063392867e9ed86d141dad8861a2a35488b1c6
[ "MIT" ]
null
null
null
Curso Python/desafios/venv/Scripts/easy_install-3.7-script.py
marcos-saba/Cursos
1c063392867e9ed86d141dad8861a2a35488b1c6
[ "MIT" ]
null
null
null
#!C:\Users\teste\PycharmProjects\desafios\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.7' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.py...
35.307692
87
0.694989
__requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install-3.7')() )
true
true
f75357eefa624156960df1b563931bd041b63478
3,988
py
Python
main.py
elcronos/adversarial_genattack
b86b07a938a6aef54a41891fc2de3feeaa8e03aa
[ "MIT" ]
1
2020-03-26T16:30:21.000Z
2020-03-26T16:30:21.000Z
main.py
elcronos/adversarial_genattack
b86b07a938a6aef54a41891fc2de3feeaa8e03aa
[ "MIT" ]
null
null
null
main.py
elcronos/adversarial_genattack
b86b07a938a6aef54a41891fc2de3feeaa8e03aa
[ "MIT" ]
null
null
null
""" Author: Moustafa Alzantot (malzantot@ucla.edu) """ import time import os import sys import random import numpy as np import tensorflow as tf from setup_inception import ImageNet, InceptionModel import utils from genattack_tf2 import GenAttack2 flags = tf.app.flags flags.DEFINE_string('input_dir', '', 'Path f...
41.113402
90
0.628134
import time import os import sys import random import numpy as np import tensorflow as tf from setup_inception import ImageNet, InceptionModel import utils from genattack_tf2 import GenAttack2 flags = tf.app.flags flags.DEFINE_string('input_dir', '', 'Path for input images.') flags.DEFINE_string('output_dir', 'ou...
true
true
f753580488527754a4697bba5b514f20b5f16b69
6,317
py
Python
shapenet_train.py
sanowar-raihan/nerf-meta
dbb97431b613acb3dfdc7075344c6e1fd1b6cf51
[ "MIT" ]
60
2021-05-10T20:06:10.000Z
2022-02-22T09:25:56.000Z
shapenet_train.py
sanowar-raihan/nerf-meta
dbb97431b613acb3dfdc7075344c6e1fd1b6cf51
[ "MIT" ]
3
2021-05-21T02:21:47.000Z
2021-05-27T20:32:00.000Z
shapenet_train.py
sanowar-raihan/nerf-meta
dbb97431b613acb3dfdc7075344c6e1fd1b6cf51
[ "MIT" ]
8
2021-05-14T01:43:34.000Z
2022-01-26T22:58:27.000Z
import argparse import json import copy import torch import torch.nn.functional as F from torch.utils.data import DataLoader from datasets.shapenet import build_shapenet from models.nerf import build_nerf from models.rendering import get_rays_shapenet, sample_points, volume_render def inner_loop(model, optim, imgs, p...
39.236025
101
0.636378
import argparse import json import copy import torch import torch.nn.functional as F from torch.utils.data import DataLoader from datasets.shapenet import build_shapenet from models.nerf import build_nerf from models.rendering import get_rays_shapenet, sample_points, volume_render def inner_loop(model, optim, imgs, p...
true
true
f75358532f9ef72fc0c618c0ecf81b55e7b2f87a
784
py
Python
AsyncioLoop.py
lkeme/py-common-code
46b645cf6479ee30691466501e9cfb0d6d3bdb8e
[ "MIT" ]
null
null
null
AsyncioLoop.py
lkeme/py-common-code
46b645cf6479ee30691466501e9cfb0d6d3bdb8e
[ "MIT" ]
null
null
null
AsyncioLoop.py
lkeme/py-common-code
46b645cf6479ee30691466501e9cfb0d6d3bdb8e
[ "MIT" ]
2
2020-08-14T16:20:19.000Z
2021-09-07T12:04:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ - author: Lkeme - contact: Useri@live.cn - file: AsyncioLoop - time: 2019/9/18 12:54 - desc: 兼容不同系统的协程逻辑 """ import asyncio import platform # 自动判断类型生成loop def switch_sys_loop(): sys_type = platform.system() if sys_type == "Windows": loop = asyncio.Proa...
17.043478
54
0.632653
import asyncio import platform def switch_sys_loop(): sys_type = platform.system() if sys_type == "Windows": loop = asyncio.ProactorEventLoop() asyncio.set_event_loop(loop) else: loop = asyncio.get_event_loop() return loop async def main_loop(thread): print(f"当前是第 {threa...
true
true
f75358a33e511ed5e7dc179771d486d3b4ebe4fe
1,179
py
Python
deficrawler/mappers.py
evanwimpey/defi-crawler-py
f3ce10bbcd9e822433708efd56e7ee5d371a42b0
[ "Apache-2.0" ]
45
2021-05-08T03:01:52.000Z
2022-03-21T05:50:45.000Z
deficrawler/mappers.py
evanwimpey/defi-crawler-py
f3ce10bbcd9e822433708efd56e7ee5d371a42b0
[ "Apache-2.0" ]
22
2021-04-07T13:52:58.000Z
2022-03-29T22:01:36.000Z
deficrawler/mappers.py
evanwimpey/defi-crawler-py
f3ce10bbcd9e822433708efd56e7ee5d371a42b0
[ "Apache-2.0" ]
15
2021-06-25T16:06:15.000Z
2022-02-23T02:36:54.000Z
from deficrawler.transformer import Transformer class Mappers: """ Class to map the data from the subgraph data to the commom model defined in the json file. For each field applies the transformaton (if needed) and retuns the entity with all the fields. """ @staticmethod def map_data(resp...
33.685714
103
0.570823
from deficrawler.transformer import Transformer class Mappers: @staticmethod def map_data(response_data, protocol, chain, version, attributes, transformations, query_elements): list_elements = [] transformer = Transformer() for ele in response_data: element = {} ...
true
true
f75358fc6aabeb256f1896a60b41ccf503b178b8
9,521
py
Python
thatkitebot/cogs/laser.py
blablabliam/thatkitebot
741e59993f05eb437b46d4839db517af7b8f0357
[ "MIT" ]
null
null
null
thatkitebot/cogs/laser.py
blablabliam/thatkitebot
741e59993f05eb437b46d4839db517af7b8f0357
[ "MIT" ]
null
null
null
thatkitebot/cogs/laser.py
blablabliam/thatkitebot
741e59993f05eb437b46d4839db517af7b8f0357
[ "MIT" ]
null
null
null
# Copyright (c) 2019-2022 ThatRedKite and contributors from typing import Optional from discord.ext import commands from wand.image import Image as WandImage from wand.color import Color as WandColor import discord import si_prefix from math import sin, atan from io import BytesIO from thatkitebot.backend import uti...
45.555024
174
0.573469
from typing import Optional from discord.ext import commands from wand.image import Image as WandImage from wand.color import Color as WandColor import discord import si_prefix from math import sin, atan from io import BytesIO from thatkitebot.backend import util from thatkitebot.cogs.electronics import parse_input, ...
true
true
f753595819be56b311bde4720b544498a5e852b2
36,237
py
Python
tests/test_sessions.py
ktbarrett/nox
bf1c226de1c14c576537cf81f629571e5015784f
[ "Apache-2.0" ]
41
2016-03-03T11:18:49.000Z
2018-04-09T09:58:13.000Z
tests/test_sessions.py
ktbarrett/nox
bf1c226de1c14c576537cf81f629571e5015784f
[ "Apache-2.0" ]
79
2016-03-03T17:02:53.000Z
2018-04-23T16:25:51.000Z
tests/test_sessions.py
ktbarrett/nox
bf1c226de1c14c576537cf81f629571e5015784f
[ "Apache-2.0" ]
14
2016-03-03T18:22:20.000Z
2018-01-18T15:55:10.000Z
# Copyright 2016 Alethea Katherine Flowers # # 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...
33.459834
87
0.618015
from __future__ import annotations import argparse import logging import operator import os import sys import tempfile from pathlib import Path from unittest import mock import pytest import nox.command import nox.manifest import nox.registry import nox.sessions import nox.virtualenv from nox import _options from n...
true
true
f7535960fb59acd3babb450da0f181a1cddbd657
1,604
py
Python
plot/event1/comment_concat.py
cxxixi/Online-opinions-on-weibo
ae4586b8b42d166c9a2386319891a04d390585fb
[ "MIT" ]
null
null
null
plot/event1/comment_concat.py
cxxixi/Online-opinions-on-weibo
ae4586b8b42d166c9a2386319891a04d390585fb
[ "MIT" ]
null
null
null
plot/event1/comment_concat.py
cxxixi/Online-opinions-on-weibo
ae4586b8b42d166c9a2386319891a04d390585fb
[ "MIT" ]
null
null
null
import pandas as pd csv1 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\500-593.csv',header=None) csv2 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\comment594.csv',header=None) csv3 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\comment855.csv',header...
47.176471
123
0.775561
import pandas as pd csv1 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\500-593.csv',header=None) csv2 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\comment594.csv',header=None) csv3 = pd.read_csv('D:\my_documents\competition\government\Report\event1\\comment855.csv',header...
true
true
f753599e1170bf7481b82c8689e15eee96c841ce
3,758
py
Python
examples/custom_pdf_advanced.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
examples/custom_pdf_advanced.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
examples/custom_pdf_advanced.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 zfit import tensorflow as tf import zfit from zfit import z class CustomPDF2D(zfit.pdf.BasePDF): """My custom, 2 dimensional pdf. The axes are: Energy, Momentum. """ def __init__(self, param1, param2, param3, obs, name="CustomPDF", ): # we can now do complicated stuff her...
37.58
117
0.659659
import tensorflow as tf import zfit from zfit import z class CustomPDF2D(zfit.pdf.BasePDF): def __init__(self, param1, param2, param3, obs, name="CustomPDF", ): params = {'super_param': param1, 'param2': param2, 'param3': param3} super().__init__(obs, params, ...
true
true
f7535a967482ed712ca57c6dbc99084b194282e3
1,303
py
Python
aula10.py
lucasalcantarap/Exercicios-de-python
f8fb4ced327785e8835c1c588db13806ebdc501c
[ "MIT" ]
null
null
null
aula10.py
lucasalcantarap/Exercicios-de-python
f8fb4ced327785e8835c1c588db13806ebdc501c
[ "MIT" ]
null
null
null
aula10.py
lucasalcantarap/Exercicios-de-python
f8fb4ced327785e8835c1c588db13806ebdc501c
[ "MIT" ]
null
null
null
from datetime import date, time, datetime, timedelta def trabalhando_com_datetime(): data_atual = datetime.now() print(data_atual) print(data_atual.strftime('%d/%m/%Y %H:%M:%S')) print(data_atual.strftime('%c')) print(data_atual.weekday()) tupla = ('Segunda','Terça','Quarta','Quinta','Sexta','S...
34.289474
76
0.671527
from datetime import date, time, datetime, timedelta def trabalhando_com_datetime(): data_atual = datetime.now() print(data_atual) print(data_atual.strftime('%d/%m/%Y %H:%M:%S')) print(data_atual.strftime('%c')) print(data_atual.weekday()) tupla = ('Segunda','Terça','Quarta','Quinta','Sexta','S...
true
true
f7535a9bab9b0b5dda4a0280f796dcbc2be6a6ce
375
py
Python
pyopenproject/business/services/principal_service_impl.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
5
2021-02-25T15:54:28.000Z
2021-04-22T15:43:36.000Z
pyopenproject/business/services/principal_service_impl.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
7
2021-03-15T16:26:23.000Z
2022-03-16T13:45:18.000Z
pyopenproject/business/services/principal_service_impl.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
6
2021-06-18T18:59:11.000Z
2022-03-27T04:58:52.000Z
from pyopenproject.business.principal_service import PrincipalService from pyopenproject.business.services.command.principal.find_all import FindAll class PrincipalServiceImpl(PrincipalService): def __init__(self, connection): super().__init__(connection) def find_all(self, filters=None): re...
31.25
78
0.784
from pyopenproject.business.principal_service import PrincipalService from pyopenproject.business.services.command.principal.find_all import FindAll class PrincipalServiceImpl(PrincipalService): def __init__(self, connection): super().__init__(connection) def find_all(self, filters=None): re...
true
true
f7535b6fbed2015b43ec751e360fbd1be594f976
96
py
Python
src/lol_scrapers/utils/dataclasses/icon.py
Melzak252/lol_scrapers
c083b766a970ad61bda68102a66d3a6303dda93d
[ "MIT" ]
null
null
null
src/lol_scrapers/utils/dataclasses/icon.py
Melzak252/lol_scrapers
c083b766a970ad61bda68102a66d3a6303dda93d
[ "MIT" ]
null
null
null
src/lol_scrapers/utils/dataclasses/icon.py
Melzak252/lol_scrapers
c083b766a970ad61bda68102a66d3a6303dda93d
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class Icon: name: str = "" src: str = ""
12
33
0.635417
from dataclasses import dataclass @dataclass class Icon: name: str = "" src: str = ""
true
true
f7535b924f88f1139f10a564c52c326017f206c4
1,599
py
Python
signalGenerator.py
drinkdhmo/optimal_pid
3996237878140be3b486f130a7bd0364a545e1b8
[ "MIT" ]
2
2019-02-11T22:28:20.000Z
2019-02-15T19:15:25.000Z
signalGenerator.py
drinkdhmo/optimal_pid
3996237878140be3b486f130a7bd0364a545e1b8
[ "MIT" ]
null
null
null
signalGenerator.py
drinkdhmo/optimal_pid
3996237878140be3b486f130a7bd0364a545e1b8
[ "MIT" ]
null
null
null
import autograd.numpy as np class signalGenerator: ''' This class inherits the Signal class. It is used to organize 1 or more signals of different types: square_wave, sawtooth_wave, triangle_wave, random_wave. ''' def __init__(self, amplitude=1, frequency=1, y_offset=0): '''...
33.3125
93
0.597248
import autograd.numpy as np class signalGenerator: def __init__(self, amplitude=1, frequency=1, y_offset=0): self.amplitude = amplitude self.frequency = frequency self.y_offset = y_offset def square(self, tt): if tt % (1.0/self.frequency) <= 0.5/self.frequency: out ...
true
true
f7535bcdbea9202e8836ba01d4b983fddaabc683
331
py
Python
lonely-lemmings/earlyinternet/gifapp/migrations/0011_remove_comment_parent_id.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
lonely-lemmings/earlyinternet/gifapp/migrations/0011_remove_comment_parent_id.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
lonely-lemmings/earlyinternet/gifapp/migrations/0011_remove_comment_parent_id.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
# Generated by Django 3.0.9 on 2020-08-09 15:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('gifapp', '0010_auto_20200809_0123'), ] operations = [ migrations.RemoveField( model_name='comment', name='parent_id', ...
18.388889
47
0.595166
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('gifapp', '0010_auto_20200809_0123'), ] operations = [ migrations.RemoveField( model_name='comment', name='parent_id', ), ]
true
true
f7535c3284adf1ad2c56bbbf7322c76f9e2aef2c
4,156
py
Python
Jupyter/UDO_Free/RP/test_start.py
jiaojiao1234/RISE
fd85aa6e475534a74faab5c4644c63dc0c01d236
[ "Apache-2.0" ]
1
2021-12-28T14:04:03.000Z
2021-12-28T14:04:03.000Z
Jupyter/UDO_Free/RP/test_start.py
jiaojiao1234/RISE
fd85aa6e475534a74faab5c4644c63dc0c01d236
[ "Apache-2.0" ]
null
null
null
Jupyter/UDO_Free/RP/test_start.py
jiaojiao1234/RISE
fd85aa6e475534a74faab5c4644c63dc0c01d236
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jun 8 22:09:47 2021 @author: Apple """ def start(): import numpy as np import scipy.io as sio import sklearn.ensemble from sklearn import svm from sklearn.model_selection import StratifiedKFold from sklearn.metrics import confusion_matrix from skl...
41.56
126
0.652551
def start(): import numpy as np import scipy.io as sio import sklearn.ensemble from sklearn import svm from sklearn.model_selection import StratifiedKFold from sklearn.metrics import confusion_matrix from sklearn import preprocessing import joblib from sklearn import neighbors fr...
true
true
f7535c55629a1e0351597dbb080d31e620fed70c
75
py
Python
BinaryHeapPriorityQueue/__init__.py
aayushuppal/PyUtils
6bdfae91417fd6da76953db24efc97cc29e1152b
[ "MIT" ]
null
null
null
BinaryHeapPriorityQueue/__init__.py
aayushuppal/PyUtils
6bdfae91417fd6da76953db24efc97cc29e1152b
[ "MIT" ]
null
null
null
BinaryHeapPriorityQueue/__init__.py
aayushuppal/PyUtils
6bdfae91417fd6da76953db24efc97cc29e1152b
[ "MIT" ]
null
null
null
from BinaryHeapPriorityQueue.binary_heap_pq import BinaryHeapPriorityQueue
37.5
74
0.933333
from BinaryHeapPriorityQueue.binary_heap_pq import BinaryHeapPriorityQueue
true
true
f7535c6f32b43eb8ff07c0d7fa26accc5adb3569
517
py
Python
mlib/requests/orgs/info.py
tmunzer/Mist_library
5d44325dc5b59483d9d6803f31fe1568762b04ca
[ "MIT" ]
13
2020-04-21T21:11:56.000Z
2021-07-15T21:42:41.000Z
mlib/requests/orgs/info.py
tmunzer/mist_library
812828a6486f59850a12dda4f81dbfd76929ed6b
[ "MIT" ]
null
null
null
mlib/requests/orgs/info.py
tmunzer/mist_library
812828a6486f59850a12dda4f81dbfd76929ed6b
[ "MIT" ]
2
2020-06-18T20:07:51.000Z
2020-08-13T16:43:32.000Z
def get(mist_session, org_id): uri = "/api/v1/orgs/%s" % org_id resp = mist_session.mist_get(uri, org_id=org_id) return resp def create(mist_session, org_id, org_settings): uri = "/api/v1/orgs/%s" % org_id body = org_settings resp = mist_session.mist_post(uri, org_id=org_id, body=body) retu...
32.3125
64
0.686654
def get(mist_session, org_id): uri = "/api/v1/orgs/%s" % org_id resp = mist_session.mist_get(uri, org_id=org_id) return resp def create(mist_session, org_id, org_settings): uri = "/api/v1/orgs/%s" % org_id body = org_settings resp = mist_session.mist_post(uri, org_id=org_id, body=body) retu...
true
true
f7535ca6002cdf08b92ba0fa02054e8afbd5dafa
1,307
py
Python
plugin/popup.py
jfcherng/Sublime-OpenUriInBrowser
7a1898e0e0a8d8ebb4085bbcbe578729dcf161c5
[ "MIT" ]
10
2020-09-17T12:57:21.000Z
2022-03-24T14:43:59.000Z
plugin/popup.py
jfcherng/Sublime-OpenUriInBrowser
7a1898e0e0a8d8ebb4085bbcbe578729dcf161c5
[ "MIT" ]
5
2020-06-14T13:25:08.000Z
2022-02-23T06:59:58.000Z
plugin/popup.py
jfcherng/Sublime-OpenUriInBrowser
7a1898e0e0a8d8ebb4085bbcbe578729dcf161c5
[ "MIT" ]
1
2021-03-30T14:44:43.000Z
2021-03-30T14:44:43.000Z
from .functions import open_uri_with_browser from .image_processing import get_colored_image_base64_by_region from .settings import get_setting from .shared import global_get from .types import ImageDict import sublime POPUP_TEMPLATE = """ <body id="open-uri-popup"> <style> img {{ width: {w}{si...
29.044444
85
0.671767
from .functions import open_uri_with_browser from .image_processing import get_colored_image_base64_by_region from .settings import get_setting from .shared import global_get from .types import ImageDict import sublime POPUP_TEMPLATE = """ <body id="open-uri-popup"> <style> img {{ width: {w}{si...
true
true
f7535cdf25003b24b1d8a24847210a5c68b3d15b
14,737
py
Python
pyvidesk/model.py
MuriloScarpaSitonio/pyvidesk
0d2366db0899b0ab7425d09f306b4f6d4722f843
[ "MIT" ]
2
2020-10-17T22:49:30.000Z
2021-08-05T23:09:27.000Z
pyvidesk/model.py
MuriloScarpaSitonio/pyvidesk
0d2366db0899b0ab7425d09f306b4f6d4722f843
[ "MIT" ]
2
2020-11-23T18:09:14.000Z
2020-11-24T16:37:25.000Z
pyvidesk/model.py
MuriloScarpaSitonio/pyvidesk
0d2366db0899b0ab7425d09f306b4f6d4722f843
[ "MIT" ]
5
2020-10-14T17:08:59.000Z
2022-03-04T12:55:14.000Z
""" Módulo que representa um ticket, uma pessoa ou um serviço. Não deve ser usado diretamente, mas obtido no retorno de algum método da classe Entity ou Query. Exemplo de uso: >>> from pyvidesk.tickets import Tickets >>> tickets = Tickets(token="my_token") >>> ticket = ticket.get_by_id(3) >>> print(ticket) ... <Mod...
33.266366
98
0.574744
from .exceptions import ( PyvideskCannotSetReadOnlyProperty, PyvideskPropertyNotValidError, PyvideskPropertyWithWrongType, PyvideskSaveWithoutIdError, ) from .properties import ComplexProperty class Model: __is_complex__ = False def __init__(self, entity, name_=None, **properties): ...
true
true
f7535d053d1bd10bdff996b41244cf4224f518d9
1,025
py
Python
networks/text/io.py
nicolay-r/sentiment-pcnn
ec10c00ca3558b0995a025a4210b4c9455fdea6d
[ "MIT" ]
15
2018-05-04T16:16:58.000Z
2021-04-01T08:40:32.000Z
networks/text/io.py
nicolay-r/sentiment-pcnn
ec10c00ca3558b0995a025a4210b4c9455fdea6d
[ "MIT" ]
null
null
null
networks/text/io.py
nicolay-r/sentiment-pcnn
ec10c00ca3558b0995a025a4210b4c9455fdea6d
[ "MIT" ]
2
2018-10-01T01:10:29.000Z
2020-04-09T10:42:03.000Z
from networks.io import NetworkIO from networks.context.io import ContextLevelNetworkIO from debug import TextDebugKeys class TextLevelNetworkIO(NetworkIO): """ IO for Text level classification via Neural Networks """ def __init__(self, model_name, ctx_model_name): super(TextLevelNetworkIO, s...
39.423077
91
0.745366
from networks.io import NetworkIO from networks.context.io import ContextLevelNetworkIO from debug import TextDebugKeys class TextLevelNetworkIO(NetworkIO): """ IO for Text level classification via Neural Networks """ def __init__(self, model_name, ctx_model_name): super(TextLevelNetworkIO, s...
false
true
f7535d72a2c4aa902b295ede8e6d47c8f5acc5a6
957
py
Python
Examples/LoadOptionsByDocumentType/Pdf/ConvertPdfAndRemoveEmbeddedFiles.py
groupdocs-conversion-cloud/groupdocs-conversion-cloud-python-samples-
18e8eb850c3ef392a3ba310d08cc40299f9ffb3c
[ "MIT" ]
null
null
null
Examples/LoadOptionsByDocumentType/Pdf/ConvertPdfAndRemoveEmbeddedFiles.py
groupdocs-conversion-cloud/groupdocs-conversion-cloud-python-samples-
18e8eb850c3ef392a3ba310d08cc40299f9ffb3c
[ "MIT" ]
null
null
null
Examples/LoadOptionsByDocumentType/Pdf/ConvertPdfAndRemoveEmbeddedFiles.py
groupdocs-conversion-cloud/groupdocs-conversion-cloud-python-samples-
18e8eb850c3ef392a3ba310d08cc40299f9ffb3c
[ "MIT" ]
1
2019-05-09T13:07:21.000Z
2019-05-09T13:07:21.000Z
# Import modules import groupdocs_conversion_cloud from Common import Common # This example demonstrates how to convert pdf document to word processing with advanced options class ConvertPdfAndRemoveEmbeddedFiles: @classmethod def Run(cls): # Create necessary API instances apiInstance = group...
35.444444
106
0.728318
import groupdocs_conversion_cloud from Common import Common class ConvertPdfAndRemoveEmbeddedFiles: @classmethod def Run(cls): apiInstance = groupdocs_conversion_cloud.ConvertApi.from_config(Common.GetConfig()) settings = groupdocs_conversion_cloud.ConvertSettings() ...
true
true
f7535e34b2522c959fa4e713cd91b6756b9e5e46
1,218
py
Python
NUTS2.0/nuts/testhandling/GUI/ToggledFrame.py
EkoGuandor229/Network-Unit-Testing
cc486ec4e705db71ccc79a96427a134276776b20
[ "Apache-2.0" ]
1
2020-10-09T09:42:10.000Z
2020-10-09T09:42:10.000Z
NUTS2.0/nuts/testhandling/GUI/ToggledFrame.py
EkoGuandor229/Network-Unit-Testing
cc486ec4e705db71ccc79a96427a134276776b20
[ "Apache-2.0" ]
14
2020-02-24T15:22:00.000Z
2021-12-13T20:41:12.000Z
NUTS2.0/nuts/testhandling/GUI/ToggledFrame.py
EkoGuandor229/Network-Unit-Testing
cc486ec4e705db71ccc79a96427a134276776b20
[ "Apache-2.0" ]
null
null
null
import tkinter as tk from tkinter import ttk class ToggledFrame(tk.Frame): """ The ToggledFrame Class creates a expandable box for the grouping of tests since this is not possible in TK inter """ def __init__(self, parent, text="", *args, **options): tk.Frame.__init__(self, parent, *args,...
32.918919
102
0.600164
import tkinter as tk from tkinter import ttk class ToggledFrame(tk.Frame): def __init__(self, parent, text="", *args, **options): tk.Frame.__init__(self, parent, *args, **options) self.show = tk.IntVar() self.show.set(0) self.title_frame = ttk.Frame(self) self.title_fram...
true
true
f7535ef42deb5fb0bccb939bcff54aca0e28ab5a
326
py
Python
Task/Pragmatic-directives/Python/pragmatic-directives-2.py
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Pragmatic-directives/Python/pragmatic-directives-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Pragmatic-directives/Python/pragmatic-directives-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import __future__ >>> __future__.all_feature_names ['nested_scopes', 'generators', 'division', 'absolute_import', 'with_statement', 'print_function', 'unicode_literals'...
46.571429
118
0.723926
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import __future__ >>> __future__.all_feature_names ['nested_scopes', 'generators', 'division', 'absolute_import', 'with_statement', 'print_function', 'unicode_literals'...
false
true
f7535fc6ad3bd079938b9df27ee12739172f6b9f
26,807
py
Python
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/ftplib.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
8
2016-11-24T09:38:31.000Z
2021-04-23T13:04:48.000Z
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/ftplib.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
4
2018-02-22T07:42:13.000Z
2021-12-13T10:53:09.000Z
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/ftplib.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
4
2015-09-09T11:54:37.000Z
2018-05-26T05:08:14.000Z
"""An FTP client class and some helper functions. Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds Example: >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ '230 Guest login ok, ac...
33.300621
101
0.549148
"""An FTP client class and some helper functions. Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds Example: >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ '230 Guest login ok, ac...
false
true
f753610fd3f637b2d6a217ae01b69e6d95888a9f
19,030
py
Python
src/sage/rings/polynomial/polynomial_singular_interface.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
3
2019-07-15T13:48:24.000Z
2019-11-08T12:31:43.000Z
src/sage/rings/polynomial/polynomial_singular_interface.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/rings/polynomial/polynomial_singular_interface.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
1
2019-06-02T03:16:55.000Z
2019-06-02T03:16:55.000Z
""" Polynomial Interfaces to Singular AUTHORS: - Martin Albrecht <malb@informatik.uni-bremen.de> (2006-04-21) - Robert Bradshaw: Re-factor to avoid multiple inheritance vs. Cython (2007-09) - Syed Ahmad Lavasani: Added function field to _singular_init_ (2011-12-16) Added non-prime finite fields to _singular_in...
38.995902
184
0.570415
import sage.rings.fraction_field import sage.rings.number_field as number_field from sage.interfaces.all import singular from sage.rings.complex_field import is_ComplexField from sage.rings.real_mpfr import is_RealField from sage.rings.complex_double import is_ComplexDoubleField from sage.rings.finite_rings.integer_m...
true
true
f753619465c1a2574cd3bf7679340d1d1f5ead93
1,187
py
Python
core/middleware.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
core/middleware.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
core/middleware.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
import sigauth.middleware from django.conf import settings from django.http import HttpResponse from django.utils.deprecation import MiddlewareMixin class SignatureCheckMiddleware(sigauth.middleware.SignatureCheckMiddlewareBase): secret = settings.SIGNATURE_SECRET def should_check(self, request): if ...
40.931034
107
0.725358
import sigauth.middleware from django.conf import settings from django.http import HttpResponse from django.utils.deprecation import MiddlewareMixin class SignatureCheckMiddleware(sigauth.middleware.SignatureCheckMiddlewareBase): secret = settings.SIGNATURE_SECRET def should_check(self, request): if ...
true
true
f75362c7260646fc7ff3562f2867ded66f977f6c
267
py
Python
chained_comparison.py
KenMwaura1/python-hacks
13b22d92178fb0e6cae0b1eeca3a9e4aea3e420b
[ "Apache-2.0" ]
2
2020-08-13T00:00:52.000Z
2020-08-13T01:05:27.000Z
chained_comparison.py
KenMwaura1/python-hacks
13b22d92178fb0e6cae0b1eeca3a9e4aea3e420b
[ "Apache-2.0" ]
null
null
null
chained_comparison.py
KenMwaura1/python-hacks
13b22d92178fb0e6cae0b1eeca3a9e4aea3e420b
[ "Apache-2.0" ]
1
2021-05-02T12:43:06.000Z
2021-05-02T12:43:06.000Z
# Chained comparison between 3 variables x = 4 # returns a bool(true or false) depending on what the condition evaluates to print(1 < x < 11) # True print(7 < x < 14) # False print(8 < x * 8 < 64) # True print(9 > x <= 6) # True print(4 == x > 2) # True
29.666667
77
0.606742
x = 4 print(1 < x < 11) print(7 < x < 14) print(8 < x * 8 < 64) print(9 > x <= 6) print(4 == x > 2)
true
true
f75363459044901c1d7a40c5e7aa3edcbe5b250a
585
py
Python
landings/migrations/0001_initial.py
enoren5/Django-caesar
26a1367d7933cd3fd763e9b4a2c85a6a1fc40e9c
[ "MIT" ]
null
null
null
landings/migrations/0001_initial.py
enoren5/Django-caesar
26a1367d7933cd3fd763e9b4a2c85a6a1fc40e9c
[ "MIT" ]
null
null
null
landings/migrations/0001_initial.py
enoren5/Django-caesar
26a1367d7933cd3fd763e9b4a2c85a6a1fc40e9c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-01-28 12:14 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Post', fields=[ ('id', models.AutoField(aut...
24.375
114
0.553846
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Post', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fals...
true
true
f753639d9191974b142ea033aac643cb2aeba54c
5,234
py
Python
CheckMachine.py
jb1anc0/automating-aws-migration-with-cloudendure-scripts
b3b793a9026aa5a22371dff0c5a938ce3039e13e
[ "MIT-0" ]
null
null
null
CheckMachine.py
jb1anc0/automating-aws-migration-with-cloudendure-scripts
b3b793a9026aa5a22371dff0c5a938ce3039e13e
[ "MIT-0" ]
null
null
null
CheckMachine.py
jb1anc0/automating-aws-migration-with-cloudendure-scripts
b3b793a9026aa5a22371dff0c5a938ce3039e13e
[ "MIT-0" ]
null
null
null
# Copyright 2008-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # 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...
52.868687
118
0.559037
from __future__ import print_function import sys import requests import json import yaml import os import datetime def status(cloud_endure, project_id, launchtype, dryrun): config = cloud_endure.config HOST = cloud_endure.host endpoint = cloud_endure.endpoint headers = cloud_endure.headers sess...
true
true
f7536416d2a639c851a4c580b09cbd6bf75ecf2c
837
py
Python
src/olympia/devhub/permissions.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
843
2016-02-09T13:00:37.000Z
2022-03-20T19:17:06.000Z
src/olympia/devhub/permissions.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
10,187
2016-02-05T23:51:05.000Z
2022-03-31T15:24:44.000Z
src/olympia/devhub/permissions.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
551
2016-02-08T20:32:16.000Z
2022-03-15T16:49:24.000Z
from rest_framework.permissions import BasePermission from olympia.addons.utils import RestrictionChecker class IsSubmissionAllowedFor(BasePermission): """ Like is_submission_allowed_for_request, but in Permission form for use in the API. If the client is disallowed, a message property specifiying the ...
34.875
77
0.724014
from rest_framework.permissions import BasePermission from olympia.addons.utils import RestrictionChecker class IsSubmissionAllowedFor(BasePermission): def has_permission(self, request, view): checker = RestrictionChecker(request=request) if not checker.is_submission_allowed(): self....
true
true
f753645e8a4281453a74dfac5eb98935c2eac341
1,768
py
Python
mcrouter/test/test_service_info.py
kiaplayer/mcrouter
c54233f1cd57dc9f541bdbff7ff485775ff289fc
[ "MIT" ]
2,205
2015-01-03T02:56:53.000Z
2022-03-31T09:24:08.000Z
mcrouter/test/test_service_info.py
kiaplayer/mcrouter
c54233f1cd57dc9f541bdbff7ff485775ff289fc
[ "MIT" ]
327
2015-01-07T00:59:57.000Z
2022-03-31T16:03:58.000Z
mcrouter/test/test_service_info.py
kiaplayer/mcrouter
c54233f1cd57dc9f541bdbff7ff485775ff289fc
[ "MIT" ]
479
2015-01-07T02:06:42.000Z
2022-03-24T11:44:31.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from mcrouter.test.MCProcess import Memcached from mcrouter.test.McrouterTestCase import McrouterTestCase class TestS...
36.833333
74
0.657805
from mcrouter.test.MCProcess import Memcached from mcrouter.test.McrouterTestCase import McrouterTestCase class TestServiceInfo(McrouterTestCase): config = './mcrouter/test/test_service_info.json' def setUp(self): self.mc1 = self.add_server(Memcached()) self.mc2 = self.add_server(Memcached()...
true
true
f7536565085203b75500dd2da901ba148e4e85bf
1,368
py
Python
bsm/cmd/pkg_edit.py
bsmsoft/bsm
e45ec5442de39e5f948023cd5b4c6181073cf9a2
[ "MIT" ]
3
2019-06-12T17:19:12.000Z
2022-01-07T02:10:06.000Z
bsm/cmd/pkg_edit.py
bsmsoft/bsm
e45ec5442de39e5f948023cd5b4c6181073cf9a2
[ "MIT" ]
null
null
null
bsm/cmd/pkg_edit.py
bsmsoft/bsm
e45ec5442de39e5f948023cd5b4c6181073cf9a2
[ "MIT" ]
null
null
null
import os import subprocess from bsm.util import which from bsm.cmd import CmdResult from bsm.cmd import CmdError from bsm.cmd.pkg_base import PkgBase from bsm.logger import get_logger _logger = get_logger() DEFAULT_EDITOR = ['vim', 'vi'] def _detect_editor(editors): for editor in editors: if which(edi...
27.918367
131
0.660819
import os import subprocess from bsm.util import which from bsm.cmd import CmdResult from bsm.cmd import CmdError from bsm.cmd.pkg_base import PkgBase from bsm.logger import get_logger _logger = get_logger() DEFAULT_EDITOR = ['vim', 'vi'] def _detect_editor(editors): for editor in editors: if which(edi...
true
true
f75366664dbe635847af22322afd8ac229029a80
1,993
py
Python
ipyannotator/navi_widget.py
AlexJoz/ipyannotator
99f7b0633f96ab5b97b536ab4f7a767834b51055
[ "Apache-2.0" ]
null
null
null
ipyannotator/navi_widget.py
AlexJoz/ipyannotator
99f7b0633f96ab5b97b536ab4f7a767834b51055
[ "Apache-2.0" ]
7
2020-12-31T16:10:40.000Z
2022-03-02T17:07:37.000Z
ipyannotator/navi_widget.py
AlexJoz/ipyannotator
99f7b0633f96ab5b97b536ab4f7a767834b51055
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_navi_widget.ipynb (unless otherwise specified). __all__ = ['NaviGUI', 'NaviLogic', 'Navi'] # Cell from ipywidgets import (AppLayout, Button, IntSlider, HBox, Output, Layout, Label) from traitlets import Int, observe, li...
31.634921
109
0.61716
__all__ = ['NaviGUI', 'NaviLogic', 'Navi'] from ipywidgets import (AppLayout, Button, IntSlider, HBox, Output, Layout, Label) from traitlets import Int, observe, link, HasTraits class NaviGUI(HBox): max_im_number = Int(0) def __init__(self): self._im_...
true
true
f75367481d585e1a2493076a7e7c394220fcc790
1,998
py
Python
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/cloudiot/v1beta1/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/cloudiot/v1beta1/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/cloudiot/v1beta1/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
31.21875
74
0.671672
import enum BASE_URL = 'https://cloudiot.googleapis.com/v1beta1/' class Collections(enum.Enum): PROJECTS_LOCATIONS = ( 'projects.locations', 'projects/{projectsId}/locations/{locationsId}', {}, ['projectsId', 'locationsId'] ) PROJECTS_LOCATIONS_REGISTRIES = ( 'projects.location...
true
true
f753674fa10806cf6a8ed9112222d99a4065f459
40,809
py
Python
sympy/physics/vector/frame.py
czgdp1807/sympy
e9ff10450f6a777e9812f89d9fe7473397706924
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/vector/frame.py
czgdp1807/sympy
e9ff10450f6a777e9812f89d9fe7473397706924
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/vector/frame.py
czgdp1807/sympy
e9ff10450f6a777e9812f89d9fe7473397706924
[ "BSD-3-Clause" ]
1
2020-02-06T17:54:20.000Z
2020-02-06T17:54:20.000Z
from sympy.core.backend import (diff, expand, sin, cos, sympify, eye, symbols, ImmutableMatrix as Matrix, MatrixBase) from sympy import (trigsimp, solve, Symbol, Dummy) from sympy.core.compatibility import range from sympy.physics.vector.vector import Vector, _check_vector from sympy.utilities.misc i...
38.535411
115
0.535054
from sympy.core.backend import (diff, expand, sin, cos, sympify, eye, symbols, ImmutableMatrix as Matrix, MatrixBase) from sympy import (trigsimp, solve, Symbol, Dummy) from sympy.core.compatibility import range from sympy.physics.vector.vector import Vector, _check_vector from sympy.utilities.misc i...
true
true
f75368d18665286ecb7bebc484ae140c79c61ffb
2,029
py
Python
services/county_service.py
joelpsteadman/bankruptcy
1a6c9ed2202f6839e334b946787ed2e32d653647
[ "MIT" ]
1
2020-06-15T19:37:14.000Z
2020-06-15T19:37:14.000Z
services/county_service.py
joelpsteadman/bankruptcy
1a6c9ed2202f6839e334b946787ed2e32d653647
[ "MIT" ]
null
null
null
services/county_service.py
joelpsteadman/bankruptcy
1a6c9ed2202f6839e334b946787ed2e32d653647
[ "MIT" ]
null
null
null
import csv from models.County import * def get_county_data(filepath, year): dictionary_of_counties = dict() with open(filepath) as csvfile: file_reader = csv.reader(csvfile) row = [] while not row: # skip blank rows at the beginning row = next(file_reader) try: ...
39.019231
93
0.421883
import csv from models.County import * def get_county_data(filepath, year): dictionary_of_counties = dict() with open(filepath) as csvfile: file_reader = csv.reader(csvfile) row = [] while not row: row = next(file_reader) try: while True: ...
true
true
f75368d83677981be9838ff28e05b0c1e2c18401
2,973
py
Python
sample_project/main.py
amirfru/eparams
382eefda15a5720f45435b31d07fa04406058c3e
[ "Unlicense" ]
4
2021-12-29T20:57:48.000Z
2022-01-06T15:44:34.000Z
sample_project/main.py
amirfru/eparams
382eefda15a5720f45435b31d07fa04406058c3e
[ "Unlicense" ]
null
null
null
sample_project/main.py
amirfru/eparams
382eefda15a5720f45435b31d07fa04406058c3e
[ "Unlicense" ]
1
2021-12-29T20:53:00.000Z
2021-12-29T20:53:00.000Z
import argparse from datetime import datetime import git import eparams import eparams.constraints as cc from eparams import eloader _repo = git.Repo(__file__, search_parent_directories=True) @eparams.params(frozen=True) # frozen means this cannot be changed easily class Version: time = datetime.now() git...
35.392857
118
0.659603
import argparse from datetime import datetime import git import eparams import eparams.constraints as cc from eparams import eloader _repo = git.Repo(__file__, search_parent_directories=True) @eparams.params(frozen=True) class Version: time = datetime.now() git_hash = _repo.head.commit.hexsha git_bran...
true
true
f75368ee0276afd04dc9f8797bb94d82e402f5fc
5,107
py
Python
rock_c3.py
DREAMS-lab/mask_rcnn_pytorch
1fcc8489758aa4673c29a32a2413f7f86742414f
[ "Apache-2.0" ]
3
2020-06-09T07:01:19.000Z
2021-09-01T12:20:25.000Z
rock_c3.py
DREAMS-lab/mask_rcnn_pytorch
1fcc8489758aa4673c29a32a2413f7f86742414f
[ "Apache-2.0" ]
1
2020-12-29T03:21:06.000Z
2020-12-29T03:21:06.000Z
rock_c3.py
DREAMS-lab/mask_rcnn_pytorch
1fcc8489758aa4673c29a32a2413f7f86742414f
[ "Apache-2.0" ]
null
null
null
""" rock.py Zhiang Chen, Feb 2020 data class for mask rcnn """ import os import numpy as np import torch from PIL import Image import pickle import matplotlib.pyplot as plt """ ./datasets/ Rock/ data/ 0_8.npy 0_9.npy 1_4.npy ... """ class Dataset(object): ...
31.91875
87
0.54768
import os import numpy as np import torch from PIL import Image import pickle import matplotlib.pyplot as plt class Dataset(object): def __init__(self, data_path, transforms=None, input_channel=6, include_name=True): self.data_path = data_path self.transforms = transforms self.data_files ...
true
true
f75369582837b000711508efcde4a79ae6b1963d
12,244
py
Python
tests/components/test_influxdb.py
mbs-technologie/home-assistant
71fc446425cbb1c0d4670c261ce8ea3bfd83a73d
[ "MIT" ]
13
2017-02-01T13:25:34.000Z
2022-01-26T01:30:39.000Z
tests/components/test_influxdb.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
9
2017-07-26T18:05:32.000Z
2021-12-05T14:16:34.000Z
tests/components/test_influxdb.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
21
2017-07-26T17:09:40.000Z
2022-03-27T22:37:22.000Z
"""The tests for the InfluxDB component.""" import unittest from unittest import mock import influxdb as influx_client from homeassistant.bootstrap import setup_component import homeassistant.components.influxdb as influxdb from homeassistant.const import EVENT_STATE_CHANGED, STATE_OFF, STATE_ON from tests.common im...
35.387283
79
0.501225
import unittest from unittest import mock import influxdb as influx_client from homeassistant.bootstrap import setup_component import homeassistant.components.influxdb as influxdb from homeassistant.const import EVENT_STATE_CHANGED, STATE_OFF, STATE_ON from tests.common import get_test_home_assistant @mock.patch('...
true
true
f75369e561862014f62842c95958fdc550336441
8,843
py
Python
site/mezzanine_old/core/views.py
aldenjenkins/ThiccGaming
4790d2568b019438d1569d0fe4e9f9aba008b737
[ "BSD-3-Clause" ]
null
null
null
site/mezzanine_old/core/views.py
aldenjenkins/ThiccGaming
4790d2568b019438d1569d0fe4e9f9aba008b737
[ "BSD-3-Clause" ]
9
2020-03-24T16:20:31.000Z
2022-03-11T23:32:38.000Z
site/mezzanine_old/core/views.py
aldenjenkins/ThiccGaming
4790d2568b019438d1569d0fe4e9f9aba008b737
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from future.builtins import int, open, str import os import mimetypes from json import dumps from django.template.response import TemplateResponse try: from urllib.parse import urljoin, urlparse except ImportError: from urlparse import urljoin, urlpar...
37.629787
79
0.674771
from __future__ import absolute_import, unicode_literals from future.builtins import int, open, str import os import mimetypes from json import dumps from django.template.response import TemplateResponse try: from urllib.parse import urljoin, urlparse except ImportError: from urlparse import urljoin, urlpar...
true
true
f7536a3ae4412031b54f06d5066d0d789ddbcd7f
1,636
py
Python
Widen/LC841_keys_and_rooms.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
Widen/LC841_keys_and_rooms.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
Widen/LC841_keys_and_rooms.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
""" LC 841 -- keys and rooms There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room. Formally, each room i has a list of keys rooms[i], and each key rooms[i][j] is an integer in [0, 1, ..., N-1] where N = rooms.length....
35.565217
186
0.647922
class Solution: def canVisitAllRooms(self, rooms: List[List[int]]) -> bool: key_set = rooms[0] visited_room = {0} while len(key_set) != 0 and len(visited_room)!=len(rooms): new_key = key_set.pop() if new_key in visited_room: continue key_s...
true
true
f7536aa3228c89def758e5d5c6ad05adf29ce2de
3,304
py
Python
desktop/libs/librdbms/src/librdbms/server/postgresql_lib.py
lumanjiao/XLS_BigData
2c4c37872b8636df1c8b0e005bc12a635a753c7a
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/libs/librdbms/src/librdbms/server/postgresql_lib.py
dvopsway/hue
3c0dbca37a21ec92cd0b987f80fba7e3fc3589a7
[ "Apache-2.0" ]
null
null
null
desktop/libs/librdbms/src/librdbms/server/postgresql_lib.py
dvopsway/hue
3c0dbca37a21ec92cd0b987f80fba7e3fc3589a7
[ "Apache-2.0" ]
5
2019-06-29T03:13:02.000Z
2020-04-23T04:47:11.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
31.769231
136
0.724879
import logging try: import psycopg2 as Database except ImportError, e: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) from librdbms.server.rdbms_base_lib import BaseRDBMSDataTable, BaseRDBMSResult, BaseRDMSClient LOG = logging...
false
true
f7536afe6d1a55cee3a1c092d2c7992e55e0b572
2,928
py
Python
tests/providers/oracle/transfers/test_oracle_to_oracle.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
2
2020-10-23T18:55:03.000Z
2021-07-13T04:45:49.000Z
tests/providers/oracle/transfers/test_oracle_to_oracle.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
10
2021-09-08T21:27:07.000Z
2022-03-30T17:54:45.000Z
tests/providers/oracle/transfers/test_oracle_to_oracle.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
2
2020-10-23T18:55:05.000Z
2022-02-16T21:53:10.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...
40.109589
104
0.706284
import unittest from unittest import mock from unittest.mock import MagicMock from airflow.providers.oracle.transfers.oracle_to_oracle import OracleToOracleOperator class TestOracleToOracleTransfer(unittest.TestCase): @staticmethod def test_execute(): oracle_destination_conn_id = 'oracle_destinatio...
true
true
f7536b652b43516a10e1094d2d078b0a3d840c86
31,366
py
Python
tests/unit/deploy/test_appgraph.py
Chen188/chalice
293350669e4b870cd1d156f9afc0c2eefd6c24b0
[ "Apache-2.0" ]
6,240
2017-07-31T22:56:40.000Z
2022-03-31T17:29:45.000Z
tests/unit/deploy/test_appgraph.py
Chen188/chalice
293350669e4b870cd1d156f9afc0c2eefd6c24b0
[ "Apache-2.0" ]
1,337
2017-07-31T22:27:10.000Z
2022-03-31T16:04:49.000Z
tests/unit/deploy/test_appgraph.py
Chen188/chalice
293350669e4b870cd1d156f9afc0c2eefd6c24b0
[ "Apache-2.0" ]
845
2017-08-01T10:28:07.000Z
2022-03-26T08:26:44.000Z
import pytest from chalice.app import Chalice from chalice.config import Config from chalice.constants import LAMBDA_TRUST_POLICY from chalice.deploy import models from chalice.deploy.appgraph import ApplicationGraphBuilder, ChaliceBuildError from chalice.deploy.deployer import BuildStage, PolicyGenerator from chalice...
45.001435
79
0.620289
import pytest from chalice.app import Chalice from chalice.config import Config from chalice.constants import LAMBDA_TRUST_POLICY from chalice.deploy import models from chalice.deploy.appgraph import ApplicationGraphBuilder, ChaliceBuildError from chalice.deploy.deployer import BuildStage, PolicyGenerator from chalice...
true
true
f7536bb2d3832d7738bbd18df5bf1e3c6a515670
636
py
Python
proxies/proxy_pool.py
azraeljack/Image-Scrapper
e8ec70063a65a78832eb0118da1799d8767569c8
[ "MIT" ]
null
null
null
proxies/proxy_pool.py
azraeljack/Image-Scrapper
e8ec70063a65a78832eb0118da1799d8767569c8
[ "MIT" ]
null
null
null
proxies/proxy_pool.py
azraeljack/Image-Scrapper
e8ec70063a65a78832eb0118da1799d8767569c8
[ "MIT" ]
null
null
null
from logging_module import Logger from random import randint class ProxyPool(object): def __init__(self, *proxies): self.logger = Logger.get_logger() self.proxies = [] for proxy in proxies: self.add_proxy(proxy) def add_proxy(self, proxy): if proxy.is_alive(): ...
25.44
76
0.627358
from logging_module import Logger from random import randint class ProxyPool(object): def __init__(self, *proxies): self.logger = Logger.get_logger() self.proxies = [] for proxy in proxies: self.add_proxy(proxy) def add_proxy(self, proxy): if proxy.is_alive(): ...
true
true
f7536d2195a919b200662bb77d8397b3aee95a6c
12,700
py
Python
configs/example/se.py
charitha22/gem5
d7e2fb6744edbd26ce678058463fcd2a00a23b51
[ "BSD-3-Clause" ]
null
null
null
configs/example/se.py
charitha22/gem5
d7e2fb6744edbd26ce678058463fcd2a00a23b51
[ "BSD-3-Clause" ]
null
null
null
configs/example/se.py
charitha22/gem5
d7e2fb6744edbd26ce678058463fcd2a00a23b51
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
35.277778
79
0.671732
from __future__ import print_function from __future__ import absolute_import import optparse import sys import os import m5 from m5.defines import buildEnv from m5.objects import * from m5.util import addToPath, fatal, warn addToPath('../') from ruby import Ruby from common import Options from common import Simu...
true
true
f7536e1a1d8e286591b858b7b3197fafa8dcb391
1,568
py
Python
datafactory/fields/pickout.py
righ/datafactory
8299df4e29472381ccfe91535fdecf8e97a46d32
[ "Apache-2.0" ]
2
2015-07-09T08:49:32.000Z
2015-09-04T13:43:40.000Z
datafactory/fields/pickout.py
righ/datafactory
8299df4e29472381ccfe91535fdecf8e97a46d32
[ "Apache-2.0" ]
1
2020-06-06T13:12:39.000Z
2020-06-06T13:12:39.000Z
datafactory/fields/pickout.py
righ/datafactory
8299df4e29472381ccfe91535fdecf8e97a46d32
[ "Apache-2.0" ]
1
2020-11-06T08:11:51.000Z
2020-11-06T08:11:51.000Z
# coding: utf-8 from random import randint from .base import BaseField from ..api import display, special class PickoutField(BaseField): """select an element randomly from the limited-choices.""" def __init__(self, choices, missing=None, callback=None): """PickoutField constructor :param li...
32
93
0.61926
from random import randint from .base import BaseField from ..api import display, special class PickoutField(BaseField): def __init__(self, choices, missing=None, callback=None): if isinstance(choices, dict): self._choices = [] for value, num in choices.items(): s...
true
true
f75370170b04c80ceb8e86078d26d8c894d12cd4
16,409
py
Python
tests/test_schemas.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
1
2017-03-28T15:31:28.000Z
2017-03-28T15:31:28.000Z
tests/test_schemas.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
1
2021-02-24T04:38:23.000Z
2021-02-24T04:38:23.000Z
tests/test_schemas.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
4
2018-09-25T04:05:54.000Z
2021-02-05T05:03:26.000Z
import unittest from django.conf.urls import include, url from django.core.exceptions import PermissionDenied from django.http import Http404 from django.test import TestCase, override_settings from rest_framework import filters, pagination, permissions, serializers from rest_framework.compat import coreapi, coresche...
39.539759
192
0.520934
import unittest from django.conf.urls import include, url from django.core.exceptions import PermissionDenied from django.http import Http404 from django.test import TestCase, override_settings from rest_framework import filters, pagination, permissions, serializers from rest_framework.compat import coreapi, coresche...
true
true
f75370a60d4ad0f2e925485cb42f1e4e9eee52ff
51,252
py
Python
my_vim_files/python27/Lib/distutils/dist.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
null
null
null
my_vim_files/python27/Lib/distutils/dist.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
null
null
null
my_vim_files/python27/Lib/distutils/dist.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
null
null
null
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ __revision__ = "$Id: dist.py 77717 2010-01-24 00:33:32Z tarek.ziade $" import sys, os, re from email import message_from_file try: import warnings except ImportError: ...
41.100241
83
0.58265
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ __revision__ = "$Id: dist.py 77717 2010-01-24 00:33:32Z tarek.ziade $" import sys, os, re from email import message_from_file try: import warnings except ImportError: ...
false
true
f753710d92e12733d0414d7e85c2dc4e9f72e2ca
5,514
py
Python
contrib/seeds/makeseeds.py
AirWireOfficial/wire-core
e47155b31c4a67a493f4457dc1dfb7871b315e3b
[ "MIT" ]
7
2018-10-04T10:46:23.000Z
2019-09-14T08:04:12.000Z
contrib/seeds/makeseeds.py
AirWire-Platform/Wire
a39dc9e6d0424f0ced8d80af3ec17257b216b97c
[ "MIT" ]
8
2018-10-05T17:00:31.000Z
2019-02-03T12:01:06.000Z
contrib/seeds/makeseeds.py
AirWire-Platform/Wire
a39dc9e6d0424f0ced8d80af3ec17257b216b97c
[ "MIT" ]
6
2018-10-04T02:11:07.000Z
2019-05-26T19:15:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
32.05814
186
0.566921
# NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = { "" } import re import sys import dns.resolver import collections PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{...
true
true
f753717d3923cbbe689d18db8d9e178d6206043b
23,228
py
Python
keras/engine/sequential.py
shantanusharma/keras
662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938
[ "Apache-2.0" ]
3
2021-03-15T05:32:36.000Z
2021-12-14T07:29:53.000Z
keras/engine/sequential.py
bluemap19/keras
662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938
[ "Apache-2.0" ]
1
2021-03-01T13:50:34.000Z
2021-03-01T13:50:34.000Z
keras/engine/sequential.py
bluemap19/keras
662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938
[ "Apache-2.0" ]
null
null
null
# 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...
40.466899
99
0.666136
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf import copy import warnings from keras import layers as layer_module from keras.engine import base_layer from keras.engine import functional from keras.engine import input_lay...
true
true
f75371c0f7408e9378de0bbf152b020459d51355
13,228
py
Python
utils.py
mehdijj/ppd
9e7626a47886d9d2016873d722f97a930e96540d
[ "MIT" ]
null
null
null
utils.py
mehdijj/ppd
9e7626a47886d9d2016873d722f97a930e96540d
[ "MIT" ]
null
null
null
utils.py
mehdijj/ppd
9e7626a47886d9d2016873d722f97a930e96540d
[ "MIT" ]
null
null
null
import numpy as np import Augmentor import os def _permute_index(l, seed): """ Creates a permutation of np.array([0, ..., l-1]) and its inverse :param l: length of the array to permute :param seed: permutation seed :return: (s, s_inverse) where s is permutation of np.array([0, ..., l-1])...
43.656766
138
0.668506
import numpy as np import Augmentor import os def _permute_index(l, seed): st0 = np.random.get_state() s = np.arange(l) np.random.seed(seed) np.random.shuffle(s) s_inverse = np.argsort(s) np.random.set_state(st0) return s, s_inverse def permute(data, seed): nb_images,...
true
true
f75372aba442429950912c56bd695772cba25c53
1,758
py
Python
tests/test_plot.py
HERA-Team/vis_cpu
32de2318efd6690e4a8c6c64aad5eae6f429b10a
[ "MIT" ]
null
null
null
tests/test_plot.py
HERA-Team/vis_cpu
32de2318efd6690e4a8c6c64aad5eae6f429b10a
[ "MIT" ]
39
2021-05-12T23:22:02.000Z
2022-03-18T16:54:48.000Z
tests/test_plot.py
HERA-Team/vis_cpu
32de2318efd6690e4a8c6c64aad5eae6f429b10a
[ "MIT" ]
2
2021-06-01T09:31:10.000Z
2021-07-29T16:57:59.000Z
"""Compare vis_cpu with pyuvsim visibilities.""" import numpy as np from pyuvsim.analyticbeam import AnalyticBeam from vis_cpu import conversions, plot nsource = 10 def test_source_az_za_beam(): """Test function that calculates the Az and ZA positions of sources.""" # Observation latitude and LST hera_l...
27.904762
75
0.65529
import numpy as np from pyuvsim.analyticbeam import AnalyticBeam from vis_cpu import conversions, plot nsource = 10 def test_source_az_za_beam(): hera_lat = -30.7215 lst = 0.78 ra = np.random.uniform(low=0.0, high=360.0, size=nsource - 1) dec = -30.72 + np.random.random(nsource - 1) * 10.0 ...
true
true
f75372b7fb749647de3395a45c79fcf1de61fe86
25,537
py
Python
bilby/gw/source.py
LBJ-Wade/bilby
b1e02f1dfae03d4939cae9c95eff300c22919689
[ "MIT" ]
31
2019-02-28T00:48:23.000Z
2022-03-29T09:41:28.000Z
bilby/gw/source.py
LBJ-Wade/bilby
b1e02f1dfae03d4939cae9c95eff300c22919689
[ "MIT" ]
8
2018-12-27T09:15:03.000Z
2022-03-28T19:02:10.000Z
bilby/gw/source.py
LBJ-Wade/bilby
b1e02f1dfae03d4939cae9c95eff300c22919689
[ "MIT" ]
32
2018-11-30T00:58:53.000Z
2022-03-29T09:41:30.000Z
import numpy as np from ..core import utils from ..core.utils import logger from .conversion import bilby_to_lalsimulation_spins from .utils import (lalsim_GetApproximantFromString, lalsim_SimInspiralFD, lalsim_SimInspiralChooseFDWaveform, lalsim_SimInspiralW...
40.27918
98
0.676469
import numpy as np from ..core import utils from ..core.utils import logger from .conversion import bilby_to_lalsimulation_spins from .utils import (lalsim_GetApproximantFromString, lalsim_SimInspiralFD, lalsim_SimInspiralChooseFDWaveform, lalsim_SimInspiralW...
true
true
f7537665e792c1503279c4a7f8925a55ab9e0231
6,449
py
Python
test/functional/feature_maxuploadtarget.py
Perbug/perbug
4fa48d19be465006cdcaf9e6c09d394309aa2bf9
[ "MIT" ]
1
2022-03-05T14:50:58.000Z
2022-03-05T14:50:58.000Z
test/functional/feature_maxuploadtarget.py
Perbug/perbug
4fa48d19be465006cdcaf9e6c09d394309aa2bf9
[ "MIT" ]
2
2021-12-18T03:02:54.000Z
2022-01-17T17:55:36.000Z
test/functional/feature_maxuploadtarget.py
DclrCoin/dclrcoin
1ca3bd1f787fdead6ae84b7cda2bab6c6cb62b1d
[ "MIT" ]
2
2021-12-25T12:39:07.000Z
2022-02-14T03:03:36.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core Developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of -maxuploadtarget. * Verify that getdata requests for old blocks (>1week) are dropped ...
40.055901
107
0.681501
from collections import defaultdict import time from test_framework.messages import CInv, msg_getdata from test_framework.mininode import P2PInterface from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, mine_large_block class TestP2PConn(P2PInterface): def ...
true
true
f753790b58bb7374a65a5edf61ff861f9f57622b
511
py
Python
test/DSDataFrame_test.py
axefx/lambdata-axel
81d70ea80ec33b3f1c16c3c8344a004474e2a4a8
[ "MIT" ]
null
null
null
test/DSDataFrame_test.py
axefx/lambdata-axel
81d70ea80ec33b3f1c16c3c8344a004474e2a4a8
[ "MIT" ]
null
null
null
test/DSDataFrame_test.py
axefx/lambdata-axel
81d70ea80ec33b3f1c16c3c8344a004474e2a4a8
[ "MIT" ]
1
2020-04-07T23:06:48.000Z
2020-04-07T23:06:48.000Z
import unittest from lambdata_axel.ds_tools import DSDataFrame data = {'numbers': [0, 1, 2, 3, 4, 5, 6, 7], "alphabet": ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']} class TestDSDataFrame(unittest.TestCase): def setUp(self): self.df = DSDataFrame(data) def test_check_nulls(self): column...
24.333333
68
0.606654
import unittest from lambdata_axel.ds_tools import DSDataFrame data = {'numbers': [0, 1, 2, 3, 4, 5, 6, 7], "alphabet": ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']} class TestDSDataFrame(unittest.TestCase): def setUp(self): self.df = DSDataFrame(data) def test_check_nulls(self): column...
true
true
f7537973a587bf01778b94911d5277d5deae2c80
1,165
py
Python
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
from django.conf.urls.defaults import patterns, include, url from feeds import StoryFeed from models import Story from views import diff, version, mark_as_read, toggle_tracking, backgroundcontent from lsubscribe.views import subscribe urlpatterns = patterns( '', url(r'^track/yes/', toggle_tracking, {'set_track...
48.541667
139
0.621459
from django.conf.urls.defaults import patterns, include, url from feeds import StoryFeed from models import Story from views import diff, version, mark_as_read, toggle_tracking, backgroundcontent from lsubscribe.views import subscribe urlpatterns = patterns( '', url(r'^track/yes/', toggle_tracking, {'set_track...
true
true
f75379f9741f08ebcde08632af9d38410ad77c08
2,369
py
Python
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # # externals import datetime # superclass from .Schema import Schema # my declaration class Time(Schema): """ A type declarator for timestamps """ # constants format = "%H:%M:%S" # the default fo...
25.202128
81
0.577037
import datetime from .Schema import Schema class Time(Schema): format = "%H:%M:%S" typename = 'time' complaint = 'could not coerce {0.value!r} into a time' def coerce(self, value, **kwds): if isinstance(value, datetime.time): return value ...
true
true
f7537af03db5a999f20e6fa7d3483695ad604428
688
py
Python
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
3
2016-05-02T14:35:55.000Z
2021-08-31T14:19:15.000Z
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
null
null
null
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
1
2018-03-18T13:19:52.000Z
2018-03-18T13:19:52.000Z
""" ***************************************** The OptimalBPM tools package. ***************************************** Optimal BPM™ is a Business Process Management system (BPM) and surrounding tools Optimalbpm-tools are a collection of tools made to solve some of the common problems in BPM. htt...
38.222222
105
0.655523
__version__ = '0.9' __release__ = '0.9.0' __copyright__ = '2010-2013, Nicklas Boerjesson'
true
true
f7537b0d081db8d70d46d8a05290af902df5956d
74
py
Python
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
from .pdConnection import Credentials, PdConnection __version__ = "0.2.6"
24.666667
51
0.797297
from .pdConnection import Credentials, PdConnection __version__ = "0.2.6"
true
true
f7537b491f8aa9032d2a36ff9cfe852cd01429d9
2,792
py
Python
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def main(): trial_seed=1 sol_seed=6 ...
28.783505
181
0.693768
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def main(): trial_seed=1 sol_seed=6 ...
true
true
f7537b5653a85a3afa054bd7b40e1fd18b8936cf
661
py
Python
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
29
2018-10-20T13:55:56.000Z
2022-03-03T00:39:51.000Z
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
3
2018-10-20T13:48:17.000Z
2021-11-13T20:37:33.000Z
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
4
2018-10-24T18:54:14.000Z
2019-10-23T23:00:24.000Z
from flask_sqlalchemy import SQLAlchemy import zmq # TODO: a better way of doing this from config import Config, fatal_error_exit_or_backtrace db = SQLAlchemy() zmq_relay_socket = None zeromq_context = None cfg = Config.get_global_instance() if cfg.zeromq_relay_uri: zeromq_context = zmq.Context() zmq_relay_...
31.47619
98
0.760968
from flask_sqlalchemy import SQLAlchemy import zmq from config import Config, fatal_error_exit_or_backtrace db = SQLAlchemy() zmq_relay_socket = None zeromq_context = None cfg = Config.get_global_instance() if cfg.zeromq_relay_uri: zeromq_context = zmq.Context() zmq_relay_socket = zeromq_context.socket(zmq....
true
true
f7537bc73fd9b659c8234b9849f9f9b4717a9c4a
252
py
Python
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, qasr and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Maintenance(Document): pass
22.909091
49
0.777778
from __future__ import unicode_literals import frappe from frappe.model.document import Document class Maintenance(Document): pass
true
true
f7537caa9883f54092eaeb42e4dd9b2a7a4cccb5
2,727
py
Python
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
4
2019-11-05T06:54:11.000Z
2020-09-26T09:48:21.000Z
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
null
null
null
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import tf_explain INPUT_SHAPE = (28, 28, 1) NUM_CLASSES = 10 AVAILABLE_DATASETS = { 'mnist': tf.keras.datasets.mnist, 'fashion_mnist': tf.keras.datasets.fashion_mnist, } DATASET_NAME = 'fashion_mnist' # Choose between "mnist" and "fashion_mnist" # Load dataset data...
39.521739
111
0.733773
import numpy as np import tensorflow as tf import tf_explain INPUT_SHAPE = (28, 28, 1) NUM_CLASSES = 10 AVAILABLE_DATASETS = { 'mnist': tf.keras.datasets.mnist, 'fashion_mnist': tf.keras.datasets.fashion_mnist, } DATASET_NAME = 'fashion_mnist' dataset = AVAILABLE_DATASETS[DATASET_NAME] (train_images, train_...
true
true
f7537cb50edb662322b47da14975cdbb704a0f3a
1,237
py
Python
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
import time from math import pi, cos, sin, tan #test program to visulaize led sequences. class leds: num = 16 mindelay = 3 modedelay = 333 def test(self, c): temp = '' for i in range(0, self.num): for n in c: if i == n: temp += '+' ...
17.180556
72
0.482619
import time from math import pi, cos, sin, tan class leds: num = 16 mindelay = 3 modedelay = 333 def test(self, c): temp = '' for i in range(0, self.num): for n in c: if i == n: temp += '+' else: temp +=' ' prin...
true
true
f7537d0b535327ca352282247388671b6a3dfa40
3,730
py
Python
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
1
2020-10-29T19:47:27.000Z
2020-10-29T19:47:27.000Z
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
null
null
null
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
null
null
null
from Lemmatization.main import read_csv, check_for_prefix_chop from Lemmatization.utility.helper import get_root_pos_rule_csv_path class TrieNode: def __init__(self): # Initialising one node for trie self.children = {} self.last = False self.word = None self.char = None c...
33.603604
118
0.567292
from Lemmatization.main import read_csv, check_for_prefix_chop from Lemmatization.utility.helper import get_root_pos_rule_csv_path class TrieNode: def __init__(self): self.children = {} self.last = False self.word = None self.char = None class Trie: def __init__(self)...
true
true
f7537d559abaad1f122d5820bc38e1047168df3a
169
py
Python
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
from reviewlogic.value_objects.positive_integer_id import PositiveIntegerId class ProposalId(PositiveIntegerId): def __str__(self): return str(self.value)
24.142857
75
0.792899
from reviewlogic.value_objects.positive_integer_id import PositiveIntegerId class ProposalId(PositiveIntegerId): def __str__(self): return str(self.value)
true
true
f7537db18de0e8966635a938f357318f4c3bd315
13,566
py
Python
tests/components/google_assistant/__init__.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
7
2019-08-15T13:36:58.000Z
2020-03-18T10:46:29.000Z
tests/components/google_assistant/__init__.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
87
2020-07-15T13:43:35.000Z
2022-03-23T07:43:10.000Z
tests/components/google_assistant/__init__.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Tests for the Google Assistant integration.""" from unittest.mock import MagicMock from homeassistant.components.google_assistant import helpers def mock_google_config_store(agent_user_ids=None): """Fake a storage for google assistant.""" store = MagicMock(spec=helpers.GoogleConfigStore) if agent_user...
31.330254
86
0.542091
from unittest.mock import MagicMock from homeassistant.components.google_assistant import helpers def mock_google_config_store(agent_user_ids=None): store = MagicMock(spec=helpers.GoogleConfigStore) if agent_user_ids is not None: store.agent_user_ids = agent_user_ids else: store.agent_use...
true
true
f7537f3227ada46714c81b7644fd28e4e098edb5
22,836
py
Python
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
40
2019-01-03T15:23:45.000Z
2022-03-07T10:15:42.000Z
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
2
2020-04-15T16:40:08.000Z
2021-03-26T00:18:52.000Z
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
35
2018-08-07T09:00:19.000Z
2022-03-19T22:10:37.000Z
#!/usr/bin/env python """ TODO: Document the module. Provides classes and functionality for SOME_PURPOSE """ ####################################### # Any needed from __future__ imports # # Create an "__all__" list to support # # "from module import member" use # ####################################### __all__ =...
39.645833
74
0.45656
__all__ = [ 'JSONFileDataObject', ] __author__ = 'Brian D. Allbee' __copyright__ = 'Copyright 2018, all rights reserved' __status__ = 'Development' import abc import json import os from datetime import datetime from uuid import UUID, uuid4 from hms_core.data_objects import BaseDataO...
true
true
f7537fa5a1e80b81cfb139ace8ab6d27cb7ccec5
1,662
py
Python
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
1
2020-07-15T02:26:50.000Z
2020-07-15T02:26:50.000Z
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
null
null
null
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 from easydict import EasyDict as edict __C = edict() # Consumers can get config by: from config import cfg cfg = __C # YOLO options __C.YOLO = edict() # Set the class name __C.YOLO.CLASSES = ...
30.218182
86
0.575211
from easydict import EasyDict as edict __C = edict() cfg = __C __C.YOLO = edict() __C.YOLO.CLASSES = "./data/classes/coco.names" __C.YOLO.ANCHORS = "./data/anchors/yolov4_anchors.txt" __C.YOLO.ANCHORS_V3 = ...
true
true
f7538085901f6d1fc4ad406829d0505b0fdc0183
9,027
py
Python
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
4
2021-02-12T03:08:31.000Z
2021-02-12T17:07:53.000Z
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
2
2021-02-12T06:44:31.000Z
2022-01-05T16:33:03.000Z
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
null
null
null
import tweepy import logging from botConfig import create_api import time from shutil import copyfile import os,sys import subprocess from datetime import datetime from unidecode import unidecode import re logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def check_mentions(api, since_id): logg...
36.546559
293
0.575385
import tweepy import logging from botConfig import create_api import time from shutil import copyfile import os,sys import subprocess from datetime import datetime from unidecode import unidecode import re logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def check_mentions(api, since_id): logg...
true
true
f75380f9b63168efa9a32a9f81dd0051d4716303
782
py
Python
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
144
2015-01-01T10:31:33.000Z
2022-03-31T17:05:24.000Z
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
20
2015-04-06T15:22:01.000Z
2022-01-10T21:15:07.000Z
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
19
2015-07-28T14:50:34.000Z
2019-08-20T14:07:26.000Z
# coding: utf-8 import os from .models import Person from nose.tools import with_setup from django.conf import settings from django.test.utils import get_runner class TestClassWithoutUnittest(object): """ Uses a model to ensure the table exist, even with no migrations available. """ def setUp(self): ...
26.965517
78
0.702046
import os from .models import Person from nose.tools import with_setup from django.conf import settings from django.test.utils import get_runner class TestClassWithoutUnittest(object): def setUp(self): self.person = Person.objects.create(name='Arthur', age=18) def test_instance(self): assert ...
true
true
f75381df34ccf783c94e1470355a3661aabad763
33,813
py
Python
IMU_GUI.py
mikechan0731/GY-91_and_PiCamera_RaspberryPi
4c34b7f3ad5920c4528eb09b75036f69de1e9ccc
[ "MIT" ]
12
2016-08-13T20:09:28.000Z
2021-11-19T21:44:39.000Z
IMU_GUI.py
mikechan0731/RaspBerryPi_MPU9250_data_read
4c34b7f3ad5920c4528eb09b75036f69de1e9ccc
[ "MIT" ]
null
null
null
IMU_GUI.py
mikechan0731/RaspBerryPi_MPU9250_data_read
4c34b7f3ad5920c4528eb09b75036f69de1e9ccc
[ "MIT" ]
4
2016-08-13T20:10:31.000Z
2019-05-05T05:43:54.000Z
<<<<<<< HEAD #!/usr/bin/python # -*- coding: UTF-8 -*- # Author : MikeChan # Email : m7807031@gmail.com # Date : 06/21/2016 import time, sys, os, datetime, threading from PyQt4.QtCore import * from PyQt4.QtGui import * #===== Global Varibles ===== now = datetime.datetime.now() today = str( str(now).split(" ")[0].s...
31.719512
130
0.583563
<<<<<<< HEAD import time, sys, os, datetime, threading from PyQt4.QtCore import * from PyQt4.QtGui import * now = datetime.datetime.now() today = str( str(now).split(" ")[0].split("-")[0] + str(now).split(" ")[0].split("-")[1] + str(now).split(" ")[0].split("-")[2] ) tonow = str( str(now).split(" ")[1].split(":")[0] ...
false
true
f7538208713064b1c142e2edc63c46336feda62b
1,356
py
Python
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
8
2019-12-01T08:56:46.000Z
2019-12-05T21:21:12.000Z
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
10
2019-11-25T09:56:20.000Z
2021-05-10T19:57:48.000Z
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
5
2019-12-01T08:19:57.000Z
2020-11-23T09:50:19.000Z
from tool.runners.python import SubmissionPy class RemiSubmission(SubmissionPy): def get_param(self, p, opcode, index, param): modes = opcode // 100 for _ in range(index): modes //= 10 mode = modes % 10 if mode == 0: return p[param] elif mode == 1: ...
26.076923
72
0.424779
from tool.runners.python import SubmissionPy class RemiSubmission(SubmissionPy): def get_param(self, p, opcode, index, param): modes = opcode // 100 for _ in range(index): modes //= 10 mode = modes % 10 if mode == 0: return p[param] elif mode == 1: ...
true
true
f75382ec7497e2c29261e3d93597edfd8a33784e
14,321
py
Python
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
1
2022-01-06T00:02:10.000Z
2022-01-06T00:02:10.000Z
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
null
null
null
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
null
null
null
# # tracker.py # # kevinabrandon@gmail.com # import sys import traceback import time from time import sleep from twitter import * from configparser import ConfigParser from string import Template import datasource import fa_api import flightdata import geomath import screenshot import aircraftdata # AWSIOT import fr...
39.021798
142
0.610293
import sys import traceback import time from time import sleep from twitter import * from configparser import ConfigParser from string import Template import datasource import fa_api import flightdata import geomath import screenshot import aircraftdata from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient import log...
true
true
f75383108898d5f52b7a078c9437679bca51fd54
3,708
py
Python
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
11
2021-04-04T03:16:44.000Z
2021-11-15T11:22:51.000Z
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
6
2021-03-31T17:18:16.000Z
2021-07-06T07:21:51.000Z
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
4
2021-03-31T17:03:20.000Z
2021-05-26T07:50:12.000Z
# Importing relevant libraries import cv2 import imutils import tflearn import numpy as np from PIL import Image import tensorflow as tf from tensorflow.python.framework import ops from tflearn.layers.estimator import regression from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core i...
31.965517
126
0.670982
import cv2 import imutils import tflearn import numpy as np from PIL import Image import tensorflow as tf from tensorflow.python.framework import ops from tflearn.layers.estimator import regression from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core import input_data, dropout, fully...
true
true
f753840976d12ee5ab46e44b06e593bf09e77e88
89
py
Python
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
from .core import create_key from .core import create_element_rand from . import globals
22.25
37
0.831461
from .core import create_key from .core import create_element_rand from . import globals
true
true
f75385538ed3357b98f19d7d208efa4e98e8bebc
34,012
py
Python
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
38
2018-08-07T21:55:29.000Z
2022-03-21T14:49:03.000Z
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
207
2018-07-25T15:10:48.000Z
2022-03-08T13:23:08.000Z
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
35
2018-09-04T14:49:56.000Z
2022-01-06T21:17:51.000Z
""" Plots metrics that assess quality of single units. Some functions here generate plots for the output of functions in the brainbox `single_units.py` module. Run the following to set-up the workspace to run the docstring examples: >>> from brainbox import processing >>> import alf.io as aio >>> import numpy as np >>...
41.176755
99
0.635599
import time from warnings import warn import matplotlib.pyplot as plt import seaborn as sns import numpy as np from brainbox import singlecell from brainbox.metrics import single_units from brainbox.processing import bincount2D from brainbox.io.spikeglx import extract_waveforms from ibllib.io import spikeglx def f...
true
true
f753858563afea4e451c15dc812609a9a92d3a64
12,856
py
Python
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
# converter.py # Örvar Kárason (ohk2@hi.is) # 16. des. 2015 from nltk.tree import Tree from nltk.parse import DependencyGraph from collections import defaultdict, OrderedDict import re from sys import argv, stdin, stdout import getopt class UniversalDependencyGraph(DependencyGraph): def __init__(self, tree_str=N...
34.010582
158
0.491366
from nltk.tree import Tree from nltk.parse import DependencyGraph from collections import defaultdict, OrderedDict import re from sys import argv, stdin, stdout import getopt class UniversalDependencyGraph(DependencyGraph): def __init__(self, tree_str=None, cell_extractor=None, zero_based=False, cell_separator=N...
true
true
f753859c8cfca1417826f1d66377850d19ca5286
448
py
Python
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import re from requests import Session from .changelogs import get, get_commit_log """ if os.environ.get("DEBUG", "") in ("TRUE", "True", "true"): DEBUG = True import logging logging.basicConfig(level=logging.DEBUG) else: DEBUG = False """ __author__ = """Jannis Gebau...
20.363636
70
0.642857
import os import re from requests import Session from .changelogs import get, get_commit_log __author__ = """Jannis Gebauer""" __email__ = 'jay@pyup.io' __version__ = '0.14.0' url_re = re.compile(r"(https?://[^\s<>\"'\x7f-\xff]+)", re.IGNORECASE)
true
true
f75385c7d5017ffd655481218e88cc35342be07b
1,959
py
Python
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
2
2020-09-25T02:42:34.000Z
2021-08-22T11:27:58.000Z
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
1
2020-10-17T14:38:45.000Z
2020-10-17T14:50:19.000Z
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
2
2019-10-14T18:05:25.000Z
2021-07-17T19:28:04.000Z
import numpy as np def normalize_network(X, normalization=None): """ """ X = X.copy() if isinstance(normalization, str) and normalization == "None": normalization = None if normalization is None: X = X.applymap(lambda w: int(w)) else: X = X.applymap(lambda w: float(w)...
29.238806
86
0.462991
import numpy as np def normalize_network(X, normalization=None): X = X.copy() if isinstance(normalization, str) and normalization == "None": normalization = None if normalization is None: X = X.applymap(lambda w: int(w)) else: X = X.applymap(lambda w: float(w)) M = X.cop...
true
true
f753860ec916cec0c701de517f95e810793c4e36
2,250
py
Python
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
2
2018-10-03T14:51:28.000Z
2018-10-15T05:13:55.000Z
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
null
null
null
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import with_statement, print_function, absolute_import import numpy as np import torch from torch import nn from torch.nn import functional as F import librosa import pysptk from wavenet_vocoder.mixture import discretized_mix_logistic_loss from wavenet_vocoder.mixture import sample_fr...
28.846154
96
0.683111
from __future__ import with_statement, print_function, absolute_import import numpy as np import torch from torch import nn from torch.nn import functional as F import librosa import pysptk from wavenet_vocoder.mixture import discretized_mix_logistic_loss from wavenet_vocoder.mixture import sample_from_discretized_m...
true
true
f753872208a0b505dd5edb9fc4cebe64bdbaf109
1,039
py
Python
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class TreeViewDrawMode(Enum,IComparable,IFormattable,IConvertible): """ Defines constants that represent the ways a System.Windows.Forms.TreeView can be drawn. enum TreeViewDrawMode,values: Normal (0),OwnerDrawAll (2),OwnerDrawText (1) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <...
29.685714
215
0.678537
class TreeViewDrawMode(Enum,IComparable,IFormattable,IConvertible): pass """ __format__(formattable: IFormattable,format: str) -> str """ pass pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initial...
true
true