hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c0090671165a8b560227f94ffdc7237203e3bb12 | 982 | py | Python | motor/test/function.py | geekincode/math_little_research | dbd649bfe7c3e9f7b7e393f5b0b85305190eee17 | [
"MIT"
] | 1 | 2022-01-02T08:24:22.000Z | 2022-01-02T08:24:22.000Z | motor/test/function.py | geekincode/math_little_research | dbd649bfe7c3e9f7b7e393f5b0b85305190eee17 | [
"MIT"
] | null | null | null | motor/test/function.py | geekincode/math_little_research | dbd649bfe7c3e9f7b7e393f5b0b85305190eee17 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import style
from sklearn.metrics import max_error
# fig, axes = plt.subplots()
class Function():
def __init__(self,a,b,c):
self.fig, self.ax = plt.subplots()
self.x, self.y = [], []
self.plt ... | 25.842105 | 68 | 0.546843 |
0d79bcd6491c749e22ae97394ee79d78d18b063d | 3,518 | py | Python | test/IECore/Enum.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 386 | 2015-01-02T11:10:43.000Z | 2022-03-10T15:12:20.000Z | test/IECore/Enum.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 484 | 2015-01-09T18:28:06.000Z | 2022-03-31T16:02:04.000Z | test/IECore/Enum.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 99 | 2015-01-28T23:18:04.000Z | 2022-03-27T00:59:39.000Z | ##########################################################################
#
# Copyright (c) 2007-2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... | 35.897959 | 76 | 0.654633 |
7267cc454df26d379523bbca9fcc434869f7a525 | 313 | py | Python | abc/abc050/abc050c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | abc/abc050/abc050c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | abc/abc050/abc050c.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | N = int(input())
A = list(map(int, input().split()))
m = 1000000007
A.sort()
if N % 2 == 0:
B = list(range(1, N, 2)) * 2
else:
B = [0] + list(range(2, N, 2)) * 2
B.sort()
if A != B:
print(0)
else:
result = 1
for i in range(N // 2):
result *= 2
result %= m
print(result)
| 14.904762 | 38 | 0.472843 |
57f10e4551c0d0bac8c4af5f67ba8ea41b4d54fb | 2,199 | py | Python | trackers/tracker.py | manolosolalinde/Vehicle-Counting | 898e1993613ea5a6803078cc5026d2d690c12322 | [
"MIT"
] | null | null | null | trackers/tracker.py | manolosolalinde/Vehicle-Counting | 898e1993613ea5a6803078cc5026d2d690c12322 | [
"MIT"
] | null | null | null | trackers/tracker.py | manolosolalinde/Vehicle-Counting | 898e1993613ea5a6803078cc5026d2d690c12322 | [
"MIT"
] | null | null | null | import sys
sys.path.append('..')
from trackers.opencv.opencv_trackers import csrt_create, kcf_create
from trackers.camshift.camshift_tracker import camshift_create
from blobs.utils import get_centroid, get_area, box_contains_point
from counter import is_passed_counting_line
def create_blob(bounding_box, frame, model... | 43.117647 | 123 | 0.666212 |
a6828702e4286d6e34cdd6a829335f39c67fb5ea | 3,081 | py | Python | tests/lib/utils/test_files.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 6 | 2017-04-20T00:49:49.000Z | 2020-12-20T16:27:10.000Z | tests/lib/utils/test_files.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 3 | 2017-04-08T15:47:16.000Z | 2017-05-18T17:40:59.000Z | tests/lib/utils/test_files.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 8 | 2017-04-07T23:42:36.000Z | 2021-08-10T11:05:10.000Z | # Copyright (c) 2016 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 31.438776 | 75 | 0.669912 |
28240f8a729c830b02a28264ada2cfda5a925b5d | 8,343 | py | Python | multiple_models/hybrid_v2.py | psAI-clOps/psAI-clOps | 48db87c2c0e6b7b7532ff44d9f3338d4f1ed5f2f | [
"MIT"
] | 2 | 2021-01-07T14:53:28.000Z | 2021-01-25T11:59:39.000Z | multiple_models/hybrid_v2.py | psAI-clOps/psAI-clOps | 48db87c2c0e6b7b7532ff44d9f3338d4f1ed5f2f | [
"MIT"
] | null | null | null | multiple_models/hybrid_v2.py | psAI-clOps/psAI-clOps | 48db87c2c0e6b7b7532ff44d9f3338d4f1ed5f2f | [
"MIT"
] | null | null | null | import numpy as np
import random
import tensorflow as tf
from tensorflow.keras.preprocessing.image import load_img
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.layers import (
Input,
Conv2D,
Dense,
Flatten,
Embedding,
Concatenate,
GlobalMaxPool1D,
Conv1... | 32.337209 | 88 | 0.64653 |
727759ef0e55761b44b29e803fd5356106da7056 | 11,570 | py | Python | tools/make_cpp.py | rockonedege/SCPI-CPP | f295f684ffbd4b03e65b439bf0d771fb673fd700 | [
"MIT"
] | null | null | null | tools/make_cpp.py | rockonedege/SCPI-CPP | f295f684ffbd4b03e65b439bf0d771fb673fd700 | [
"MIT"
] | null | null | null | tools/make_cpp.py | rockonedege/SCPI-CPP | f295f684ffbd4b03e65b439bf0d771fb673fd700 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from get_cmds import scpi, ieee488_2
from pathlib import Path
# from pprint import pprint as print
import re
def condense(param):
repl = [('< ', '<'),
(' >', '>'),
('numeric value', 'numeric_value'),
('register number', 'register_number'),
('... | 27.287736 | 85 | 0.462316 |
92d5a1057005ecbd471058a6cb2da8472bf0e5e8 | 23 | py | Python | packages/Mock/TexturePreview/__init__.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 7 | 2016-02-13T18:47:23.000Z | 2020-07-03T13:47:49.000Z | packages/Mock/TexturePreview/__init__.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 1 | 2018-06-13T04:55:27.000Z | 2021-11-05T05:52:51.000Z | packages/Mock/TexturePreview/__init__.py | tommo/gii | 03624a57cf74a07e38bfdc7f53c50bd926b7b5a7 | [
"MIT"
] | 4 | 2016-02-15T13:32:46.000Z | 2019-12-12T17:22:31.000Z | import TexturePreview
| 7.666667 | 21 | 0.869565 |
5453c191157e6ed64d0a3c761a2ea1ecb9322adb | 2,762 | py | Python | studies/migrations/0015_auto_20210125_1159.py | UiL-OTS-labs/ethics | 7782e08a4f772b375ba56b4b865fa9efcd730ca1 | [
"MIT"
] | 2 | 2017-04-22T11:07:13.000Z | 2018-03-02T12:23:24.000Z | studies/migrations/0015_auto_20210125_1159.py | UiL-OTS-labs/ethics | 7782e08a4f772b375ba56b4b865fa9efcd730ca1 | [
"MIT"
] | 124 | 2020-04-30T07:06:58.000Z | 2022-03-28T12:50:16.000Z | studies/migrations/0015_auto_20210125_1159.py | UiL-OTS-labs/etcl | a22df7ff78620b704a500354fb218fbe9bcabf5f | [
"MIT"
] | 1 | 2021-08-04T11:44:21.000Z | 2021-08-04T11:44:21.000Z | # Generated by Django 2.2.17 on 2021-01-25 10:59
from django.db import migrations, models
import main.validators
import proposals.utils.proposal_utils
class Migration(migrations.Migration):
dependencies = [
('studies', '0014_auto_20200428_1337'),
]
operations = [
migrations.AlterField(
... | 67.365854 | 571 | 0.730992 |
87d6a217d56d8263ab9d4353c7b0143396b66d3f | 31 | py | Python | wrapweb/default_config.py | sarum9in/wrapweb | 0a4aa6e505c587de4f2c4d61719df0c1c016dfa1 | [
"Apache-2.0"
] | null | null | null | wrapweb/default_config.py | sarum9in/wrapweb | 0a4aa6e505c587de4f2c4d61719df0c1c016dfa1 | [
"Apache-2.0"
] | null | null | null | wrapweb/default_config.py | sarum9in/wrapweb | 0a4aa6e505c587de4f2c4d61719df0c1c016dfa1 | [
"Apache-2.0"
] | null | null | null | SECRET_KEY = "changeme please"
| 15.5 | 30 | 0.774194 |
d69a538cfdb9816efcd1d040554c36705b9f84ec | 7,118 | py | Python | catalog/views.py | tiagoengel/udacity-item-catalog | 886184630e0663e4717f5689f1c0d7af4d5bbb02 | [
"MIT"
] | null | null | null | catalog/views.py | tiagoengel/udacity-item-catalog | 886184630e0663e4717f5689f1c0d7af4d5bbb02 | [
"MIT"
] | null | null | null | catalog/views.py | tiagoengel/udacity-item-catalog | 886184630e0663e4717f5689f1c0d7af4d5bbb02 | [
"MIT"
] | null | null | null | import json
from flask import make_response, session, request, redirect
from flask import render_template, url_for, jsonify, flash
from sqlalchemy.exc import IntegrityError
from catalog import app, db
from catalog.models import Item, Category, User
from catalog.auth import oauth, providers
def protected_resource(ow... | 29.172131 | 90 | 0.641191 |
261f8df5c015a3b8c95dd3bfb038299faaa2fafd | 3,166 | py | Python | app/app/settings.py | abughalib/recipe-app-api | bf1097f7bea6d6f665d91a555f18278d05bf9c8c | [
"MIT"
] | null | null | null | app/app/settings.py | abughalib/recipe-app-api | bf1097f7bea6d6f665d91a555f18278d05bf9c8c | [
"MIT"
] | null | null | null | app/app/settings.py | abughalib/recipe-app-api | bf1097f7bea6d6f665d91a555f18278d05bf9c8c | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
from p... | 23.804511 | 85 | 0.737524 |
8a743494f71e70a5123ff9c864fcdb0e57e1276a | 57 | py | Python | spikeforest/spikeforest/spikewidgets/widgets/sortingaccuracywidget/__init__.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:07:19.000Z | 2021-09-23T01:07:19.000Z | spikeforest/spikeforest/spikewidgets/widgets/sortingaccuracywidget/__init__.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | null | null | null | spikeforest/spikeforest/spikewidgets/widgets/sortingaccuracywidget/__init__.py | mhhennig/spikeforest | 5b4507ead724af3de0be5d48a3b23aaedb0be170 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:07:21.000Z | 2021-09-23T01:07:21.000Z | from .sortingaccuracywidget import SortingAccuracyWidget
| 28.5 | 56 | 0.912281 |
b9e6c40abf8091ce8103eff58aa36f12efd3bd72 | 2,765 | py | Python | posthog/async_migrations/test/test_utils.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 7,409 | 2020-02-09T23:18:10.000Z | 2022-03-31T22:36:25.000Z | posthog/async_migrations/test/test_utils.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 5,709 | 2020-02-09T23:26:13.000Z | 2022-03-31T20:20:01.000Z | posthog/async_migrations/test/test_utils.py | leirons/posthog | 3d8bcdfae03a1ead9aad44cd4d176ca2180c1ea4 | [
"MIT"
] | 647 | 2020-02-13T17:50:55.000Z | 2022-03-31T11:24:19.000Z | from datetime import datetime, timedelta, timezone
from unittest.mock import patch
import pytest
from posthog.async_migrations.definition import AsyncMigrationOperation
from posthog.async_migrations.test.util import create_async_migration
from posthog.async_migrations.utils import (
complete_migration,
execut... | 35.448718 | 112 | 0.74358 |
3f41fcacfefc2652e96112a44c4831c88bb8f139 | 13,777 | py | Python | queue_services/entity-filer/src/entity_filer/worker.py | ozamani9/lear | 3bde6db82c2ffbad42cece73dcaf8503b013fd50 | [
"Apache-2.0"
] | null | null | null | queue_services/entity-filer/src/entity_filer/worker.py | ozamani9/lear | 3bde6db82c2ffbad42cece73dcaf8503b013fd50 | [
"Apache-2.0"
] | null | null | null | queue_services/entity-filer/src/entity_filer/worker.py | ozamani9/lear | 3bde6db82c2ffbad42cece73dcaf8503b013fd50 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 45.770764 | 120 | 0.617696 |
70864a76a1b1cdea22f310f9d8b8ddc1352dcd43 | 35,434 | py | Python | electrum_dash/base_wizard.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | null | null | null | electrum_dash/base_wizard.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | null | null | null | electrum_dash/base_wizard.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2016 Thomas Voegtlin
#
# 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 witho... | 44.347935 | 123 | 0.596151 |
0870aa4cb326b0830e24b330f3ab8bb028351f2f | 1,314 | py | Python | Machine_Learning/Regression/Data_Preprocessing/dataPreprocessing.py | TheEagerLearner/Hacktoberfest2020 | a244d49c0f7959e05bbcdad39ee49b559b32e4a2 | [
"MIT"
] | null | null | null | Machine_Learning/Regression/Data_Preprocessing/dataPreprocessing.py | TheEagerLearner/Hacktoberfest2020 | a244d49c0f7959e05bbcdad39ee49b559b32e4a2 | [
"MIT"
] | null | null | null | Machine_Learning/Regression/Data_Preprocessing/dataPreprocessing.py | TheEagerLearner/Hacktoberfest2020 | a244d49c0f7959e05bbcdad39ee49b559b32e4a2 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#reading data from the csv file
dataset=pd.read_csv("Data.csv")
#Seperating dataset into dependent and independent variables
X=dataset.iloc[:,:-1].values
Y=dataset.iloc[:,-1].values
#removing NULL values from the dataset
from sklear... | 24.792453 | 93 | 0.736682 |
9fa02ed1921f67e5998551bd346748060b4109e5 | 475 | py | Python | monitor/alerts/instance-get-example/instance-get-example.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 234 | 2016-01-27T03:04:38.000Z | 2022-02-25T20:13:43.000Z | monitor/alerts/instance-get-example/instance-get-example.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 351 | 2016-04-06T16:55:33.000Z | 2022-03-10T18:42:36.000Z | monitor/alerts/instance-get-example/instance-get-example.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 494 | 2016-03-30T15:28:20.000Z | 2022-03-28T19:39:36.000Z | # Download the Python helper library from twilio.com/docs/python/install
import os
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
# To set up environmental variables, see http://twil.io/secure
account_sid = os.environ['TWILIO_ACCOUNT_SID']
auth_token = os.environ['TWILIO_... | 36.538462 | 75 | 0.804211 |
0aee4e793f4572971b3f4d073cd81f36ac58619f | 5,536 | py | Python | beartype/_util/hint/pep/proposal/pep484585/utilpep484585arg.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | beartype/_util/hint/pep/proposal/pep484585/utilpep484585arg.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | beartype/_util/hint/pep/proposal/pep484585/utilpep484585arg.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2021 Beartype authors.
# See "LICENSE" for further details.
'''
Project-wide :pep:`484`- and :pep:`585`-compliant **argument type hint
utilities** (i.e., callables generically applicable to child... | 35.948052 | 79 | 0.649747 |
e09a408cb79b7efd96fbce43dbe0da238d8bb10b | 1,312 | py | Python | burton/stringextractor/test/rcextractortests.py | Extensis/Burton | a948f045a021f468ef34d6e8e6b8a5caaa132e27 | [
"MIT"
] | 2 | 2018-01-09T23:32:35.000Z | 2018-08-10T23:48:33.000Z | burton/stringextractor/test/rcextractortests.py | Extensis/Burton | a948f045a021f468ef34d6e8e6b8a5caaa132e27 | [
"MIT"
] | null | null | null | burton/stringextractor/test/rcextractortests.py | Extensis/Burton | a948f045a021f468ef34d6e8e6b8a5caaa132e27 | [
"MIT"
] | 5 | 2017-03-23T16:49:46.000Z | 2022-02-18T12:06:59.000Z | import cStringIO
import mock
import os
import unittest
import stringextractor
class RCExtractorTests(unittest.TestCase):
sample_resx = \
"""#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
#include "afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _... | 24.754717 | 75 | 0.669207 |
74c4323d70a00eecd21acc3dffb4aff4bdf11e9d | 8,024 | py | Python | cradmin_legacy/demo/project/demo/settings.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | null | null | null | cradmin_legacy/demo/project/demo/settings.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 17 | 2018-03-07T15:52:42.000Z | 2022-03-12T01:07:06.000Z | cradmin_legacy/demo/project/demo/settings.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 1 | 2018-07-23T22:13:45.000Z | 2018-07-23T22:13:45.000Z | """
Django settings for cradmin demo project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from __future__ import unicode_literals
from django_dbdev.backends.sql... | 29.178182 | 104 | 0.682079 |
08536e21e9b50ab16127af6f269ab53267686b0c | 6,409 | py | Python | src/model/vgg.py | OpenXAIProject/Variational_Dropouts | 61ac484edb2101115bd5f5a1a0053014e6669183 | [
"Apache-2.0"
] | 13 | 2018-11-30T01:16:32.000Z | 2021-09-10T21:16:22.000Z | src/model/vgg.py | OpenXAIProject/Variational_Dropouts | 61ac484edb2101115bd5f5a1a0053014e6669183 | [
"Apache-2.0"
] | null | null | null | src/model/vgg.py | OpenXAIProject/Variational_Dropouts | 61ac484edb2101115bd5f5a1a0053014e6669183 | [
"Apache-2.0"
] | 6 | 2018-11-30T01:44:20.000Z | 2020-04-26T19:51:05.000Z | from net import Net
from layers import *
from bbdropout import BBDropout
from dbbdropout import DBBDropout
from vib import VIB
from sbp import SBP
from gendropout import GenDropout
from misc import *
class VGG(Net):
def __init__(self, n_classes, n_units=None, mask=None,
name='vgg', reuse=None):
... | 42.164474 | 94 | 0.555001 |
e9dd0de392b9e1f3a918f078cfbc7898509a5355 | 531 | py | Python | TestingCodeForm/SnapshotScript.py | leejaymin/QDroid | 13ff9d26932378513a7c9f0038eb59b922ed06eb | [
"Apache-2.0"
] | null | null | null | TestingCodeForm/SnapshotScript.py | leejaymin/QDroid | 13ff9d26932378513a7c9f0038eb59b922ed06eb | [
"Apache-2.0"
] | null | null | null | TestingCodeForm/SnapshotScript.py | leejaymin/QDroid | 13ff9d26932378513a7c9f0038eb59b922ed06eb | [
"Apache-2.0"
] | null | null | null | import sys
# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
if not device:
print >> sys.stderr, "Couldn't get connection"
... | 31.235294 | 105 | 0.781544 |
a819e869ecd8632a95ff1db769a499f261979742 | 23,716 | py | Python | gui/qt/external_plugins_window.py | Hser2bio/ViLight | e8c4179d13178fe61796e8f9ae264e697d599664 | [
"MIT"
] | 1 | 2021-06-08T20:06:34.000Z | 2021-06-08T20:06:34.000Z | gui/qt/external_plugins_window.py | Hser2bio/ViLight | e8c4179d13178fe61796e8f9ae264e697d599664 | [
"MIT"
] | 6 | 2019-12-01T23:58:20.000Z | 2020-07-24T17:30:10.000Z | gui/qt/external_plugins_window.py | Hser2bio/ViLight | e8c4179d13178fe61796e8f9ae264e697d599664 | [
"MIT"
] | 3 | 2020-01-09T08:17:25.000Z | 2020-09-15T01:04:41.000Z | #!/usr/bin/env python3
#
# Electron Cash - lightweight Bitcoin client
# Copyright (C) 2018 Electron Cash developers
#
# 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,
# in... | 47.432 | 234 | 0.696703 |
2239b04f97e400604af1f19071ee7503ae9c2679 | 489 | py | Python | setup.py | IndoorCorgi/cgsensor | 13874e1d2610f96c7ea9e786ef6b947689c585bc | [
"Apache-2.0"
] | 1 | 2021-11-04T09:57:30.000Z | 2021-11-04T09:57:30.000Z | setup.py | IndoorCorgi/cgsensor | 13874e1d2610f96c7ea9e786ef6b947689c585bc | [
"Apache-2.0"
] | null | null | null | setup.py | IndoorCorgi/cgsensor | 13874e1d2610f96c7ea9e786ef6b947689c585bc | [
"Apache-2.0"
] | 2 | 2021-11-03T14:37:20.000Z | 2022-02-06T08:14:48.000Z | from setuptools import setup
setup(
name='cgsensor',
version='1.0',
description='Python package and command line tool to control sensors on Raspberry Pi',
author='Indoor Corgi',
author_email='indoorcorgi@gmail.com',
url='https://github.com/IndoorCorgi/cgsensor',
license='Apache License 2.0'... | 30.5625 | 90 | 0.685072 |
9384897a19ca72953d27f786ae623304886c8f87 | 12,432 | py | Python | CM3D2 Converter/anm_export.py | yknD-CM3D2/Blender-CM3D2-Converter | c0f0fb62b684d4325ce5917617b3bdcb5b75c7a9 | [
"Apache-2.0"
] | 65 | 2019-02-15T14:49:56.000Z | 2022-03-12T20:18:41.000Z | CM3D2 Converter/anm_export.py | yknD-CM3D2/Blender-CM3D2-Converter | c0f0fb62b684d4325ce5917617b3bdcb5b75c7a9 | [
"Apache-2.0"
] | 23 | 2015-09-19T01:54:48.000Z | 2018-12-21T02:14:20.000Z | CM3D2 Converter/anm_export.py | CM3D2user/Blender-CM3D2-Converter | add1bc104633837cb7a0574ca30b73992de1dc6f | [
"Apache-2.0"
] | 20 | 2019-05-15T17:53:08.000Z | 2022-03-19T09:55:36.000Z | import bpy, mathutils
import struct, re, math, unicodedata
from . import common
# メインオペレーター
class export_cm3d2_anm(bpy.types.Operator):
bl_idname = 'export_anim.export_cm3d2_anm'
bl_label = "CM3D2モーション (.anm)"
bl_description = "カスタムメイド3D2のanmファイルを保存します"
bl_options = {'REGISTER'}
filepath = bpy.props.StringPrope... | 37.110448 | 160 | 0.667873 |
88bbc8b0d83e052aef3f70982b545a76c6a6bb76 | 56 | py | Python | tests/desugar/fundec/input/test03.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | 1 | 2020-11-24T05:24:26.000Z | 2020-11-24T05:24:26.000Z | tests/desugar/fundec/input/test03.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | null | null | null | tests/desugar/fundec/input/test03.py | Nakrez/RePy | 057db55a99eac2c5cb3d622fa1f2e29f6083d8d6 | [
"MIT"
] | null | null | null | def fun(a, b, c="test", d = 1, e = "bar"):
return 1
| 18.666667 | 42 | 0.464286 |
69859bc41e45547140fd622db880725863c80221 | 42,591 | py | Python | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/glance_update_image_response.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/glance_update_image_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/glance_update_image_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class GlanceUpdateImageResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map ... | 30.270789 | 919 | 0.644784 |
a8455b867eddf932466edc8426072da559d12bad | 3,913 | py | Python | Torch/train.py | Rintarooo/MDVRP_MHA | f196f1c99c3e4efa1ab6d75f4af77685afe4d191 | [
"MIT"
] | 7 | 2021-05-17T09:48:21.000Z | 2022-03-16T07:37:08.000Z | Torch/train.py | Rintarooo/MDVRP_MHA | f196f1c99c3e4efa1ab6d75f4af77685afe4d191 | [
"MIT"
] | null | null | null | Torch/train.py | Rintarooo/MDVRP_MHA | f196f1c99c3e4efa1ab6d75f4af77685afe4d191 | [
"MIT"
] | 1 | 2021-05-08T09:16:07.000Z | 2021-05-08T09:16:07.000Z | import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from tqdm import tqdm
from time import time
from Nets.model import AttentionModel
from baseline import RolloutBaseline
from dataset import generate_data, Generator
from config import Config, load_pkl, train_parser
d... | 37.990291 | 197 | 0.670585 |
b79b68b59d3f75c0f6b9cd4c39b47bde2c910889 | 6,437 | py | Python | tests/test_flows.py | MattiaVarrone/nnest | 9e12be0135ba2e7fa186a904bc33480c3b0c655a | [
"MIT"
] | 20 | 2019-04-11T13:39:15.000Z | 2021-11-18T23:39:04.000Z | tests/test_flows.py | MattiaVarrone/nnest | 9e12be0135ba2e7fa186a904bc33480c3b0c655a | [
"MIT"
] | 3 | 2019-05-02T10:06:04.000Z | 2020-08-20T02:36:39.000Z | tests/test_flows.py | MattiaVarrone/nnest | 9e12be0135ba2e7fa186a904bc33480c3b0c655a | [
"MIT"
] | 6 | 2019-05-01T19:22:04.000Z | 2021-08-02T11:36:08.000Z | import torch
from torch.distributions import MultivariateNormal, Uniform, TransformedDistribution, SigmoidTransform
import numpy as np
from nnest.trainer import Trainer
from nnest.distributions import GeneralisedNormal
max_forward_backward_diff = 1.0E-5
np.random.seed(0)
def test_base_dist():
for dims in [2, 3,... | 44.701389 | 106 | 0.596551 |
7846f6aa3dd527cf5efe4b098df78584fefbe402 | 3,569 | py | Python | scholar_crawler.py | GNiendorf/RL-Scholar-Crawler | 51bff1cfd9f32485ff52360a63bf6769300634b9 | [
"MIT"
] | null | null | null | scholar_crawler.py | GNiendorf/RL-Scholar-Crawler | 51bff1cfd9f32485ff52360a63bf6769300634b9 | [
"MIT"
] | null | null | null | scholar_crawler.py | GNiendorf/RL-Scholar-Crawler | 51bff1cfd9f32485ff52360a63bf6769300634b9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from requests import get
from bs4 import BeautifulSoup
import numpy as np
from time import sleep
import pandas as pd
url = 'https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:reinforcement_learning'
base_url = 'https://scholar.google.com'
base_page_url = url + '&a... | 33.046296 | 113 | 0.647801 |
e3147ba958e8b1be21c8dae5f03623a93d0918b3 | 4,738 | py | Python | setup.py | ethanjperez/allennlp | e520993f16f0da7e2c40f6e44b8dc56338f46b57 | [
"Apache-2.0"
] | 24 | 2019-09-16T00:10:54.000Z | 2021-09-08T19:31:51.000Z | setup.py | ethanjperez/allennlp | e520993f16f0da7e2c40f6e44b8dc56338f46b57 | [
"Apache-2.0"
] | null | null | null | setup.py | ethanjperez/allennlp | e520993f16f0da7e2c40f6e44b8dc56338f46b57 | [
"Apache-2.0"
] | 7 | 2019-09-16T02:37:31.000Z | 2021-09-01T06:06:17.000Z | """
In order to create a package for pypi, you need to follow several steps.
1. Create a .pypirc in your home directory. It should look like this:
```
[distutils]
index-servers =
pypi
pypitest
[pypi]
username=allennlp
password= Get the password from LastPass.
[pypitest]
repository=https://test.pypi.org/legacy/
... | 31.586667 | 103 | 0.626636 |
4f887ec0e7a93abf1cc9ddee397bb8e4aa172861 | 938 | py | Python | kubernetes/test/test_v1_node_address.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_address.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_address.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 20.844444 | 105 | 0.701493 |
46476c437730b83d21a4f6a605d189b9bb5445e0 | 163 | py | Python | task3/ex1-No.K.py | zhangkai803/data_structure_python | d57e686eca3d500c4a9893172cab1213192414b5 | [
"Apache-2.0"
] | null | null | null | task3/ex1-No.K.py | zhangkai803/data_structure_python | d57e686eca3d500c4a9893172cab1213192414b5 | [
"Apache-2.0"
] | null | null | null | task3/ex1-No.K.py | zhangkai803/data_structure_python | d57e686eca3d500c4a9893172cab1213192414b5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2019-08-12 15:30
# @Author : Kai Zhang
# @Email : kai.zhang@lizhiweike.com
# @File : ex1-No.K.py
# @Software: PyCharm
| 18.111111 | 37 | 0.570552 |
85a0950eb2de3ec7808337fe1ee14c2fc3e58ff6 | 743 | py | Python | src/ftp.py | BetaPictoris/transit | 433de281533e28dccdaa79d6f4d59255a341687d | [
"MIT"
] | null | null | null | src/ftp.py | BetaPictoris/transit | 433de281533e28dccdaa79d6f4d59255a341687d | [
"MIT"
] | 1 | 2022-02-19T18:36:29.000Z | 2022-02-19T18:36:29.000Z | src/ftp.py | BetaPictoris/transit | 433de281533e28dccdaa79d6f4d59255a341687d | [
"MIT"
] | 1 | 2021-08-30T16:07:33.000Z | 2021-08-30T16:07:33.000Z | from ftplib import FTP
# Connect to a remote FTP server
def connect(server, username='anonymous', password=''):
global ftp
ftp = FTP(server)
ftp.login(username, password)
welcome = ftp.getwelcome()
files = ftp.nlst()
return(files)
# Get welcome message from FTP server
def welcome():
... | 19.552632 | 57 | 0.647376 |
3c5c2404e1f4a3be4505a7da5f604d0707e41f27 | 16,233 | py | Python | src/olympia/addons/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/addons/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/addons/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | import uuid
import json
import zipfile
from io import BytesIO
from urllib.parse import urlparse
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import File
from django.core.signing import BadSignature, SignatureExpired, Time... | 37.576389 | 88 | 0.632107 |
14ef4a48561b7a52636126fcfc2c930ce3e7a336 | 4,902 | py | Python | python/background_removal.py | PeterBetlem/image_processing | d94af8d53ba28957bc3e86465f7be214117c5b35 | [
"BSD-3-Clause"
] | 6 | 2021-03-08T00:24:02.000Z | 2021-11-13T06:53:11.000Z | python/background_removal.py | PeterBetlem/image_processing | d94af8d53ba28957bc3e86465f7be214117c5b35 | [
"BSD-3-Clause"
] | 5 | 2021-01-17T13:39:46.000Z | 2021-02-02T15:10:09.000Z | python/background_removal.py | PeterBetlem/image_processing | d94af8d53ba28957bc3e86465f7be214117c5b35 | [
"BSD-3-Clause"
] | 1 | 2021-04-16T03:39:30.000Z | 2021-04-16T03:39:30.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 24 11:36:26 2020
@author: Peter Betlem
@institution: The University Centre in Svalbard
@year: 2020
The scripts below are improved from the approach used by Remote Sens. 2020,
12(2), 330; https://doi.org/10.3390/rs12020330 and specifically tailored for the
digitisation o... | 37.419847 | 123 | 0.624439 |
c5bd1f945fd56c0213e85e3723c0ef7009a6b71a | 1,631 | py | Python | tests/test_pep8_tuple.py | jparise/flake8_tuple | adf0510e66f80edda523861e9ac7a2e44f514fd5 | [
"BSD-3-Clause"
] | null | null | null | tests/test_pep8_tuple.py | jparise/flake8_tuple | adf0510e66f80edda523861e9ac7a2e44f514fd5 | [
"BSD-3-Clause"
] | null | null | null | tests/test_pep8_tuple.py | jparise/flake8_tuple | adf0510e66f80edda523861e9ac7a2e44f514fd5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from ddt import ddt, data, unpack
from flake8_tuple import check_code_for_wrong_tuple, TupleChecker
@ddt
class Testflake8Tuple(unittest.TestCase):
@unpack
@data(
("bar = 1, 2", 0),
("foo = 1", 0),
("foo = (1,)", 0),
("foo = 1,", 1),
... | 31.980392 | 76 | 0.464132 |
a7ea3f6ae7f382ff17220ad3eeef055b70ce0777 | 20,786 | py | Python | networks/dmnet_2d_init2.py | QuIIL/Noninvasive_Histopathology_MRI | b418ca5cbd507bb813ac9db43b708823a03a957e | [
"MIT"
] | null | null | null | networks/dmnet_2d_init2.py | QuIIL/Noninvasive_Histopathology_MRI | b418ca5cbd507bb813ac9db43b708823a03a957e | [
"MIT"
] | null | null | null | networks/dmnet_2d_init2.py | QuIIL/Noninvasive_Histopathology_MRI | b418ca5cbd507bb813ac9db43b708823a03a957e | [
"MIT"
] | 1 | 2021-06-30T03:29:30.000Z | 2021-06-30T03:29:30.000Z | """gluon-style implementation of dmnet"""
import inspect
import time
from math import floor
from mxnet import nd, initializer, gpu, symbol, viz, cpu
from mxnet.gluon.nn import Conv2D, Activation, BatchNorm, HybridSequential, \
HybridBlock, Dropout, MaxPool2D, InstanceNorm, LeakyReLU, LayerNorm
from networks.layers... | 37.724138 | 115 | 0.593332 |
ca0cac790ab6441db01f53eab93f7c516b374129 | 303,900 | py | Python | languages/de.py | kachelundmacher/sinaeems | d72e07813352a3539805752a0a9c8a6bc281b23f | [
"MIT"
] | null | null | null | languages/de.py | kachelundmacher/sinaeems | d72e07813352a3539805752a0a9c8a6bc281b23f | [
"MIT"
] | null | null | null | languages/de.py | kachelundmacher/sinaeems | d72e07813352a3539805752a0a9c8a6bc281b23f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
{
'(Recipient)': '(Empfänger)',
"'Cancel' will indicate an asset log entry did not occur": "'Abbrechen' zeigt an, dass ein Asset Log Eintrag nicht eingetreten ist",
"A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group loc... | 60.178218 | 931 | 0.766897 |
72c76ab535d04cf07f8762e82c71d4b88053ebeb | 406 | py | Python | relie/__init__.py | pimdh/relie | d34ed58bcbd82335d29e9dfb2c6170dbd83fd18f | [
"MIT"
] | 38 | 2019-03-07T14:23:59.000Z | 2022-03-17T02:23:22.000Z | relie/__init__.py | pimdh/relie | d34ed58bcbd82335d29e9dfb2c6170dbd83fd18f | [
"MIT"
] | 2 | 2022-03-01T12:20:21.000Z | 2022-03-15T14:28:23.000Z | relie/__init__.py | pimdh/relie | d34ed58bcbd82335d29e9dfb2c6170dbd83fd18f | [
"MIT"
] | 4 | 2019-03-18T05:09:55.000Z | 2022-02-27T16:38:48.000Z | from .local_diffeo_transform import LocalDiffeoTransform
from .local_diffeo_transformed_distribution import LocalDiffeoTransformedDistribution
from .lie_multipy_transform import (
LieMultiplyTransform,
SO3MultiplyTransform,
SE3MultiplyTransform,
)
from .so3_exp_transform import (
SO3ExpTransform,
SO... | 29 | 85 | 0.834975 |
f0db4d905d9424f1ba138d310c64dfe319030240 | 699 | py | Python | tests/formatters/init_imports.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | 1 | 2020-12-04T10:26:34.000Z | 2020-12-04T10:26:34.000Z | tests/formatters/init_imports.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | null | null | null | tests/formatters/init_imports.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests that all formatters are imported correctly."""
from __future__ import unicode_literals
import unittest
from tests import test_lib
class FormattersImportTest(test_lib.ImportCheckTestCase):
"""Tests that CLI helper classes are imported correctly."""
_IGNOR... | 25.888889 | 77 | 0.723891 |
9ef7ee7edbdb4672f65b19803b47fb427f00ef76 | 365 | py | Python | lib/operators_expr/__init__.py | goosemayor/AutoMarketFeature | 1ebfea18bd228dfbf09ec051e6b370880f3580ca | [
"MIT"
] | null | null | null | lib/operators_expr/__init__.py | goosemayor/AutoMarketFeature | 1ebfea18bd228dfbf09ec051e6b370880f3580ca | [
"MIT"
] | null | null | null | lib/operators_expr/__init__.py | goosemayor/AutoMarketFeature | 1ebfea18bd228dfbf09ec051e6b370880f3580ca | [
"MIT"
] | null | null | null | __version__ = '20180426'
import os, sys
# sys.path.append(os.path.dirname(__file__))
# sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from .element import *
from .simple import *
from .logic import *
from .number_theory import *
from .statistics_ import *
from .technical import *
from .trigonomet... | 28.076923 | 62 | 0.736986 |
2cedc0e76f4381710f623379123aaab9f60242be | 407 | py | Python | App/build/bdist.macosx-10.14-x86_64/python3.7-standalone/app/temp/sklearn/utils/seq_dataset.py | tanerqy/coffeegrindsize | 57f6c48213afda2704478b3fc2d0749332ca9d0e | [
"MIT"
] | 366 | 2019-04-07T20:34:48.000Z | 2022-03-29T07:35:38.000Z | App/build/bdist.macosx-10.14-x86_64/python3.7-standalone/app/temp/sklearn/utils/seq_dataset.py | tanerqy/coffeegrindsize | 57f6c48213afda2704478b3fc2d0749332ca9d0e | [
"MIT"
] | 11 | 2019-04-08T15:15:44.000Z | 2021-06-13T17:34:35.000Z | App/build/bdist.macosx-10.14-x86_64/python3.7-standalone/app/temp/sklearn/utils/seq_dataset.py | tanerqy/coffeegrindsize | 57f6c48213afda2704478b3fc2d0749332ca9d0e | [
"MIT"
] | 61 | 2019-04-08T00:58:14.000Z | 2022-03-20T23:04:28.000Z |
def __load():
import imp, os, sys
ext = 'sklearn/utils/seq_dataset.so'
for path in sys.path:
if not path.endswith('lib-dynload'):
continue
ext_path = os.path.join(path, ext)
if os.path.exists(ext_path):
mod = imp.load_dynamic(__name__, ext_path)
b... | 25.4375 | 54 | 0.584767 |
85ff2d3a668950ffa39ae79a5c3780ae91d4a8b7 | 964 | py | Python | backend/utils/testing/cabins_factories.py | hovedstyret/indok-web | 598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159 | [
"MIT"
] | 3 | 2021-11-18T09:29:14.000Z | 2022-01-13T20:12:11.000Z | backend/utils/testing/cabins_factories.py | rubberdok/indok-web | 598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159 | [
"MIT"
] | 277 | 2022-01-17T18:16:44.000Z | 2022-03-31T19:44:04.000Z | backend/utils/testing/cabins_factories.py | hovedstyret/indok-web | 598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159 | [
"MIT"
] | null | null | null | from faker import Faker
from factory.django import DjangoModelFactory
import factory
from apps.cabins.models import Booking as BookingModel
import random
from django.utils import timezone
class BookingFactory(DjangoModelFactory):
class Meta:
model = BookingModel
first_name = Faker(["no-NO"]).first_na... | 31.096774 | 87 | 0.664938 |
ad00b80a1378e86269932a4afc765f367059ed21 | 21,385 | py | Python | cinder/opts.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null | cinder/opts.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null | cinder/opts.py | 2020human/cinder | 04528318848620e4ce2639ea2dd5323783dc7a1f | [
"Apache-2.0"
] | null | null | null |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 54.833333 | 79 | 0.770353 |
69434b5ef2bb6374fab7b6cc958894f20d42bac8 | 1,032 | py | Python | SQL/lecture4/airline/users/views.py | Isaquehg/CS50_Web_Programming | b4560fb5a54bce8aa476b5f69a040e59b82e897f | [
"MIT"
] | null | null | null | SQL/lecture4/airline/users/views.py | Isaquehg/CS50_Web_Programming | b4560fb5a54bce8aa476b5f69a040e59b82e897f | [
"MIT"
] | null | null | null | SQL/lecture4/airline/users/views.py | Isaquehg/CS50_Web_Programming | b4560fb5a54bce8aa476b5f69a040e59b82e897f | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, login, logout
from django.http.response import HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
# Create your views here.
def index(request):
if not request.user.is_authenticated:
return HttpResponseRedirect(reverse("logi... | 32.25 | 74 | 0.665698 |
7c84e396e72178bf9caf662e4b1f15bde49fd95c | 428 | py | Python | examples/main.py | ShibataLab/whillpy | a0c19ed7a9e3638ce39f00e1ab7522a259db3441 | [
"MIT"
] | null | null | null | examples/main.py | ShibataLab/whillpy | a0c19ed7a9e3638ce39f00e1ab7522a259db3441 | [
"MIT"
] | null | null | null | examples/main.py | ShibataLab/whillpy | a0c19ed7a9e3638ce39f00e1ab7522a259db3441 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# main.py: script showing an example of using this package
# Author: Ravi Joshi
# Date: 2018/10/01
# import modules
import whillpy
# initialize Whill by providing the name of the serial port
whill = whillpy.connect(port='/dev/ttyUSB0')
# control the power
... | 22.526316 | 60 | 0.703271 |
517f01db1433fcdbe3f3582f7fa6feee05d0c89c | 32,802 | py | Python | novadocker/virt/docker/driver.py | Juniper/nova-docker | d256c8e232b8967c91f3aa4b9c33a2d71d4e1ea7 | [
"Apache-2.0"
] | null | null | null | novadocker/virt/docker/driver.py | Juniper/nova-docker | d256c8e232b8967c91f3aa4b9c33a2d71d4e1ea7 | [
"Apache-2.0"
] | null | null | null | novadocker/virt/docker/driver.py | Juniper/nova-docker | d256c8e232b8967c91f3aa4b9c33a2d71d4e1ea7 | [
"Apache-2.0"
] | 3 | 2016-06-24T20:05:37.000Z | 2020-02-05T10:19:10.000Z | # Copyright (c) 2013 dotCloud, Inc.
# Copyright 2014 IBM Corp.
# 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/LICEN... | 40.64684 | 79 | 0.598104 |
f05c34ba85a48ca097f64817dd541bb2ef06db34 | 455 | py | Python | manage.py | jrafa/hotshot-api | 5d54d5e5cf0e784d7b7786f79c499997aac71ca4 | [
"MIT"
] | null | null | null | manage.py | jrafa/hotshot-api | 5d54d5e5cf0e784d7b7786f79c499997aac71ca4 | [
"MIT"
] | null | null | null | manage.py | jrafa/hotshot-api | 5d54d5e5cf0e784d7b7786f79c499997aac71ca4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
You can run app in shell command: python manage.py runserver
"""
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from api import APP
import settings
MANAGER = Manager(APP)
MANAGER.add_command(... | 23.947368 | 108 | 0.723077 |
1c314be71dc8f37a5d141751c30c55aed4361499 | 6,174 | py | Python | tests/testshop/settings.py | 2000-ion/TIDPP-Lab3 | 3fc97e6214b6e51f40df39f1692d4deec4bb0cc2 | [
"BSD-3-Clause"
] | 2,160 | 2016-01-24T05:08:59.000Z | 2022-03-31T12:15:30.000Z | tests/testshop/settings.py | 2000-ion/TIDPP-Lab3 | 3fc97e6214b6e51f40df39f1692d4deec4bb0cc2 | [
"BSD-3-Clause"
] | 455 | 2016-01-29T22:41:33.000Z | 2022-03-23T08:28:01.000Z | tests/testshop/settings.py | 2000-ion/TIDPP-Lab3 | 3fc97e6214b6e51f40df39f1692d4deec4bb0cc2 | [
"BSD-3-Clause"
] | 818 | 2016-02-01T15:09:07.000Z | 2022-03-28T19:52:26.000Z | from django.urls import reverse_lazy
from django.utils.text import format_lazy
DEBUG = True
ROOT_URLCONF = 'testshop.urls'
SECRET_KEY = 'test'
SITE_ID = 1
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
STATIC_URL = '/static/'
MEDIA_URL = '/media... | 27.5625 | 119 | 0.671526 |
9156fc7ec0839e836c0cdd801a9431ea3b1b6b8a | 39,622 | py | Python | nar_module/nar/benchmarks/gru4rec/gru4rec2.py | romybu22/chameleon-smart-sampling | d0f0588ed9d38e9c133482a68e84379c21892080 | [
"MIT"
] | null | null | null | nar_module/nar/benchmarks/gru4rec/gru4rec2.py | romybu22/chameleon-smart-sampling | d0f0588ed9d38e9c133482a68e84379c21892080 | [
"MIT"
] | null | null | null | nar_module/nar/benchmarks/gru4rec/gru4rec2.py | romybu22/chameleon-smart-sampling | d0f0588ed9d38e9c133482a68e84379c21892080 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 22 15:14:20 2015
@author: Balázs Hidasi
@url: https://github.com/hidasib/GRU4Rec
"""
import theano
from theano import tensor as T
from theano import function
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import numpy as np
import pandas as pd
from ... | 53.041499 | 288 | 0.604992 |
8af66905de925ee93ab00acaf0ccb46349a63fe9 | 405 | py | Python | Day_34/sandbox.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | Day_34/sandbox.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | Day_34/sandbox.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | age: int
name: str
height: float
is_human: bool
# Type Hint in python
def police_check(age: int) -> bool:
# we said that function police_check have a parameter age with type int
# and the func will return a boolean
if age > 18:
can_drive = True
else:
can_drive = False
return can_d... | 17.608696 | 75 | 0.651852 |
7200d94008d927f544ef4dd1ef6c9fd5e5d72522 | 3,541 | py | Python | Django/week9/patikagram/patikagram/settings.py | AloTech-Full-Stack-Bootcamp/Shafiqullah-Turkmen | 8e006e82cec452bb606952e7c006d0d65550ef7d | [
"MIT"
] | null | null | null | Django/week9/patikagram/patikagram/settings.py | AloTech-Full-Stack-Bootcamp/Shafiqullah-Turkmen | 8e006e82cec452bb606952e7c006d0d65550ef7d | [
"MIT"
] | null | null | null | Django/week9/patikagram/patikagram/settings.py | AloTech-Full-Stack-Bootcamp/Shafiqullah-Turkmen | 8e006e82cec452bb606952e7c006d0d65550ef7d | [
"MIT"
] | null | null | null | """
Django settings for patikagram project.
Generated by 'django-admin startproject' using Django 4.0.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathli... | 25.65942 | 91 | 0.702909 |
7ba8967d6fe968e5e7c205adaf99d85d667c08f2 | 1,789 | py | Python | lib/taurus/core/util/excepthook.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 1 | 2016-10-19T13:54:08.000Z | 2016-10-19T13:54:08.000Z | lib/taurus/core/util/excepthook.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 27 | 2016-05-25T08:56:58.000Z | 2019-01-21T09:18:08.000Z | lib/taurus/core/util/excepthook.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 8 | 2015-07-24T09:16:50.000Z | 2018-06-12T12:33:59.000Z | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 33.12963 | 77 | 0.648966 |
6d150560264b7d8af6d18567c4f41adb3293b16e | 21,723 | py | Python | mitmproxy/tools/console/consoleaddons.py | chenzhenguo/mitmproxy | f6df2be863d3554acf03d6fc20482f58fbfdc3df | [
"MIT"
] | 1 | 2021-12-22T16:29:11.000Z | 2021-12-22T16:29:11.000Z | mitmproxy/tools/console/consoleaddons.py | chenzhenguo/mitmproxy | f6df2be863d3554acf03d6fc20482f58fbfdc3df | [
"MIT"
] | null | null | null | mitmproxy/tools/console/consoleaddons.py | chenzhenguo/mitmproxy | f6df2be863d3554acf03d6fc20482f58fbfdc3df | [
"MIT"
] | null | null | null | import csv
import typing
import mitmproxy.types
from mitmproxy import command, command_lexer
from mitmproxy import contentviews
from mitmproxy import ctx
from mitmproxy import exceptions
from mitmproxy import flow
from mitmproxy import http
from mitmproxy import log
from mitmproxy import tcp
from mitmproxy.tools.conso... | 32.666165 | 116 | 0.57377 |
d2f21efd4d056a10750fc02414a39e01032fc6f0 | 9,333 | py | Python | test/test_pipe.py | lfntac/vpp | 75ae1027c8418225c08c247354b384ac2412f137 | [
"Apache-2.0"
] | null | null | null | test/test_pipe.py | lfntac/vpp | 75ae1027c8418225c08c247354b384ac2412f137 | [
"Apache-2.0"
] | null | null | null | test/test_pipe.py | lfntac/vpp | 75ae1027c8418225c08c247354b384ac2412f137 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from socket import AF_INET, AF_INET6, inet_pton
from framework import VppTestCase, VppTestRunner
from vpp_interface import VppInterface
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, U... | 36.744094 | 76 | 0.501339 |
d31111ebbce15172db6818c1e19561ced0236213 | 29,909 | py | Python | src/pretix/plugins/paypal/payment.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/paypal/payment.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/paypal/payment.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import json
import logging
import urllib.parse
from collections import OrderedDict
from decimal import Decimal
import paypalrestsdk
import paypalrestsdk.exceptions
from django import forms
from django.contrib import messages
from django.core import signing
from django.http import HttpRequest
from django.template.loade... | 45.732416 | 128 | 0.525761 |
169673c6fc92089de471e9514029c9d480d80f0c | 12,648 | py | Python | generate/generate_py.py | zxt1121/hf_ctp_py_proxy | 57dc473de5ff613635c6dfc9eeaf0f33bb162948 | [
"Apache-2.0"
] | null | null | null | generate/generate_py.py | zxt1121/hf_ctp_py_proxy | 57dc473de5ff613635c6dfc9eeaf0f33bb162948 | [
"Apache-2.0"
] | 1 | 2018-12-12T01:37:22.000Z | 2018-12-12T01:37:29.000Z | generate/generate_py.py | zxt1121/hf_ctp_py_proxy | 57dc473de5ff613635c6dfc9eeaf0f33bb162948 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'HaiFeng'
__mtime__ = '2016/9/13'
"""
import os
class Generate:
def __init__(self, dir, apiName):
self.ctp_dir = dir
self.cbNames = []
self.cbArgs_dict = {}
self.fcNames = []
self.fcArgs_dict =... | 35.428571 | 194 | 0.482132 |
b6b88c66919b4019262c05effd2b68794cdf4a24 | 4,283 | py | Python | miniimagenet_train.py | woreom/maml | 41db9b201a785fddc8d9ce145e87f3ffc60eaf83 | [
"MIT"
] | 1 | 2022-01-19T11:36:51.000Z | 2022-01-19T11:36:51.000Z | miniimagenet_train.py | woreom/maml | 41db9b201a785fddc8d9ce145e87f3ffc60eaf83 | [
"MIT"
] | null | null | null | miniimagenet_train.py | woreom/maml | 41db9b201a785fddc8d9ce145e87f3ffc60eaf83 | [
"MIT"
] | null | null | null | import torch, os
import numpy as np
from MiniImagenet import MiniImagenet
import scipy.stats
from torch.utils.data import DataLoader
from torch.optim import lr_scheduler
import random, sys, pickle
import argparse
from meta import Meta
def mean_confidence_interval(accs, confidence=0.95):
n = accs.sh... | 38.241071 | 118 | 0.586505 |
9e55ff1c918eb00ba1710948f8c05de2e4785271 | 362 | py | Python | examples/skein-project/skein_project/worker.py | Totoketchup/cluster-pack | 2454d69b03cace925d2938d1edde38e22a047a17 | [
"Apache-2.0"
] | 31 | 2019-11-27T17:38:54.000Z | 2021-12-13T13:44:47.000Z | examples/skein-project/skein_project/worker.py | Totoketchup/cluster-pack | 2454d69b03cace925d2938d1edde38e22a047a17 | [
"Apache-2.0"
] | 13 | 2020-01-16T13:36:14.000Z | 2021-12-02T07:47:11.000Z | examples/skein-project/skein_project/worker.py | Totoketchup/cluster-pack | 2454d69b03cace925d2938d1edde38e22a047a17 | [
"Apache-2.0"
] | 14 | 2019-11-28T10:06:45.000Z | 2022-02-21T10:59:07.000Z | import numpy as np
if __name__ == "__main__":
# compute intersection of 2 arrays on the worker
# numpy dependency and this code have been shipped by cluster-pack to the worker
a = np.random.random_integers(0, 100, 100)
b = np.random.random_integers(0, 100, 100)
print("Computed intersection of two ... | 32.909091 | 84 | 0.70442 |
312ccff3301709561e4b7baf74560ae91a7b9c25 | 22,764 | py | Python | var/spack/repos/builtin/packages/root/package.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/root/package.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/root/package.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import sys
class Root(CMakePackage):
"""ROOT is a data analysis framework."""
homepage = "... | 43.195446 | 113 | 0.565322 |
cda0d0e7ccb2bc699667021e41a2d299931c7556 | 5,920 | py | Python | docs/source/conf.py | MaxDauber/FiMDP | 95c61d6adb1a856fefdf1c50b9932815bdad9dde | [
"MIT"
] | null | null | null | docs/source/conf.py | MaxDauber/FiMDP | 95c61d6adb1a856fefdf1c50b9932815bdad9dde | [
"MIT"
] | null | null | null | docs/source/conf.py | MaxDauber/FiMDP | 95c61d6adb1a856fefdf1c50b9932815bdad9dde | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------------------------------------------------... | 30.994764 | 117 | 0.634797 |
99ac9e930cebbb4a97e2b1ca5190487a0d39359d | 4,247 | py | Python | tests/test_struct/test_transformations/test_collapse.py | djinnome/pybel | 6ffc1df662fef51f4d740daf6d7643010a9d5be8 | [
"MIT"
] | 103 | 2016-10-25T05:51:26.000Z | 2022-03-23T02:21:12.000Z | tests/test_struct/test_transformations/test_collapse.py | djinnome/pybel | 6ffc1df662fef51f4d740daf6d7643010a9d5be8 | [
"MIT"
] | 444 | 2016-10-22T13:09:10.000Z | 2022-03-21T12:01:39.000Z | tests/test_struct/test_transformations/test_collapse.py | djinnome/pybel | 6ffc1df662fef51f4d740daf6d7643010a9d5be8 | [
"MIT"
] | 38 | 2017-01-06T03:32:38.000Z | 2022-03-19T11:27:30.000Z | # -*- coding: utf-8 -*-
"""Tests for collapse functions."""
import unittest
from pybel import BELGraph
from pybel.constants import DIRECTLY_INCREASES
from pybel.dsl import gene, mirna, pathology, pmod, protein, rna
from pybel.struct.mutation.collapse import (
collapse_all_variants, collapse_nodes, collapse_to_ge... | 29.493056 | 97 | 0.640688 |
f50d75f0672cbc4a7764d34b2a7d1c008b774db7 | 1,699 | py | Python | acquire-valued-shoppers-challenge/vw2csv.py | Ravirajadrangi/projects6 | bc7dc98a01dabe4b64d7de7738521746b09426cd | [
"BSD-2-Clause"
] | 24 | 2015-12-16T14:44:05.000Z | 2021-04-03T12:11:47.000Z | acquire-valued-shoppers-challenge/vw2csv.py | Ravirajadrangi/projects6 | bc7dc98a01dabe4b64d7de7738521746b09426cd | [
"BSD-2-Clause"
] | null | null | null | acquire-valued-shoppers-challenge/vw2csv.py | Ravirajadrangi/projects6 | bc7dc98a01dabe4b64d7de7738521746b09426cd | [
"BSD-2-Clause"
] | 8 | 2017-03-31T17:36:03.000Z | 2020-01-11T15:59:13.000Z |
"""
'Convert train.vw and test.vw to csv format'
Two files are outputs of gen_vw_features.py by Triskelion.
See 'Feature engineering and beat the benchmark (~0.59347)'
http://www.kaggle.com/c/acquire-valued-shoppers-challenge/forums/t/7688/feature-engineering-and-beat-the-benchmark-0-59347
"""
import csv
v... | 32.056604 | 123 | 0.638022 |
1c34b127406f89dabe2bc19eed6d0ab68bc5c09a | 25,008 | py | Python | server/views_admin.py | sampsontan/virtual-clinic | 5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34 | [
"MIT"
] | 50 | 2019-02-04T12:33:49.000Z | 2022-03-14T04:56:20.000Z | server/views_admin.py | sampsontan/virtual-clinic | 5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34 | [
"MIT"
] | 6 | 2020-05-23T09:34:21.000Z | 2021-06-08T19:11:57.000Z | server/views_admin.py | sampsontan/virtual-clinic | 5d8cbb199fb7ff1658c8d1245d8756da7d4e2d34 | [
"MIT"
] | 27 | 2018-04-04T03:16:00.000Z | 2022-03-30T11:08:35.000Z | from csv import QUOTE_MINIMAL, writer
import re
import sqlite3
import sys
from django.core.management import call_command
from django.core import serializers
from django.shortcuts import render,redirect
from django.http import HttpResponseRedirect, HttpResponse
from django.db.utils import IntegrityError
from server.fo... | 40.996721 | 191 | 0.636356 |
4f2572c98c646c3633a8badd390a21f3023e079a | 1,970 | py | Python | src/inefficient_networks/utils.py | particle1331/ml-notebooks | d9cd094d44a0ee038a6ad3a2f9fafba8142c1e6d | [
"MIT"
] | 1 | 2022-01-05T19:28:09.000Z | 2022-01-05T19:28:09.000Z | src/inefficient_networks/utils.py | particle1331/ml-notebooks | d9cd094d44a0ee038a6ad3a2f9fafba8142c1e6d | [
"MIT"
] | null | null | null | src/inefficient_networks/utils.py | particle1331/ml-notebooks | d9cd094d44a0ee038a6ad3a2f9fafba8142c1e6d | [
"MIT"
] | null | null | null | import os
from inefficient_networks.config import config
def download_kaggle_dataset(dataset: str):
"""Here dataset is the portion of the URL https://www.kaggle.com/datasets/{dataset}."""
user, dataset = dataset.split("/")
data_path = config.DATASET_DIR / dataset
if data_path.exists():
pr... | 39.4 | 96 | 0.652792 |
23024bf95598a3f15f029ce2e56f11c9ab095884 | 1,179 | py | Python | rony/module_templates/gcp_cloud_function/functions/fn_write_file_gcs_bgq/main.py | kromodoro/rony | 61505fbda6bd49edf90b56ddd1f45d52eb7f1c1e | [
"Apache-2.0"
] | 55 | 2021-01-06T18:23:12.000Z | 2022-03-18T18:22:22.000Z | rony/module_templates/gcp_cloud_function/functions/fn_write_file_gcs_bgq/main.py | kromodoro/rony | 61505fbda6bd49edf90b56ddd1f45d52eb7f1c1e | [
"Apache-2.0"
] | 14 | 2021-01-15T20:01:58.000Z | 2021-09-03T00:22:23.000Z | rony/module_templates/gcp_cloud_function/functions/fn_write_file_gcs_bgq/main.py | kromodoro/rony | 61505fbda6bd49edf90b56ddd1f45d52eb7f1c1e | [
"Apache-2.0"
] | 18 | 2021-01-06T18:22:54.000Z | 2022-03-29T20:01:02.000Z | import os
from google.cloud import bigquery
dataset_name = os.getenv("dataset_name")
table_name = os.getenv("table_name")
def fn_write_file_gcs_bgq(event, context):
"""Background Cloud Function to be triggered by Cloud Storage.
Args:
event (dict): The dictionary with data specific to this type of ev... | 34.676471 | 117 | 0.649703 |
88c2bfd11f3df0bfa571c2bbe795707517c86a55 | 14 | py | Python | app/Http/Controllers/hello.py | 4nm1tsu/estimator | 327360533772cfaf384281c451c3d28e124c879f | [
"MIT"
] | 1 | 2019-12-03T09:59:26.000Z | 2019-12-03T09:59:26.000Z | app/Http/Controllers/hello.py | 4nm1tsu/estimator | 327360533772cfaf384281c451c3d28e124c879f | [
"MIT"
] | 3 | 2021-10-06T08:18:04.000Z | 2022-02-26T20:56:46.000Z | app/Http/Controllers/hello.py | 4nm1tsu/estimator | 327360533772cfaf384281c451c3d28e124c879f | [
"MIT"
] | null | null | null | print('7777')
| 7 | 13 | 0.642857 |
a88791107348b3a559e202cdfb96809a7822776d | 7,094 | py | Python | azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/application_gateway.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/mgmt/network/v2015_06_15/models/application_gateway.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure/mgmt/network/v2015_06_15/models/application_gateway.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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 ... | 53.742424 | 382 | 0.711446 |
2598c54f9a484951ee0ea3f1e1f81db04eae4de7 | 392 | py | Python | benchmarks/general/compass.py | tamasgal/km3db | 9faa2fc2cfd32a228f3700b9fec35206527aef42 | [
"MIT"
] | null | null | null | benchmarks/general/compass.py | tamasgal/km3db | 9faa2fc2cfd32a228f3700b9fec35206527aef42 | [
"MIT"
] | null | null | null | benchmarks/general/compass.py | tamasgal/km3db | 9faa2fc2cfd32a228f3700b9fec35206527aef42 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import km3db
assert '3.4.3.4/AHRS/1.551' == km3db.tools.clbupi2compassupi('3.4.3.2/V2-2-1/2.551')
assert '3.4.3.4/AHRS/1.76' == km3db.tools.clbupi2compassupi('3.4.3.2/V2-2-1/2.76')
assert '3.4.3.4/LSM303/3.1106' == km3db.tools.clbupi2compassupi('3.4.3.2/V2-2-1/3.1013')
assert '3.4.3.4/LS... | 35.636364 | 88 | 0.660714 |
496ea37e180229e880888e481efc1013c916a440 | 780 | py | Python | show_sample_entry.py | kanhaji/discord_feedbot | e92c4fc4d3fbae5a71addba1223a912b477c2a48 | [
"MIT"
] | 1 | 2022-01-15T03:30:51.000Z | 2022-01-15T03:30:51.000Z | show_sample_entry.py | kanhaji/discord_feedbot | e92c4fc4d3fbae5a71addba1223a912b477c2a48 | [
"MIT"
] | null | null | null | show_sample_entry.py | kanhaji/discord_feedbot | e92c4fc4d3fbae5a71addba1223a912b477c2a48 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2017 Eric Eisenhart
# This software is released under an MIT-style license.
# See LICENSE.md for full details.
import pprint
import sys
import feedparser
feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2')
# 0 is command itself:
if len(sys.argv) == 2:
feed_url = sys... | 32.5 | 91 | 0.696154 |
4750d3c5dd38d7ff77dff1da4243d3b9c5c2a38a | 424 | py | Python | scripts/logic/registerDevice.py | cofepy/gim | d3126d641c67d45e0fcf501e4ed312e60fadf634 | [
"MIT"
] | 1 | 2021-11-07T06:52:34.000Z | 2021-11-07T06:52:34.000Z | scripts/logic/registerDevice.py | cofepy/gim | d3126d641c67d45e0fcf501e4ed312e60fadf634 | [
"MIT"
] | null | null | null | scripts/logic/registerDevice.py | cofepy/gim | d3126d641c67d45e0fcf501e4ed312e60fadf634 | [
"MIT"
] | null | null | null | import wpath
from scripts.logic.base import *
def registerDevice():
req = pb.RegisterDeviceReq()
req.type = 1 #
req.brand = "iphone" # 厂商
req.model = "iphone 12" # 机型
req.system_version = "1.0.0" # 系统版本
req.sdk_version = "1.0.0" # sdk版本号
stub = get_stub()
meta_data = get_metadata... | 19.272727 | 40 | 0.617925 |
12efa1a8980411405236ae9526fa50674dc33af4 | 2,191 | py | Python | aim/logger.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | aim/logger.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | aim/logger.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | """ Aim logging configuration management """
import logging
import logging.config
import os
from aim.engine.configs import *
from aim.engine.aim_repo import AimRepo
class LoggerHandlerActivities(logging.FileHandler):
def __init__(self):
repo = AimRepo(os.getcwd())
log_path = os.path.join(repo.ge... | 31.3 | 86 | 0.516203 |
032e7789f1b1390b98455860fc1a866678620229 | 2,032 | py | Python | paper_result/PoolNet/bicon/train/train.py | Zyun-Y/BiconNets | f5ea85dc58550969b99a2ccccccd8133dda4358c | [
"MIT"
] | 9 | 2021-03-02T05:16:03.000Z | 2022-02-01T07:47:00.000Z | paper_result/PoolNet/bicon/train/train.py | Zyun-Y/BiconNets | f5ea85dc58550969b99a2ccccccd8133dda4358c | [
"MIT"
] | null | null | null | paper_result/PoolNet/bicon/train/train.py | Zyun-Y/BiconNets | f5ea85dc58550969b99a2ccccccd8133dda4358c | [
"MIT"
] | 2 | 2021-08-10T07:30:01.000Z | 2021-11-22T03:01:50.000Z | import numpy as np
import matplotlib.pyplot as plt
import torch
from torch.autograd import Variable
import glob
from torchvision import datasets, transforms
from skimage.io import imread, imsave
from solver import Solver
import torch.nn.functional as F
import torch.nn as nn
from network.poolnet import PoolNet, build_... | 25.4 | 139 | 0.662894 |
b82188de657432a66238f83a05453992836d61d5 | 395 | py | Python | wifi_mixtures.py | paulstey/wifi_data | 9a40ebb37ad032671231c35a7905e7a1f5327000 | [
"MIT"
] | null | null | null | wifi_mixtures.py | paulstey/wifi_data | 9a40ebb37ad032671231c35a7905e7a1f5327000 | [
"MIT"
] | null | null | null | wifi_mixtures.py | paulstey/wifi_data | 9a40ebb37ad032671231c35a7905e7a1f5327000 | [
"MIT"
] | null | null | null |
import networkx as nx
import numpy as np
import seaborn as sns
from time import time
g = nx.read_graphml('handoff_graph.graphml')
def get_weight_vector(g):
n = len(g.edges())
out = np.zeros(n, int)
i = 0
for edge in g.edges_iter(data = 'weight'):
out[i] = edge[2]['weight']
i += 1
... | 17.954545 | 46 | 0.63038 |
70ef9cd041a8e346fa977e0798e5fbe733bb7533 | 139,628 | py | Python | electrum_spero/wallet.py | DigitalCoin1/electrum-sperocoin | 76fae3f6ec157ab157b61f0fea4e9a38cea8665f | [
"MIT"
] | null | null | null | electrum_spero/wallet.py | DigitalCoin1/electrum-sperocoin | 76fae3f6ec157ab157b61f0fea4e9a38cea8665f | [
"MIT"
] | null | null | null | electrum_spero/wallet.py | DigitalCoin1/electrum-sperocoin | 76fae3f6ec157ab157b61f0fea4e9a38cea8665f | [
"MIT"
] | null | null | null | # Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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 t... | 41.692446 | 150 | 0.613466 |
d0628e3f28d26789eb5f0d4d693bdcb468c0d00b | 382 | py | Python | pur/__about__.py | kmu/pip-update-requirements | 24e906a4eec7934873051ef9214921bc7f9addc4 | [
"BSD-2-Clause"
] | null | null | null | pur/__about__.py | kmu/pip-update-requirements | 24e906a4eec7934873051ef9214921bc7f9addc4 | [
"BSD-2-Clause"
] | null | null | null | pur/__about__.py | kmu/pip-update-requirements | 24e906a4eec7934873051ef9214921bc7f9addc4 | [
"BSD-2-Clause"
] | null | null | null | __title__ = 'pur'
__description__ = 'Update packages in a requirements.txt file to latest versions.'
__url__ = 'https://github.com/alanhamlett/pip-update-requirements'
__version_info__ = ('5', '3', '0')
__version__ = '.'.join(__version_info__)
__author__ = 'Alan Hamlett'
__author_email__ = 'alan.hamlett@gmail.com'
__li... | 38.2 | 82 | 0.756545 |
363d7cbf455ada5fd61229230889cfa85ae81850 | 433 | py | Python | backend/api/migrations/0016_auto_20201030_1500.py | INSRapperswil/nornir-web | 458e6b24bc373197044b4b7b5da74f16f93a9459 | [
"MIT"
] | 2 | 2021-06-01T08:33:04.000Z | 2021-08-20T04:22:39.000Z | backend/api/migrations/0016_auto_20201030_1500.py | INSRapperswil/nornir-web | 458e6b24bc373197044b4b7b5da74f16f93a9459 | [
"MIT"
] | null | null | null | backend/api/migrations/0016_auto_20201030_1500.py | INSRapperswil/nornir-web | 458e6b24bc373197044b4b7b5da74f16f93a9459 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-30 14:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0015_jobtemplate_variables'),
]
operations = [
migrations.AlterField(
model_name='jobtemplate',
... | 22.789474 | 73 | 0.586605 |
2e658346825e5f028ced040ce7c16e0492c1b292 | 2,646 | py | Python | flaxlight/rpc/farmer_rpc_client.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | 1 | 2021-12-02T14:38:11.000Z | 2021-12-02T14:38:11.000Z | flaxlight/rpc/farmer_rpc_client.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | null | null | null | flaxlight/rpc/farmer_rpc_client.py | Flax-Network/flax-light-wallet | 1745850a28a47bbbc4b5f3d460f35b34b4ed4f25 | [
"Apache-2.0"
] | 6 | 2021-11-21T00:38:27.000Z | 2021-12-03T01:25:19.000Z | from typing import Dict, List, Optional, Any
from flaxlight.rpc.rpc_client import RpcClient
from flaxlight.types.blockchain_format.sized_bytes import bytes32
class FarmerRpcClient(RpcClient):
"""
Client to Flax RPC, connects to a local farmer. Uses HTTP/JSON, and converts back from
JSON into native pytho... | 44.1 | 119 | 0.681028 |
1635686904685ad34a640e79acd44c6c75a9e9ab | 8,387 | py | Python | test/test_faiss_and_milvus.py | damiangross/haystack | 3de9becfc64764ed22707e399e7f1b0dfe32c0a7 | [
"Apache-2.0"
] | 1 | 2021-02-08T14:28:02.000Z | 2021-02-08T14:28:02.000Z | test/test_faiss_and_milvus.py | damiangross/haystack | 3de9becfc64764ed22707e399e7f1b0dfe32c0a7 | [
"Apache-2.0"
] | null | null | null | test/test_faiss_and_milvus.py | damiangross/haystack | 3de9becfc64764ed22707e399e7f1b0dfe32c0a7 | [
"Apache-2.0"
] | null | null | null | import os
from copy import deepcopy
import faiss
import numpy as np
import pytest
from haystack import Document
from haystack import Finder
from haystack.document_store.faiss import FAISSDocumentStore
from haystack.pipeline import Pipeline
from haystack.retriever.dense import EmbeddingRetriever
DOCUMENTS = [
{"na... | 41.519802 | 109 | 0.732085 |
33b72b5a79e0e25443f5deffa50139a7872ed016 | 1,632 | py | Python | ProgrammingAssignments/programming-assignment-2/LinearTopo.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | ProgrammingAssignments/programming-assignment-2/LinearTopo.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | ProgrammingAssignments/programming-assignment-2/LinearTopo.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | #!/usr/bin/python
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.util import irange,dumpNodeConnections
from mininet.log import setLogLevel
class LinearTopo(Topo):
"Linear topology of k s... | 29.142857 | 101 | 0.650123 |
2278762cd91dca2168cac598a7cc3bfff58db946 | 280 | py | Python | tase/telegram/handlers/base/__init__.py | soran-ghaderi/Chromusic_search_engine | e811401fee39ff4cb184750fcbde55053c69453d | [
"Apache-2.0"
] | 4 | 2022-02-21T06:56:16.000Z | 2022-03-07T21:10:19.000Z | tase/telegram/handlers/base/__init__.py | soran-ghaderi/Chromusic_search_engine | e811401fee39ff4cb184750fcbde55053c69453d | [
"Apache-2.0"
] | null | null | null | tase/telegram/handlers/base/__init__.py | soran-ghaderi/Chromusic_search_engine | e811401fee39ff4cb184750fcbde55053c69453d | [
"Apache-2.0"
] | 1 | 2022-03-07T21:10:02.000Z | 2022-03-07T21:10:02.000Z | from .base_handler import BaseHandler, exception_handler
from .client_disconnect_handler import ClientDisconnectHandler
from .handler_metadata import HandlerMetadata
__all__ = [
'BaseHandler',
'exception_handler',
'ClientDisconnectHandler',
'HandlerMetadata',
]
| 23.333333 | 62 | 0.792857 |
fadd1c352167b69fbe0eba833e7f5aa6f909f97d | 923 | py | Python | taxi/commands/types.py | simonbru/taxi | 3940f520b6d61b5ac7c851c38dfd05da2f65b647 | [
"WTFPL"
] | null | null | null | taxi/commands/types.py | simonbru/taxi | 3940f520b6d61b5ac7c851c38dfd05da2f65b647 | [
"WTFPL"
] | null | null | null | taxi/commands/types.py | simonbru/taxi | 3940f520b6d61b5ac7c851c38dfd05da2f65b647 | [
"WTFPL"
] | null | null | null | from __future__ import unicode_literals
import os
import click
from ..utils.date import time_ago_to_date
class ExpandedPath(click.Path):
def convert(self, value, *args, **kwargs):
value = os.path.expanduser(value)
return super(ExpandedPath, self).convert(value, *args, **kwargs)
class Date(cli... | 24.289474 | 119 | 0.63597 |
66c69517688a7d2a1a68ae0c7cda30a7a4c49f5d | 1,712 | py | Python | hypernets/tabular/cfg.py | wyq-1997/Hypernets | 4c5a843c693fce2ccfab54e015090828ffbb6498 | [
"Apache-2.0"
] | null | null | null | hypernets/tabular/cfg.py | wyq-1997/Hypernets | 4c5a843c693fce2ccfab54e015090828ffbb6498 | [
"Apache-2.0"
] | null | null | null | hypernets/tabular/cfg.py | wyq-1997/Hypernets | 4c5a843c693fce2ccfab54e015090828ffbb6498 | [
"Apache-2.0"
] | null | null | null | from hypernets.conf import configure, Configurable, Int, String, Bool, Float, Enum
@configure()
class TabularCfg(Configurable):
joblib_njobs = \
Int(-1, allow_none=True,
help='"n_jobs" setting for joblib task.'
).tag(config=True)
multi_collinearity_sample_limit = \
Int... | 24.811594 | 95 | 0.514603 |
38c877198436ec35a77ec38d029ad09c4c9bc71b | 26,035 | py | Python | exp/universal/pascal_atr_cihp_uni.py | sultansidhu/Graphonomy | 6ca8ddf89c4b42a5c9869fe890df9fc807e1d4ce | [
"MIT"
] | null | null | null | exp/universal/pascal_atr_cihp_uni.py | sultansidhu/Graphonomy | 6ca8ddf89c4b42a5c9869fe890df9fc807e1d4ce | [
"MIT"
] | null | null | null | exp/universal/pascal_atr_cihp_uni.py | sultansidhu/Graphonomy | 6ca8ddf89c4b42a5c9869fe890df9fc807e1d4ce | [
"MIT"
] | 1 | 2020-12-07T18:44:25.000Z | 2020-12-07T18:44:25.000Z | import socket
import timeit
from datetime import datetime
import os
import sys
import glob
import numpy as np
from collections import OrderedDict
sys.path.append("./")
sys.path.append("./networks/")
# PyTorch includes
import torch
from torch.autograd import Variable
import torch.optim as optim
from torchvision import ... | 39.387292 | 113 | 0.537277 |
3788d0fc5ffc2daa2f37ee236feca62970ba240b | 883 | py | Python | fraud_poc/submit_training_pipeline.py | leosmerling-hopeit/fraud-poc | cd4448d0a957e5fd5ebfadda46b8100db30aca90 | [
"Apache-2.0"
] | 2 | 2020-08-03T13:14:07.000Z | 2021-05-20T19:43:09.000Z | fraud_poc/submit_training_pipeline.py | leosmerling-hopeit/fraud-poc | cd4448d0a957e5fd5ebfadda46b8100db30aca90 | [
"Apache-2.0"
] | 1 | 2022-02-26T09:12:35.000Z | 2022-02-26T09:12:35.000Z | fraud_poc/submit_training_pipeline.py | leosmerling-hopeit/fraud-poc | cd4448d0a957e5fd5ebfadda46b8100db30aca90 | [
"Apache-2.0"
] | 3 | 2020-12-18T13:24:22.000Z | 2021-05-20T19:43:10.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: 06_submit-training-pipeline.ipynb (unless otherwise specified).
__all__ = ['__steps__', '__api__', 'logger', 'submit']
# Cell
import dask.dataframe as dd
from hopeit.app.context import EventContext
from hopeit.app.events import Spawn, SHUFFLE
from hopeit.app.api import eve... | 25.228571 | 107 | 0.715742 |
77a62aad6d03c3207616185ae8742b3b7f6bea14 | 3,928 | py | Python | search/model_search_cityscapes.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 65 | 2019-09-03T06:12:56.000Z | 2021-09-07T11:52:29.000Z | search/model_search_cityscapes.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 9 | 2019-09-05T02:28:31.000Z | 2020-09-18T10:39:03.000Z | search/model_search_cityscapes.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 10 | 2019-10-01T21:42:29.000Z | 2021-01-11T18:30:32.000Z | import torch
import torch.nn.functional as F
from torch import nn
from torch.nn import CrossEntropyLoss
from arch.model_cityscapes import SqueezeNASNetCityscapesHyperparameters, ASPP_Lite, ASPP, Conv_BN_ReLU
from search.arch_search import SuperNetwork
from search.model_search import SuperNetworkSqueezeNASNet
class S... | 43.644444 | 119 | 0.667006 |
412836eb093830aa4bbde77baf2b16f45fc5b33c | 32,597 | py | Python | tools/make_distrib.py | I-Cat/chromiumembedded | c5614fcfd2e91016c9966eee695ebf01dda41986 | [
"BSD-3-Clause"
] | 97 | 2015-05-03T20:16:08.000Z | 2021-11-16T13:16:25.000Z | tools/make_distrib.py | I-Cat/chromiumembedded | c5614fcfd2e91016c9966eee695ebf01dda41986 | [
"BSD-3-Clause"
] | 3 | 2020-10-16T03:15:20.000Z | 2020-10-26T15:31:01.000Z | tools/make_distrib.py | I-Cat/chromiumembedded | c5614fcfd2e91016c9966eee695ebf01dda41986 | [
"BSD-3-Clause"
] | 29 | 2015-03-28T02:20:33.000Z | 2021-10-29T20:58:28.000Z | # Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
from date_util import *
from file_util import *
from gclient_util import *
from optparse import OptionParser
import os
import re
impor... | 40.045455 | 117 | 0.680185 |
74a9f4e6342fdedec52afd567144159d2a47f02b | 13,357 | py | Python | pyleecan/GUI/Dialog/DMatLib/MatLib.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | 2 | 2019-06-08T15:04:39.000Z | 2020-09-07T13:32:22.000Z | pyleecan/GUI/Dialog/DMatLib/MatLib.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMatLib/MatLib.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | from os import remove
from os.path import join
from ....Classes.Material import Material
from ....Functions.load import load_matlib
from ....Functions.Material.compare_material import compare_material
from ....Functions.Material.replace_material_pyleecan_obj import (
replace_material_pyleecan_obj,
)
from ....defin... | 32.498783 | 97 | 0.523171 |
9c31b31989ba3d50c77549a0f0d22822a2e9bbcc | 544 | py | Python | ois_api_client/v3_0/deserialization/deserialize_line_vat_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | 7 | 2020-10-22T08:15:29.000Z | 2022-01-27T07:59:39.000Z | ois_api_client/v3_0/deserialization/deserialize_line_vat_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | ois_api_client/v3_0/deserialization/deserialize_line_vat_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | from typing import Optional
import xml.etree.ElementTree as ET
from ...xml.XmlReader import XmlReader as XR
from ..namespaces import BASE
from ..namespaces import DATA
from ..dto.LineVatData import LineVatData
def deserialize_line_vat_data(element: ET.Element) -> Optional[LineVatData]:
if element is None:
... | 28.631579 | 82 | 0.748162 |
7249ac229b804c4f1e2c6e17a7fd74fa41f2750b | 1,601 | py | Python | aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/DeleteStackRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/DeleteStackRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/DeleteStackRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.232558 | 74 | 0.772642 |
c8ff0101db663194bd79ec92d705adc2bd92087b | 10,786 | py | Python | rllib/tests/test_io.py | eisber/ray | 94a286ef1d8ad5a3093b7f996a811727fa0e2d3e | [
"Apache-2.0"
] | 4 | 2019-10-18T17:44:58.000Z | 2021-04-14T14:37:21.000Z | rllib/tests/test_io.py | Eric2Hamel/ray | bfaee49880611a65d16a4561c94c60851573b6f2 | [
"Apache-2.0"
] | 1 | 2022-03-30T17:52:44.000Z | 2022-03-30T17:52:44.000Z | rllib/tests/test_io.py | Eric2Hamel/ray | bfaee49880611a65d16a4561c94c60851573b6f2 | [
"Apache-2.0"
] | 1 | 2020-06-26T07:54:25.000Z | 2020-06-26T07:54:25.000Z | import glob
import gym
import json
import numpy as np
import os
import random
import shutil
import tempfile
import time
import unittest
import ray
from ray.rllib.agents.pg import PGTrainer
from ray.rllib.agents.pg.pg_tf_policy import PGTFPolicy
from ray.rllib.evaluation import SampleBatch
from ray.rllib.offline import... | 33.496894 | 79 | 0.539125 |
17747c5cf6020ffb2343bbec190c3686892effaf | 2,376 | py | Python | implicit_solver/host_app/rpc/server.py | vincentbonnetcg/Numerical-Bric-a-Brac | e71f2305d7452de985e5e9fa8935da611b6d9992 | [
"MIT"
] | 14 | 2019-05-04T00:42:47.000Z | 2021-09-07T09:57:44.000Z | implicit_solver/host_app/rpc/server.py | vincentbonnetcg/Numerical-Bric-a-Brac | e71f2305d7452de985e5e9fa8935da611b6d9992 | [
"MIT"
] | null | null | null | implicit_solver/host_app/rpc/server.py | vincentbonnetcg/Numerical-Bric-a-Brac | e71f2305d7452de985e5e9fa8935da611b6d9992 | [
"MIT"
] | 5 | 2020-12-07T21:44:41.000Z | 2021-09-13T05:29:54.000Z | """
@author: Vincent Bonnet
@description : Run Server to be executed on another process
"""
'''
Development under Spyder IDE
The sys.path is not set at the project level but where the file is execute
Append the parent of the parent folder to be able to import modules
'''
import os
import sys
parentdir = os.path.dir... | 27.627907 | 100 | 0.670875 |
cf35273e18a10494a93ae046d8e42415734b765d | 456 | py | Python | data/scripts/templates/object/draft_schematic/vehicle/civilian/shared_civilian_e.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/vehicle/civilian/shared_civilian_e.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/vehicle/civilian/shared_civilian_e.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/vehicle/civilian/shared_civilian_e.iff"
result.attribute_t... | 26.823529 | 82 | 0.730263 |
5293c41502e0d1e6ed1c61c906ee3b894ddda437 | 10,767 | py | Python | scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 4 | 2020-11-04T02:18:03.000Z | 2021-08-18T08:14:41.000Z | scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 1 | 2022-03-31T01:47:08.000Z | 2022-03-31T01:47:08.000Z | scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 4 | 2021-04-08T09:08:09.000Z | 2022-03-12T10:59:46.000Z | # Remote Control - As The Remote Device
#
# This script configures your OpenMV Cam as a co-processor that can be remotely controlled by
# another microcontroller or computer such as an Arduino, ESP8266/ESP32, RaspberryPi, and
# even another OpenMV Cam.
#
# This script is designed to pair with "popular_features_as_the_c... | 39.877778 | 102 | 0.6897 |
0eea61cc15ac1d1958aafb2c63c5da0fbfd87863 | 23 | py | Python | packagename/__init__.py | stscicrawford/stsci-package-template | 370acf111bf41e5806c01524e84f3bd6f98feb02 | [
"BSD-3-Clause"
] | 39 | 2021-07-29T05:59:20.000Z | 2022-03-25T06:32:51.000Z | packagename/__init__.py | stscicrawford/stsci-package-template | 370acf111bf41e5806c01524e84f3bd6f98feb02 | [
"BSD-3-Clause"
] | 27 | 2021-08-04T03:37:03.000Z | 2022-03-08T06:18:25.000Z | packagename/__init__.py | stscicrawford/stsci-package-template | 370acf111bf41e5806c01524e84f3bd6f98feb02 | [
"BSD-3-Clause"
] | 5 | 2021-08-24T14:21:06.000Z | 2022-02-21T04:31:01.000Z | from .version import *
| 11.5 | 22 | 0.73913 |
5333373aad79fd63cbf362c8d1c0e12d58f04d69 | 1,678 | py | Python | peek_agent/plugin/AgentPluginLoader.py | Synerty/peek-agent | 12ebeaa2e8017760d926e3d41dbd6112f8fdf142 | [
"MIT"
] | null | null | null | peek_agent/plugin/AgentPluginLoader.py | Synerty/peek-agent | 12ebeaa2e8017760d926e3d41dbd6112f8fdf142 | [
"MIT"
] | null | null | null | peek_agent/plugin/AgentPluginLoader.py | Synerty/peek-agent | 12ebeaa2e8017760d926e3d41dbd6112f8fdf142 | [
"MIT"
] | 1 | 2016-12-12T21:44:39.000Z | 2016-12-12T21:44:39.000Z | import logging
from typing import Type, Tuple, List
from twisted.internet.defer import inlineCallbacks
from peek_agent.plugin.PeekAgentPlatformHook import PeekAgentPlatformHook
from peek_platform.plugin.PluginLoaderABC import PluginLoaderABC
from peek_plugin_base.PluginCommonEntryHookABC import PluginCommonEntryHookA... | 33.56 | 92 | 0.690107 |
dfa445c766b4c78db99edd99fa32e931068dce98 | 1,907 | py | Python | RFEM/TypesForLines/lineHinge.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 16 | 2021-10-13T21:00:11.000Z | 2022-03-21T11:12:09.000Z | RFEM/TypesForLines/lineHinge.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 49 | 2021-10-19T13:18:51.000Z | 2022-03-30T08:20:17.000Z | RFEM/TypesForLines/lineHinge.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 7 | 2021-10-13T06:06:24.000Z | 2022-03-29T17:48:39.000Z | from RFEM.initModel import Model, clearAtributes
from RFEM.dataTypes import inf
class LineHinge():
# Slab Wall Connection definition
slabWallConnection = {'slab_wall_connection': True,
'slab_wall_with_slab_edge_block': True,
'slab_wall_connection_offset': 0.1... | 34.672727 | 82 | 0.626639 |
aaf2f14820d2c99f885139099b71e8a39cc93e8a | 20,160 | py | Python | demo/webcam_demo.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | demo/webcam_demo.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | demo/webcam_demo.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | import argparse
import time
from collections import deque
from queue import Queue
from threading import Event, Lock, Thread
import cv2
import numpy as np
from mmpose.apis import (get_track_id, inference_top_down_pose_model,
init_pose_model, vis_pose_result)
from mmpose.core import apply_bugey... | 35.492958 | 79 | 0.569593 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.