hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a44edeb2ddffaa13dc2a003dc75998ea763f537 | 3,724 | py | Python | Plugins/AbsForce/AbsForce.py | AndersElmholdt/AFETools | b9a1268e67ac998754aee7d93a932284abbc08ed | [
"MIT"
] | 1 | 2018-11-10T21:13:27.000Z | 2018-11-10T21:13:27.000Z | Plugins/AbsForce/AbsForce.py | AndersElmholdt/AFETools | b9a1268e67ac998754aee7d93a932284abbc08ed | [
"MIT"
] | null | null | null | Plugins/AbsForce/AbsForce.py | AndersElmholdt/AFETools | b9a1268e67ac998754aee7d93a932284abbc08ed | [
"MIT"
] | 1 | 2018-04-17T09:57:45.000Z | 2018-04-17T09:57:45.000Z | import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
kPluginNodeName = "absForce"
kPluginNodeId = OpenMaya.MTypeId(0x0012b812)
class absForce(OpenMayaMPx.MPxNode):
inputArray = OpenMaya.MObject()
outputArray = OpenMaya.MObject()
computeX = OpenMaya.MObject()
computeY = OpenMaya.MObjec... | 35.466667 | 89 | 0.745704 |
1a44f41e125353ed0d59206befd26958ee743884 | 2,209 | py | Python | Day 62 - Coffee and Wifi/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 2 | 2021-12-07T00:39:57.000Z | 2021-12-07T01:44:21.000Z | Day 62 - Coffee and Wifi/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | null | null | null | Day 62 - Coffee and Wifi/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 1 | 2021-09-12T14:02:27.000Z | 2021-09-12T14:02:27.000Z | from flask import Flask, render_template, redirect, url_for
from flask_bootstrap import Bootstrap
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import DataRequired, URL
import csv
app = Flask(__name__)
app.config['SECRET_KEY'] = '8BYkEfBA6O6donzWlSihB... | 38.754386 | 138 | 0.611136 |
1a45209ac34bd8faa6eb53adfb44f85e261cb243 | 21,553 | py | Python | examples/agents/simple_controllers.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | examples/agents/simple_controllers.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | examples/agents/simple_controllers.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | from gym.spaces import Discrete, Box
from gym_electric_motor.physical_systems.electric_motors import DcShuntMotor, DcExternallyExcitedMotor, \
DcPermanentlyExcitedMotor, DcSeriesMotor
from gym_electric_motor.physical_systems import SynchronousMotorSystem
import math
import numpy as np
class Controller:
@clas... | 42.510848 | 115 | 0.641488 |
1a454614c4907c9500ebd1f7d4e08903c14a154b | 18,864 | py | Python | salt/utils/http.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/utils/http.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/utils/http.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Utils for making various web calls. Primarily designed for REST, SOAP, webhooks
and the like, but also useful for basic HTTP testing.
.. versionaddedd:: 2015.2
'''
from __future__ import absolute_import
# Import python libs
import pprint
import os.path
import json
import logging
# pylint: ... | 32.806957 | 110 | 0.564143 |
1a4550b576eecc60d1bc693d04815df9f0731a4d | 31,900 | py | Python | database/TESTS.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | database/TESTS.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | database/TESTS.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | from database.models import *
from database.queries import hasKVPair
from IPython import embed
import numpy as np
from database.imports import printD,ploc,datetime,timedelta,_tdb,FlushError,IntegrityError
#_tdb.tdbOff()
#FIXME TODO, make all these things use queries instead of generating you nub
#and failover to cr... | 40.226986 | 271 | 0.600282 |
1a45764066f09ca86fbd1aa27513c31fb2f9e45b | 11,087 | py | Python | usaspending_api/broker/management/commands/fix_file_b_c_mappings.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/broker/management/commands/fix_file_b_c_mappings.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | 3 | 2020-02-12T01:16:46.000Z | 2021-06-10T20:36:57.000Z | usaspending_api/broker/management/commands/fix_file_b_c_mappings.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | import logging
from django.core.management.base import BaseCommand
from django.db import connection, connections
from django.conf import settings
from usaspending.common.helpers import timer
logger = logging.getLogger('console')
# Website columns need for update from financial_accounts_by_program_activity_object_cl... | 46.978814 | 120 | 0.664742 |
1a45b8dd5b619b740809b86a3bb04f66c028143a | 1,556 | py | Python | python/ctci/4_trees_and_graphs/3_lists_of_levels.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/ctci/4_trees_and_graphs/3_lists_of_levels.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/ctci/4_trees_and_graphs/3_lists_of_levels.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | from tree_common import TreeNode, insert, inOrderTraversal
from typing import List
from ...fundamentals.linked_lists.single_list import Node as LinkedNode
"""
Use Created linked lists from a tree
"""
def tree_to_linked_lists(root:TreeNode) -> List[LinkedNode]:
result = [LinkedNode]
level_to_linked_list(root, re... | 24.3125 | 76 | 0.697301 |
1a45bd32c61d61d757f4b9c04846b5c58220752f | 13,212 | py | Python | torchlib/deep_rl/algorithm/model_based/utils.py | vermouth1992/mbrl_hvac | 2402b1bfa36dff74df669bd1bd1956eb8c346923 | [
"MIT"
] | 2 | 2020-12-22T10:02:59.000Z | 2020-12-22T19:57:55.000Z | torchlib/deep_rl/algorithm/model_based/utils.py | Sayani21/mbrl-hvac | eb0e2213cc2734b1a8f83e485180cc622ffced5d | [
"MIT"
] | 1 | 2022-03-12T00:52:44.000Z | 2022-03-12T00:52:44.000Z | torchlib/deep_rl/algorithm/model_based/utils.py | Sayani21/mbrl-hvac | eb0e2213cc2734b1a8f83e485180cc622ffced5d | [
"MIT"
] | 1 | 2021-07-19T15:40:26.000Z | 2021-07-19T15:40:26.000Z | from collections import OrderedDict, deque, namedtuple
import numpy as np
from sklearn.model_selection import train_test_split
from torchlib.dataset.utils import create_data_loader
from torchlib.deep_rl import BaseAgent
class Dataset(object):
def __init__(self):
self._states = []
self._actions =... | 31.990315 | 107 | 0.596427 |
1a45fa474f344703b56ff5e7cefcd26aff98d8af | 38 | py | Python | tests/assets/scannersuccess/scannersuccess/in/hyphenated-name.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 63 | 2018-06-21T10:39:54.000Z | 2021-06-04T14:28:44.000Z | tests/assets/scannersuccess/scannersuccess/in/hyphenated-name.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 86 | 2018-06-20T13:30:30.000Z | 2019-06-04T12:47:28.000Z | tests/assets/scannersuccess/scannersuccess/in/hyphenated-name.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 4 | 2018-08-14T08:49:55.000Z | 2019-02-16T09:24:47.000Z | # Hyphens are not valid module names.
| 19 | 37 | 0.763158 |
1a4601d002d77ea98d7b85819035488e48f9f492 | 3,617 | py | Python | igraph/test/conversion.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | 2 | 2017-03-07T04:01:59.000Z | 2017-05-02T17:19:29.000Z | igraph/test/conversion.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | igraph/test/conversion.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | import unittest
from igraph import *
class DirectedUndirectedTests(unittest.TestCase):
def testToUndirected(self):
graph = Graph([(0,1), (0,2), (1,0)], directed=True)
graph2 = graph.copy()
graph2.to_undirected(mode=False)
self.assertTrue(graph2.vcount() == graph.vcount())
s... | 35.116505 | 91 | 0.505944 |
1a460f400222d2d362236cd7c6e888ac26a6d472 | 10,127 | py | Python | pdf2xlsx/gui.py | etibger/pdf2rawtxt | 432b4ab31c7512cbeeddc1d4ebd8c54bf42ff772 | [
"MIT"
] | null | null | null | pdf2xlsx/gui.py | etibger/pdf2rawtxt | 432b4ab31c7512cbeeddc1d4ebd8c54bf42ff772 | [
"MIT"
] | null | null | null | pdf2xlsx/gui.py | etibger/pdf2rawtxt | 432b4ab31c7512cbeeddc1d4ebd8c54bf42ff772 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Not so simple tkinter based gui around the pdf2xlsx.do_it function.
"""
from tkinter import Tk, ttk, filedialog, messagebox, StringVar, Toplevel, END
import os
import shutil
from .managment import do_it, do_it2
from .config import config
__version__ = '0.2.0'
class ConfOption:
"""
... | 39.713725 | 106 | 0.597808 |
1a462a847f3c03da5191a09b916d1fce70184379 | 22,095 | py | Python | progs/ballast.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | progs/ballast.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | 2 | 2021-06-07T12:51:35.000Z | 2021-07-14T17:14:24.000Z | progs/ballast.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | """
BALLAST: Builder Assistant to Lay out, Label and Arrange Spectra
Together
This is a simple program to combine and display spectra together.
"""
import sys
import os
import re
import argparse
import typing as tp
import configparser as cfg
from math import *
import numpy as np
i... | 35.352 | 79 | 0.487531 |
1a4643c36eb21b4a166f3700e3bc20cfb50546ac | 1,030 | py | Python | proj1_2/meam620-2020/proj1_2/util/generate_test_maps.py | yuchensun97/MEAM620-Advanced-Robotics | 9b2ed4bc4b6d295830fd00b6e155fe58939208c4 | [
"MIT"
] | 3 | 2020-06-06T03:11:09.000Z | 2022-03-14T18:11:21.000Z | proj1_2/meam620-2020/proj1_2/util/generate_test_maps.py | yuchensun97/Quadrotor | 9b2ed4bc4b6d295830fd00b6e155fe58939208c4 | [
"MIT"
] | null | null | null | proj1_2/meam620-2020/proj1_2/util/generate_test_maps.py | yuchensun97/Quadrotor | 9b2ed4bc4b6d295830fd00b6e155fe58939208c4 | [
"MIT"
] | 1 | 2021-06-18T02:36:15.000Z | 2021-06-18T02:36:15.000Z | """
Simple test maps should created by directly editing the .json text file,
following any of the existing examples.
This script directly generates some test scenario files and saves them as .json
files. It works, but this is probably not what you want to do.
"""
from flightsim.world import World
from proj1_2.code_so... | 35.517241 | 100 | 0.674757 |
1a4651b17f251baab59e94279ba626adc42775b5 | 507 | py | Python | profiles.py | DhawalKhapre/Rap-God | cdec0fdaabe27eabf165fad12112ea715b1de34b | [
"Apache-2.0"
] | null | null | null | profiles.py | DhawalKhapre/Rap-God | cdec0fdaabe27eabf165fad12112ea715b1de34b | [
"Apache-2.0"
] | null | null | null | profiles.py | DhawalKhapre/Rap-God | cdec0fdaabe27eabf165fad12112ea715b1de34b | [
"Apache-2.0"
] | null | null | null | beat2 = {
"title": 9800,
"adlib": [
1250,
3156,
6713,
29314,
44200,
16636,
23280,
52813,
60916,
68239,
75600,
86197,
],
"couplet": [
((14777, 21544), (22037, 29198)),
((29800, 36306), (36400, ... | 19.5 | 42 | 0.402367 |
1a465b85985e41ca110f9da188c1b76f2b43bc88 | 1,788 | py | Python | modulo 4/ex26_copia.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | modulo 4/ex26_copia.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | modulo 4/ex26_copia.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | print("How old are you?", end=' ')
age = input()
print('How tall are you?', end=' ')
height= input()
print(f"So, you're {age} old, and {height} tall.")
print('Let\'s practice everything.')
print('You\'d need to know about escapes'+
'with \\ that do \n newlines and \t tabs.')
poem = """
\tThe lovely world
wit... | 21.285714 | 76 | 0.658837 |
1a46a6cab818e7df2e213db7c70362b0847381a3 | 3,137 | py | Python | M5Forecasting/src/utility_functions.py | AidanCooper/Kaggle | 01dff47392806778b1c78124b279f7dfb9709cc0 | [
"MIT"
] | null | null | null | M5Forecasting/src/utility_functions.py | AidanCooper/Kaggle | 01dff47392806778b1c78124b279f7dfb9709cc0 | [
"MIT"
] | 1 | 2020-03-31T11:54:20.000Z | 2020-03-31T11:54:20.000Z | M5Forecasting/src/utility_functions.py | AidanCooper/Kaggle | 01dff47392806778b1c78124b279f7dfb9709cc0 | [
"MIT"
] | 1 | 2022-02-21T07:34:18.000Z | 2022-02-21T07:34:18.000Z | import IPython
import numpy as np
import pandas as pd
def display(*dfs, head: bool = True):
"""Display the dataframes in _dfs_"""
for df in dfs:
IPython.display.display(df.head() if head else df)
def reduce_mem_usage(df: pd.DataFrame, verbose: bool = False) -> pd.DataFrame:
"""Efficiently manage... | 40.74026 | 88 | 0.497609 |
1a46d0a115b32d7ff6c6db2d71f59e05c37b173c | 2,388 | py | Python | telraam_data/tests/test_download.py | Duam/telraam-data | fd1bda4a0be3f858015470a6cb9a3d64e140ce32 | [
"MIT"
] | null | null | null | telraam_data/tests/test_download.py | Duam/telraam-data | fd1bda4a0be3f858015470a6cb9a3d64e140ce32 | [
"MIT"
] | null | null | null | telraam_data/tests/test_download.py | Duam/telraam-data | fd1bda4a0be3f858015470a6cb9a3d64e140ce32 | [
"MIT"
] | null | null | null | import telraam_data.query as query
import telraam_data.download as download
from .utils import get_data_keys
import datetime as dt
import shutil
import pandas as pd
import pathlib as pl
import random
import pytest
@pytest.fixture()
def one_segment():
all_segments = query.query_active_segments()
segment_idx = ... | 33.166667 | 95 | 0.725712 |
1a472e9f3364e7eab80e602d807ac316d3170fe5 | 10,285 | py | Python | pni_customization/pni_customization/doctype/coating/coating.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/coating/coating.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/coating/coating.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Jigar Tarpara and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import get_datetime, time_diff_in_hours
from frappe.util... | 34.513423 | 110 | 0.723286 |
1a4731c607eee48d18f0cedff0801bbc3003043c | 1,044 | py | Python | smerfs/tests/test_zig.py | pec27/smerfs | 4368916cb6fc36858ea18131d741115840420ab1 | [
"MIT"
] | 10 | 2018-03-20T09:48:12.000Z | 2022-01-13T21:14:47.000Z | smerfs/tests/test_zig.py | MinTan1999/smerfs | 4368916cb6fc36858ea18131d741115840420ab1 | [
"MIT"
] | 2 | 2017-11-16T04:25:54.000Z | 2020-02-20T20:38:23.000Z | smerfs/tests/test_zig.py | MinTan1999/smerfs | 4368916cb6fc36858ea18131d741115840420ab1 | [
"MIT"
] | 2 | 2018-11-06T12:52:19.000Z | 2021-11-27T17:10:33.000Z | """
Test the random numbers
"""
from __future__ import print_function, division, unicode_literals, absolute_import
import numpy as np
from numpy.random import RandomState
from smerfs.random import z_standard_normal
def test_zig():
""" Test the Ziggurat generator has approximately normal distribn """
from scip... | 29 | 101 | 0.699234 |
1a474256206e0575720efe421fa3ec2d3a891ec3 | 8,300 | py | Python | unet/train.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | 1 | 2021-05-01T19:33:57.000Z | 2021-05-01T19:33:57.000Z | unet/train.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | null | null | null | unet/train.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow_datasets as tfds
import matplotlib.pyplot as plt
import numpy as np
from model.unet import UNet
# download the dataset and get info
dataset, info = tfds.load('oxford_iiit_pet:3.*.*', with_info=True)
# see the possible keys we can access in the dataset dict.
# this contains... | 28.919861 | 107 | 0.683012 |
1a4744d411dbaa1480fd26e4e990bb2887b8a8a9 | 706 | py | Python | DailyCodingProblem/150_LinkedIn_Nearest_K_Points_From_Cerntral_Point.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | DailyCodingProblem/150_LinkedIn_Nearest_K_Points_From_Cerntral_Point.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | DailyCodingProblem/150_LinkedIn_Nearest_K_Points_From_Cerntral_Point.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | """
This problem was asked by LinkedIn.
Given a list of points, a central point, and an integer k, find the nearest k points from the central point.
For example, given the list of points [(0, 0), (5, 4), (3, 1)], the central point (1, 2), and k = 2,
return [(0, 0), (3, 1)].
"""
def k_nearest(points, central, k):
... | 30.695652 | 108 | 0.628895 |
1a474cc70784dde081af63deeeaac07bb3834a10 | 2,241 | py | Python | doc/sphinx/example-acoustics-2d/makeplots.py | geoflows/geoclaw-4.x | c8879d25405017b38392aa3b1ea422ff3e3604ea | [
"BSD-3-Clause"
] | 7 | 2016-11-13T03:11:51.000Z | 2021-09-07T18:59:48.000Z | doc/sphinx/example-acoustics-2d/makeplots.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 11 | 2020-01-14T18:00:37.000Z | 2022-03-29T14:25:24.000Z | doc/sphinx/example-acoustics-2d/makeplots.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 6 | 2020-01-14T17:15:42.000Z | 2021-12-03T17:28:44.000Z |
"""
Create plots corresponding to each sample setplot function. Search for all
files of the form setplot_*.py and loop over them.
Also create .rst files for each example. The doc string for each setplot
file should start with at title underlined with ===, followed by a brief
description. These are used in the rst ... | 36.145161 | 99 | 0.623382 |
1a475a6a9b421f3c53f286103f23ef97d923f83a | 2,593 | py | Python | simulation/simulation_tabular.py | lrakotoarivony/gym-idsgame | b5eb2583e87dc37ac1735d28b97241fd51199374 | [
"MIT"
] | null | null | null | simulation/simulation_tabular.py | lrakotoarivony/gym-idsgame | b5eb2583e87dc37ac1735d28b97241fd51199374 | [
"MIT"
] | null | null | null | simulation/simulation_tabular.py | lrakotoarivony/gym-idsgame | b5eb2583e87dc37ac1735d28b97241fd51199374 | [
"MIT"
] | 1 | 2022-01-11T13:25:16.000Z | 2022-01-11T13:25:16.000Z | import os
import time
from gym_idsgame.config.runner_mode import RunnerMode
from gym_idsgame.simulation.dao.simulation_config import SimulationConfig
from gym_idsgame.agents.dao.agent_type import AgentType
from gym_idsgame.config.client_config import ClientConfig
from gym_idsgame.runnner import Runner
from gym_idsgame.... | 38.132353 | 129 | 0.704975 |
1a4763e4662536f0d94af421c255b69d433b5eac | 1,510 | py | Python | ribs/emitters/opt/_adam.py | icaros-usc/dqd | 262c31f56cd4704b76ddaf9b9eb024afdbb209d6 | [
"MIT"
] | 38 | 2021-06-09T01:29:58.000Z | 2022-02-20T13:32:05.000Z | ribs/emitters/opt/_adam.py | icaros-usc/dqd | 262c31f56cd4704b76ddaf9b9eb024afdbb209d6 | [
"MIT"
] | 1 | 2021-08-01T03:50:24.000Z | 2021-08-01T21:03:39.000Z | ribs/emitters/opt/_adam.py | icaros-usc/dqd | 262c31f56cd4704b76ddaf9b9eb024afdbb209d6 | [
"MIT"
] | 2 | 2021-06-10T07:14:22.000Z | 2021-12-14T15:25:21.000Z | # Adapted from: https://github.com/hardmaru/estool/blob/master/es.py
import numpy as np
# A Vanilla Gradient Ascent
class GradientAscentOpt:
def __init__(self, theta0, stepsize, epsilon=1e-8):
self.epsilon = epsilon
self.dim = len(theta0)
self.stepsize = stepsize
self.reset(np.cop... | 27.962963 | 90 | 0.590728 |
1a4773f7be50baf680a92fd70d3801a5e9a39cda | 577 | py | Python | function_bd.py | trofmike/2048_telagram_bot | ea2b3c1fac461c5b47c7b1234b71ea6248f11ef7 | [
"Apache-2.0"
] | null | null | null | function_bd.py | trofmike/2048_telagram_bot | ea2b3c1fac461c5b47c7b1234b71ea6248f11ef7 | [
"Apache-2.0"
] | null | null | null | function_bd.py | trofmike/2048_telagram_bot | ea2b3c1fac461c5b47c7b1234b71ea6248f11ef7 | [
"Apache-2.0"
] | null | null | null | import psycopg2
import sys
def connect_DB():
#Define our connection string
conn_string = "host='localhost' dbname='my_database' user='postgres' password='secret'"
# print the connection string we will use to connect
print "Connecting to database\n ->%s" % (conn_string)
# get a connection, if a connect cannot ... | 28.85 | 88 | 0.741768 |
1a479456fdf1c387e249644ddaf2d4f14f64a2c4 | 1,679 | py | Python | app/main.py | nova77/hackernews_rss | ae2566626c0a733828a6c220990caf7946a46aa0 | [
"MIT"
] | null | null | null | app/main.py | nova77/hackernews_rss | ae2566626c0a733828a6c220990caf7946a46aa0 | [
"MIT"
] | null | null | null | app/main.py | nova77/hackernews_rss | ae2566626c0a733828a6c220990caf7946a46aa0 | [
"MIT"
] | null | null | null | import os
import functools
from flask import Flask
from flask import request
import redis
import hn_feeds
import logger_config
app = Flask(__name__)
logger = logger_config.get_logger()
@functools.lru_cache(None)
def _get_feed_generator():
redis_server = os.environ.get("REDIS_SERVER", None)
if redis_server:
... | 25.439394 | 73 | 0.702799 |
1a47a87086927cb5cdd0e93ac5bcad4b0d143954 | 5,173 | py | Python | src/controller/python/test/test_scripts/commissioning_failure_test.py | sungho1shin/connectedhomeip | 050eb6d24487598a97743b6a23d41232e45bef88 | [
"Apache-2.0"
] | 4 | 2020-09-11T04:32:44.000Z | 2022-03-11T09:06:07.000Z | src/controller/python/test/test_scripts/commissioning_failure_test.py | sungho1shin/connectedhomeip | 050eb6d24487598a97743b6a23d41232e45bef88 | [
"Apache-2.0"
] | null | null | null | src/controller/python/test/test_scripts/commissioning_failure_test.py | sungho1shin/connectedhomeip | 050eb6d24487598a97743b6a23d41232e45bef88 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2022 Project CHIP 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/lice... | 35.923611 | 125 | 0.647593 |
1a47bdd4053aca36705ed4d58e60c21aacfb2da2 | 1,915 | py | Python | pyram/utils/make_info_from_amr.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | pyram/utils/make_info_from_amr.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | pyram/utils/make_info_from_amr.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z |
# coding: utf-8
def write_info(amr):
#import fortranformat as ff
#nout = amr.nout
aexp = amr.aexp
h0 = amr.h0 * 1e-2
rhoc = 1.88e-29
boxlen = 1.0
f = open("info_" + str(nout).zfill(5) + ".txt", 'w')
for name, val in zip(["ncpu", "ndim", "levelmin", "levelmax", "ngridmax", "ns... | 31.393443 | 111 | 0.565535 |
1a47bf53200ad2ade8f998a405261c686b6d894d | 17,744 | py | Python | payulatam/models.py | GearPlug/payu-django | fa38f7acf49911868e35fc433e40cf768c4f5ec3 | [
"MIT"
] | 2 | 2019-11-09T03:58:06.000Z | 2021-02-09T16:50:57.000Z | payulatam/models.py | GearPlug/payu-django | fa38f7acf49911868e35fc433e40cf768c4f5ec3 | [
"MIT"
] | null | null | null | payulatam/models.py | GearPlug/payu-django | fa38f7acf49911868e35fc433e40cf768c4f5ec3 | [
"MIT"
] | 2 | 2018-12-26T17:00:55.000Z | 2020-07-08T04:44:37.000Z | from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from payu.enumerators import Currency, MessagePol, StatePol
from payulatam.settings import payulatam_settings as settings
from payulatam.signals import invalid_notification_received, payment_was_approved, p... | 27.173047 | 111 | 0.657969 |
1a47ddc04baf80b4c2d181b02b0f9e85155fe717 | 35,000 | py | Python | tests/autoscale_test.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | tests/autoscale_test.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | tests/autoscale_test.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | """Tests for autoscale."""
import unittest
import mock
from botocore import exceptions as botoexc
from treadmill import context
from treadmill_aws import autoscale
from treadmill_aws import awscontext
def _mock_cell(admin_mock, stateapi_mock,
partitions, servers, servers_state, apps_state):
adm... | 37.194474 | 79 | 0.501857 |
1a47edb7f573b625277f3ff3bb47cd0eb7b49dbf | 74 | py | Python | djstripe/__init__.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 937 | 2017-06-04T18:44:20.000Z | 2022-03-27T07:28:32.000Z | djstripe/__init__.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 969 | 2017-06-05T01:57:20.000Z | 2022-03-31T23:42:54.000Z | djstripe/__init__.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 309 | 2017-06-12T03:18:10.000Z | 2022-03-29T17:05:18.000Z | # for django < 3.2
default_app_config = "djstripe.apps.DjstripeAppConfig"
| 24.666667 | 54 | 0.783784 |
1a4814c976b6cc1e21524834c79db2f28d462176 | 625 | py | Python | CBDGUI/GUI/migrations/0001_initial.py | ODeinsN/ChatDuelBot | a7ab2435926eba6be5139cfe54aaa415c3f588bc | [
"Unlicense"
] | null | null | null | CBDGUI/GUI/migrations/0001_initial.py | ODeinsN/ChatDuelBot | a7ab2435926eba6be5139cfe54aaa415c3f588bc | [
"Unlicense"
] | null | null | null | CBDGUI/GUI/migrations/0001_initial.py | ODeinsN/ChatDuelBot | a7ab2435926eba6be5139cfe54aaa415c3f588bc | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-05 07:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Task',
fields=[
('id', models.BigAutoField(... | 26.041667 | 117 | 0.5792 |
1a485b0b754a5890f7c0b1d4e1805f52aea4cef5 | 489 | py | Python | ProblemSet2/ProblemSet2-2.py | ajschrier/pythonedx | d5074e83a3aed9e0e584d7f702e37c863a8e8c9a | [
"MIT"
] | null | null | null | ProblemSet2/ProblemSet2-2.py | ajschrier/pythonedx | d5074e83a3aed9e0e584d7f702e37c863a8e8c9a | [
"MIT"
] | null | null | null | ProblemSet2/ProblemSet2-2.py | ajschrier/pythonedx | d5074e83a3aed9e0e584d7f702e37c863a8e8c9a | [
"MIT"
] | null | null | null | balance = 3926
annualInterestRate = 0.2
#import time
monthlyInterest = annualInterestRate / 12.0
workingBalance = balance
minimumPayment = 0
while workingBalance > 0:
minimumPayment += 10
workingBalance = balance
for month in range(1, 13):
workingBalance -= minimumPayment
workingBalance = workingBalance + (w... | 20.375 | 70 | 0.752556 |
1a488e24b4e89748d3fe2c34992a605943780a62 | 66 | py | Python | image_cache/__init__.py | joshloyal/image-cache | a9161a738c4b16b02868304976f3e53baa3df931 | [
"MIT"
] | null | null | null | image_cache/__init__.py | joshloyal/image-cache | a9161a738c4b16b02868304976f3e53baa3df931 | [
"MIT"
] | null | null | null | image_cache/__init__.py | joshloyal/image-cache | a9161a738c4b16b02868304976f3e53baa3df931 | [
"MIT"
] | null | null | null | from image_cache.cache import *
from image_cache import itertools
| 22 | 33 | 0.848485 |
1a48a61b65720e84563fea320dbec07ac8c099ed | 7,578 | py | Python | braindecode/util.py | TonioBall/braindecode | d5b8d87d959c96ea8422e21099e1ef4b71b9d05a | [
"BSD-3-Clause"
] | null | null | null | braindecode/util.py | TonioBall/braindecode | d5b8d87d959c96ea8422e21099e1ef4b71b9d05a | [
"BSD-3-Clause"
] | null | null | null | braindecode/util.py | TonioBall/braindecode | d5b8d87d959c96ea8422e21099e1ef4b71b9d05a | [
"BSD-3-Clause"
] | null | null | null | import os
import errno
import random
import numpy as np
import torch as th
def set_random_seeds(seed, cuda):
"""Set seeds for python random module numpy.random and torch.
Parameters
----------
seed: int
Random seed.
cuda: bool
Whether to set cuda seed with torch.
"""
ran... | 26.496503 | 76 | 0.6346 |
1a48aa7c4542b9b44c197fc55b1295d0fddec32e | 31,358 | py | Python | volttron/platform/dbutils/sqlitefuncts.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | 406 | 2015-01-20T03:08:53.000Z | 2022-03-31T20:59:07.000Z | volttron/platform/dbutils/sqlitefuncts.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | 2,031 | 2015-01-05T21:35:45.000Z | 2022-03-29T21:44:36.000Z | volttron/platform/dbutils/sqlitefuncts.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | 219 | 2015-01-20T14:53:57.000Z | 2022-03-06T00:37:41.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2020, Battelle Memorial Institute.
#
# 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... | 40.048531 | 120 | 0.578545 |
1a48b173b8be5e48b68845aa9b3bb7440e289cb7 | 1,721 | py | Python | alipay/aop/api/domain/AnttechBlockchainDefinFinanceOrderSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AnttechBlockchainDefinFinanceOrderSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AnttechBlockchainDefinFinanceOrderSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.SystemParam import SystemParam
class AnttechBlockchainDefinFinanceOrderSubmitModel(object):
def __init__(self):
self._encoded_biz_param = None
self._sys_param... | 28.683333 | 85 | 0.635677 |
1a48b65cad7b295cbd5b674dfbc35a7bb773651e | 1,154 | py | Python | src/cutadapt/tokenizer.py | greggles/cutadapt | fb3e8f0828c2cb92bfaea69d91ffb539ab24cdd0 | [
"MIT"
] | 375 | 2015-01-16T14:04:50.000Z | 2022-03-16T02:19:43.000Z | src/cutadapt/tokenizer.py | greggles/cutadapt | fb3e8f0828c2cb92bfaea69d91ffb539ab24cdd0 | [
"MIT"
] | 589 | 2015-03-05T20:06:03.000Z | 2022-03-29T22:49:56.000Z | src/cutadapt/tokenizer.py | greggles/cutadapt | fb3e8f0828c2cb92bfaea69d91ffb539ab24cdd0 | [
"MIT"
] | 150 | 2015-02-10T12:19:40.000Z | 2022-03-25T05:06:50.000Z | import re
from dataclasses import dataclass
from typing import Iterator, Type
@dataclass
class Token:
value: str
def __repr__(self) -> str:
return f'{self.__class__.__name__}("{self.value}")'
class StringToken(Token):
pass
class BraceToken(Token):
pass
class TokenizeError(Exception):
... | 24.041667 | 73 | 0.589255 |
1a48b6dad76005fd016dde27315ca0c24557ab70 | 12,795 | py | Python | geoapps/selection.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | geoapps/selection.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | geoapps/selection.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Mira Geoscience Ltd.
#
# This file is part of geoapps.
#
# geoapps is distributed under the terms and conditions of the MIT License
# (see LICENSE file at the root of this source code package).
from typing import Optional, Union
import ipywidgets as widgets
import numpy as np
from geoh5py.dat... | 29.755814 | 94 | 0.557249 |
1a48e544c0134ea3659b56bf37f9cf456d99f322 | 8,058 | py | Python | zs/tests/test_writer.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 35 | 2015-06-19T02:36:14.000Z | 2021-09-22T21:19:59.000Z | zs/tests/test_writer.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 2 | 2016-03-07T00:52:41.000Z | 2021-11-14T16:48:33.000Z | zs/tests/test_writer.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 4 | 2015-01-30T09:23:18.000Z | 2019-02-05T18:03:08.000Z | # This file is part of ZS
# Copyright (C) 2013-2014 Nathaniel Smith <njs@pobox.com>
# See file LICENSE.txt for license information.
from contextlib import contextmanager
import math
from six import BytesIO
from nose.tools import assert_raises
from zs import ZS, ZSWriter, ZSError
from zs.common import write_length_pr... | 33.575 | 78 | 0.570861 |
1a48faecf1e66989cffe75295a483f5c0059b52c | 11,832 | py | Python | pycolab/examples/extraterrestrial_marauders.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | null | null | null | pycolab/examples/extraterrestrial_marauders.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | null | null | null | pycolab/examples/extraterrestrial_marauders.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | null | null | null | # Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.515789 | 82 | 0.644439 |
1a491e927e109e2aad5143a96076d20648048994 | 15,796 | py | Python | MachineLearning/TensorFlow/image-clssifier/GUI/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/TensorFlow/image-clssifier/GUI/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/TensorFlow/image-clssifier/GUI/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:utf-8
# 2019/9/21
import sys
sys.path.append(r"C:\Study\github\Lookoops\MachineLearning\TensorFlow\image-clssifier")
import logging
import pickle
import os
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from keras import backend as K
import numpy as np
import tensorflow a... | 35.576577 | 307 | 0.615852 |
1a49250d6b14bb5542c0f559d76e77bdfd963e12 | 3,860 | py | Python | src/examples/rick_and_morty_stories/rick_and_morty_stories.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/rick_and_morty_stories/rick_and_morty_stories.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/rick_and_morty_stories/rick_and_morty_stories.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | # @Time : 12/07/21 1:05 PM
# @Author : Fabrice Harel-Canada
# @File : rick_and_morty_stories.py
import torch
from transformers import pipeline, set_seed
from transformers.pipelines import TextGenerationPipeline
class RickAndMortyStories:
def __init__(self, mask_bad_words=True):
self.pipeline = pipe... | 43.370787 | 228 | 0.610363 |
1a4925d7d482faaa22a796e6f26a7d71368b66be | 11,543 | py | Python | lib/models/cell_searchs/darts_wrapper_discrete.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | lib/models/cell_searchs/darts_wrapper_discrete.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | lib/models/cell_searchs/darts_wrapper_discrete.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | # NASBench 301 stuff here
import sys
from pathlib import Path
sys.path.append('./darts/cnn')
lib_dir = (Path(__file__).parent / 'darts' / 'cnn').resolve()
if str(lib_dir) not in sys.path: sys.path.insert(0, str(lib_dir))
import genotypes
from model_search import Network, NetworkNB
import utils
import time
import math... | 34.873112 | 158 | 0.632851 |
1a49270b4e8c26e6630601352e341c1304a338ed | 8,203 | py | Python | tests/api/v1_2_10/test_non_fabric_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_2_10/test_non_fabric_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_2_10/test_non_fabric_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI non_fabric_wireless API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 re... | 31.794574 | 313 | 0.728636 |
1a495218c5d13215971afae32e10a360e2d374cd | 1,987 | py | Python | PythonAPI/challenge/autonomous_agent.py | germanros1987/carla | b7d98000b7f75a9404788ebf6bfa8d7f00eef50d | [
"MIT"
] | 1 | 2021-02-25T05:04:28.000Z | 2021-02-25T05:04:28.000Z | PythonAPI/challenge/autonomous_agent.py | germanros1987/carla | b7d98000b7f75a9404788ebf6bfa8d7f00eef50d | [
"MIT"
] | 1 | 2019-02-26T02:42:52.000Z | 2019-02-26T02:42:52.000Z | PythonAPI/challenge/autonomous_agent.py | germanros1987/carla | b7d98000b7f75a9404788ebf6bfa8d7f00eef50d | [
"MIT"
] | null | null | null | import carla
from challenge.data_provider import DataProvider
class AutonomousAgent():
def __init__(self):
# current global plans to reach a destination
self._topological_plan = None,
self._waypoints_plan = None
# this data structure will contain all sensor data
self.data... | 30.106061 | 94 | 0.545546 |
1a49795d9b64b91a102395be85ec4754edc44d94 | 1,465 | py | Python | server/benchmarks/update_strategies.py | vis-au/prointerest | 6200908d4ddeecaf05de859063d9eaaa7e63a6be | [
"Apache-2.0"
] | null | null | null | server/benchmarks/update_strategies.py | vis-au/prointerest | 6200908d4ddeecaf05de859063d9eaaa7e63a6be | [
"Apache-2.0"
] | null | null | null | server/benchmarks/update_strategies.py | vis-au/prointerest | 6200908d4ddeecaf05de859063d9eaaa7e63a6be | [
"Apache-2.0"
] | null | null | null | from typing import Callable, List, Tuple
from outdated_item_selection_strategy.no_update import *
from outdated_item_selection_strategy.oldest_chunks_update import *
from outdated_item_selection_strategy.last_n_chunks_update import *
from outdated_item_selection_strategy.regular_interval_update import *
from outdated_... | 38.552632 | 146 | 0.767235 |
1a499769933c0709a5d8b5a679c2281cfd7206e0 | 1,313 | py | Python | setup.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | setup.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | 1 | 2021-08-21T10:16:03.000Z | 2021-08-21T10:16:03.000Z | setup.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
class NoseTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import no... | 26.795918 | 65 | 0.606245 |
1a49a0e46cf8c3dd5eb7985eb05adf32f838dfae | 2,718 | py | Python | hallo/test/base/test_function_dispatcher.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/test/base/test_function_dispatcher.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/test/base/test_function_dispatcher.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.function_dispatcher import FunctionDispatcher
from hallo.hallo import Hallo
def test_fd_load_order(hallo_getter):
test_hallo = hallo_getter({})
# Create a blank function dispatcher
fd = FunctionDispatcher(set(), test_hallo)
try:
# Add modules to allowed list
fd.module_list =... | 29.543478 | 88 | 0.672553 |
1a49a373661ed76c484f9ef94526d786934b35ca | 43 | py | Python | tests/inputs/loops/08-while-test.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | tests/inputs/loops/08-while-test.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | tests/inputs/loops/08-while-test.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | i = 0
while i < 10:
j += i
i += 1
| 7.166667 | 13 | 0.325581 |
1a49acda5dd534221fbfb1ca0deb80f9eb7a2fd1 | 8,129 | py | Python | vat_ladder/vat_ladder.py | sakishinoda/tf-ssl | 9c2bd250c41a8104c8082d8154acc580c70c3e82 | [
"MIT"
] | 16 | 2017-07-21T10:02:52.000Z | 2021-06-27T11:40:39.000Z | vat_ladder/vat_ladder.py | sakishinoda/tf-ssl | 9c2bd250c41a8104c8082d8154acc580c70c3e82 | [
"MIT"
] | 2 | 2017-07-06T23:46:08.000Z | 2017-07-08T11:54:55.000Z | vat_ladder/vat_ladder.py | sakishinoda/tf-ssl | 9c2bd250c41a8104c8082d8154acc580c70c3e82 | [
"MIT"
] | 7 | 2017-12-08T01:21:47.000Z | 2020-02-07T06:28:34.000Z |
import tensorflow as tf
import os
import time
from tqdm import tqdm
from src.utils import get_cli_params, process_cli_params, \
order_param_settings
from src.lva import build_graph, measure_smoothness, VERBOSE
from src.train import evaluate_metric_list, update_decays, evaluate_metric
import numpy as np
def main... | 31.265385 | 83 | 0.544347 |
1a49b6c2094a8fdae619bcece846473470c33616 | 4,163 | py | Python | bots.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | bots.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | bots.py | StephanHeijl/Rainworms | 724f00e110c88a956ae32688dcc2dd156a389938 | [
"MIT"
] | null | null | null | from rainworms import *
import random
class Bot():
def __init__(self):
self.game: RainWorms = None
@staticmethod
def in_roll_take_phase(possible_actions: List[PlayerAction]) -> bool:
return any([
action for action in possible_actions
if action.action_type == PlayerA... | 40.028846 | 121 | 0.676675 |
1a49c87e4f3b26ee97e1bcfedca9498324a64457 | 4,676 | py | Python | python/v2.5/create_flash_inpage_creative.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | python/v2.5/create_flash_inpage_creative.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | python/v2.5/create_flash_inpage_creative.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# 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 b... | 32.929577 | 79 | 0.710222 |
1a49d71c23f01981fbe52e34a75d69570766d75b | 5,058 | py | Python | savu/data/data_structures/data_types/image_data.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/data/data_structures/data_types/image_data.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/data/data_structures/data_types/image_data.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | 35.87234 | 90 | 0.612495 |
1a4a15727d1c20622d9ebde45345f557fd2a7153 | 1,967 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/account/cancel_password_email.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/account/cancel_password_email.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/account/cancel_password_email.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 29.358209 | 103 | 0.625318 |
1a4ac69da4b5f1e9dd17f1bc93709333d7e26c19 | 1,184 | py | Python | Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Required for Python to search this directory for module files
from .models import *
from .generator import *
from .cpp_generator import *
from .objc_generator import *
from .generate_cpp_alternate_backend_dispatcher_header import *
from .generate_cpp_backend_dispatcher_header import *
from .generate_cpp_backend_dis... | 45.538462 | 69 | 0.876689 |
1a4af266039103e7e1504904ff487b3093833286 | 22,762 | py | Python | google/appengine/datastore/datastore_index.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/appengine/datastore/datastore_index.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/appengine/datastore/datastore_index.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 28.849176 | 80 | 0.70543 |
1a4b08feff9989b24cc95f9fd22b67faa971d5c5 | 1,190 | py | Python | kits/log.py | Elaoed/iplives | 6b27fe929b6d605efc70b5cfb7a0c7609100f0ff | [
"BSD-3-Clause"
] | null | null | null | kits/log.py | Elaoed/iplives | 6b27fe929b6d605efc70b5cfb7a0c7609100f0ff | [
"BSD-3-Clause"
] | null | null | null | kits/log.py | Elaoed/iplives | 6b27fe929b6d605efc70b5cfb7a0c7609100f0ff | [
"BSD-3-Clause"
] | null | null | null | """write log to file."""
import logging
import os
ROOT_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
def get_logger(filename, logger_name=None, on_screen=False, level=None):
"""Return logger."""
if not logger_name:
logger_name = filename
logger = logging.getLogger(logger_na... | 27.674419 | 80 | 0.657983 |
1a4b48d27af07be23bb06898e560fd762073f11c | 3,512 | py | Python | src/PyAlarmClock/days_of_week.py | ondras12345/PyAlarmClock | 1ead824a8d0dcd274f8710ac4787ee0c0c3c94e0 | [
"MIT"
] | null | null | null | src/PyAlarmClock/days_of_week.py | ondras12345/PyAlarmClock | 1ead824a8d0dcd274f8710ac4787ee0c0c3c94e0 | [
"MIT"
] | null | null | null | src/PyAlarmClock/days_of_week.py | ondras12345/PyAlarmClock | 1ead824a8d0dcd274f8710ac4787ee0c0c3c94e0 | [
"MIT"
] | null | null | null | from typing import Union, List
class DaysOfWeek:
"""An object that stores a boolean value for each day of the week.
It can read or produce a one byte code compatible with what AlarmClock
uses.
"""
days = {
'Monday': 1,
'Tuesday': 2,
'Wednesday': 3,
'Thursday': 4,
... | 35.12 | 79 | 0.571754 |
1a4b55720f2ba818a356e73151ee57c1bf725cca | 30,487 | py | Python | src/sage/combinat/free_dendriform_algebra.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/free_dendriform_algebra.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/free_dendriform_algebra.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Free Dendriform Algebras
AUTHORS:
Frédéric Chapoton (2017)
"""
# ****************************************************************************
# Copyright (C) 2010-2015 Frédéric Chapoton <chapoton@unistra.fr>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#... | 32.467519 | 130 | 0.504215 |
1a4b94567c32707bf318eaf906d290d42d4aaabd | 6,988 | py | Python | GeeProxy/validators/validators.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 2 | 2020-10-12T05:31:36.000Z | 2020-11-30T07:39:06.000Z | GeeProxy/validators/validators.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-04-19T11:14:59.000Z | 2021-04-19T11:14:59.000Z | GeeProxy/validators/validators.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-09-30T04:36:10.000Z | 2021-09-30T04:36:10.000Z | '''
@Author: qinzhonghe96@163.com
@Date: 2020-03-01 18:33:41
@LastEditors: qinzhonghe96@163.com
@LastEditTime: 2020-03-10 19:51:30
@Description: 代理校验器
'''
import os
import requests
import asyncio
import time
import json
import ssl
from GeeProxy.utils.logger import proxy_validator
from aiohttp import ClientSession, Clie... | 34.94 | 105 | 0.540069 |
1a4bb582dc329d2cb2ff060a8acc7ad67c5a7621 | 464 | py | Python | var/spack/repos/builtin.mock/packages/git-test/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin.mock/packages/git-test/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin.mock/packages/git-test/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"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 *
class GitTest(Package):
"""Mock package that uses git for fetching."""
homepage = "http://ww... | 27.294118 | 73 | 0.700431 |
1a4bf72a7e1ad07af3a310ee648d732be963d9a2 | 1,422 | py | Python | neutron_diagnose/command/sg_rule.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"Apache-2.0"
] | null | null | null | neutron_diagnose/command/sg_rule.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"Apache-2.0"
] | null | null | null | neutron_diagnose/command/sg_rule.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"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
# d... | 35.55 | 78 | 0.69128 |
1a4c0680fed14be9b9a5a2339c01b3893078d432 | 2,173 | py | Python | zipgen/uploader/storage.py | jonatron/django-s3-stream | 3d28d0ac1a9d7774d0a23a58da601445bec52cd4 | [
"MIT"
] | 1 | 2016-12-27T17:54:12.000Z | 2016-12-27T17:54:12.000Z | zipgen/uploader/storage.py | jonatron/django-s3-stream | 3d28d0ac1a9d7774d0a23a58da601445bec52cd4 | [
"MIT"
] | null | null | null | zipgen/uploader/storage.py | jonatron/django-s3-stream | 3d28d0ac1a9d7774d0a23a58da601445bec52cd4 | [
"MIT"
] | null | null | null | from boto.s3.connection import S3Connection
from storages.backends.s3boto import S3BotoStorage
import os
import math
from multiprocessing.pool import Pool
def _upload_part(bucketname, aws_key, aws_secret, multipart_id, part_num,
source_path, offset, bytes, amount_of_retries=10):
"""
Uploads a... | 37.465517 | 88 | 0.599172 |
1a4c36a9e51183950a38b1e172bb3a5872a1eef5 | 21,984 | py | Python | src/tests/ftest/util/daos_utils.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_utils.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_utils.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | #!/usr/bin/python
"""
(C) Copyright 2018-2022 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import re
import traceback
from daos_utils_base import DaosCommandBase
class DaosCommand(DaosCommandBase):
# pylint: disable=too-many-ancestors,too-many-public-methods
"""Defines a object re... | 32.91018 | 95 | 0.551492 |
1a4c3d7f21535ab6992bbf876c38845f20a51805 | 8,474 | py | Python | delfin/tests/unit/drivers/dell_emc/vplex/test_emc_vplex.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | delfin/tests/unit/drivers/dell_emc/vplex/test_emc_vplex.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 1 | 2020-11-25T08:51:18.000Z | 2020-11-25T08:51:18.000Z | delfin/tests/unit/drivers/dell_emc/vplex/test_emc_vplex.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 31.619403 | 80 | 0.513453 |
1a4c4ba8198b0091ddeab4d1e7791d78770e4b49 | 7,168 | py | Python | baselines/experiment_manager.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 2 | 2020-08-01T18:19:05.000Z | 2021-06-30T06:37:23.000Z | baselines/experiment_manager.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | null | null | null | baselines/experiment_manager.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 5 | 2018-11-24T16:29:39.000Z | 2021-12-10T03:07:07.000Z | '''
This script helps creating and managing experiments.
Possible commands:
- launch: launch an experiment loading its specification from a CSV file
- view: list the experiments which are still running
- stop: stop all the runners of the experiment
'''
import pandas as pd
import argparse, os, sys, ... | 47.157895 | 147 | 0.615374 |
1a4c5d94fdd37452dc50e5aaa0d5cef3a1bb4fae | 18,593 | py | Python | tempest/services/orchestration/json/orchestration_client.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/services/orchestration/json/orchestration_client.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/services/orchestration/json/orchestration_client.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 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/LICENSE-2.0
#
# Unless required by app... | 41.317778 | 78 | 0.606088 |
1a4c66df8cd193e5c393c019ee8603944a4fbb08 | 3,646 | py | Python | api/screener.py | lit26/Stock_Screener | 8ae06f8d91de40e565379ccec545293a4670e951 | [
"MIT"
] | 5 | 2021-08-04T11:58:22.000Z | 2022-02-11T09:44:16.000Z | api/screener.py | webclinic017/Stock_Screener-3 | 8ae06f8d91de40e565379ccec545293a4670e951 | [
"MIT"
] | 2 | 2021-08-04T14:59:59.000Z | 2022-02-22T15:29:51.000Z | api/screener.py | webclinic017/Stock_Screener-3 | 8ae06f8d91de40e565379ccec545293a4670e951 | [
"MIT"
] | 3 | 2021-11-07T14:28:28.000Z | 2022-02-20T18:59:22.000Z | import pandas as pd
from finvizfinance.util import webScrap, numberCovert, NUMBER_COL, util_dict
BASE_URL = 'https://finviz.com/screener.ashx?v={screener}{filter}&ft=4&o={order}&r={row}'
FILTER_DICT = util_dict['filter']
def set_filters(filters_dict):
"""Set filters.
Args:
filters_dict(dict): dictiona... | 35.745098 | 110 | 0.603401 |
1a4c85f6a333f4c5e044abeacb0abf1d28dadba3 | 1,216 | py | Python | superset/migrations/versions/c611f2b591b8_dim_spec.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/c611f2b591b8_dim_spec.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/c611f2b591b8_dim_spec.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.179487 | 88 | 0.762336 |
1a4c89b84f50d2f350e4a437b7f7b06642dac218 | 1,390 | py | Python | recipes/admin.py | jbuisine/django-recipes | 4746bcf57d884b3dbc839391f3fb58932b72fa5f | [
"MIT"
] | null | null | null | recipes/admin.py | jbuisine/django-recipes | 4746bcf57d884b3dbc839391f3fb58932b72fa5f | [
"MIT"
] | null | null | null | recipes/admin.py | jbuisine/django-recipes | 4746bcf57d884b3dbc839391f3fb58932b72fa5f | [
"MIT"
] | null | null | null | from django.contrib import admin
from recipes.models import Ingredient, IngredientUnitMeasure, \
IngredientFamily, IngredientPhoto, \
RecipeType, RecipeDifficulty
@admin.register(IngredientUnitMeasure)
class IngredientUnitMeasureAdmin(admin.ModelAdmin):
list_... | 26.226415 | 63 | 0.71295 |
1a4c8d4865b27b7c58e69c4d3910a25be4d6e917 | 26 | py | Python | models/NTURGBD/__init__.py | dracarys983/TwoStreamCNN | dfb10bd7aad121df54d92df85affd4cb5dc7ab75 | [
"MIT"
] | 12 | 2018-04-23T09:39:53.000Z | 2022-02-12T01:22:12.000Z | models/NTURGBD/__init__.py | dracarys983/SingleStreamCNN | dcd3bd527f15ce9d42f0cc9fabe4a3c34885f2d7 | [
"MIT"
] | 1 | 2019-01-02T13:18:45.000Z | 2019-02-21T17:32:59.000Z | models/NTURGBD/__init__.py | dracarys983/ReplicateCVPR | 9a977fcb0d17f066cc87de9d7c90f5ac8de58cae | [
"MIT"
] | 2 | 2019-11-19T08:58:01.000Z | 2020-03-12T14:22:19.000Z | from nturgbd_rnn import *
| 13 | 25 | 0.807692 |
1a4c949c0c61fe569c94c90ea148bad6123abec2 | 1,740 | py | Python | test.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | 7 | 2020-08-07T05:56:12.000Z | 2021-08-23T22:12:20.000Z | test.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | 1 | 2021-09-07T03:41:44.000Z | 2021-09-07T03:41:44.000Z | test.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | 2 | 2020-06-11T11:17:37.000Z | 2020-08-08T00:32:42.000Z | from flask import Flask
from flask_s3_viewer import FlaskS3Viewer
from flask_s3_viewer.aws.ref import Region
import logging
logging.basicConfig(
level=logging.INFO,
format='%(levelname)s: %(asctime)s: %(message)s'
)
app = Flask(__name__)
# For test, disable template caching
app.config['SEND_FILE_MAX_AGE_DEF... | 25.588235 | 67 | 0.692529 |
1a4c9609ddcba8b57bd45c352dabbb227ec0cd6a | 4,230 | py | Python | tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | 1 | 2021-06-10T23:59:36.000Z | 2021-06-10T23:59:36.000Z | tests/unit/common/monitored_resource_util/test_aws_identity_doc_utils.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 37.767857 | 74 | 0.665721 |
1a4cb02aac4bfa4490adca7d0d3bdecc15251049 | 6,685 | py | Python | DAE_Method/rouen/analyse_results.py | proy3/Abnormal_Trajectory_Classifier | a6b27c6847262e9703a0f3404c85c135415c1d4c | [
"MIT"
] | 6 | 2019-10-29T03:05:14.000Z | 2022-03-18T05:14:25.000Z | DAE_Method/rouen/analyse_results.py | proy3/Abnormal_Trajectory_Classifier | a6b27c6847262e9703a0f3404c85c135415c1d4c | [
"MIT"
] | 1 | 2022-03-11T03:49:34.000Z | 2022-03-11T03:49:34.000Z | DAE_Method/rouen/analyse_results.py | proy3/Abnormal_Trajectory_Classifier | a6b27c6847262e9703a0f3404c85c135415c1d4c | [
"MIT"
] | 1 | 2021-12-15T09:21:26.000Z | 2021-12-15T09:21:26.000Z | """
Test the pre-trained autoencoder model with test trajectory data.
"""
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import ae_utilities as aeu
import dataset_defines as dd
import numpy as np
import os
abspath = os.path.abspath(__file__)
dir_name = os.path.dirname(abspath)
dataset... | 40.271084 | 129 | 0.535976 |
1a4cc90c9444665ad3b7aa04143ee9e5035968fa | 101 | py | Python | util/__init__.py | Hatsune-Miku-Bot/miku | 821f21f5ff0d7731d8afff26cabfe5b64ef91289 | [
"CC0-1.0"
] | null | null | null | util/__init__.py | Hatsune-Miku-Bot/miku | 821f21f5ff0d7731d8afff26cabfe5b64ef91289 | [
"CC0-1.0"
] | 18 | 2021-05-19T11:35:49.000Z | 2022-01-10T08:50:21.000Z | util/__init__.py | Hatsune-Miku-Bot/miku | 821f21f5ff0d7731d8afff26cabfe5b64ef91289 | [
"CC0-1.0"
] | null | null | null | from .meek_moe import *
from .post_stats_log import *
from .privacy_vote import *
from .var import *
| 20.2 | 29 | 0.762376 |
1a4cd03f3018becc0b0295e1916e36cebd388714 | 7,635 | py | Python | backend/api/migrations/0001_initial.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | 2 | 2020-01-07T12:35:11.000Z | 2021-09-18T10:30:57.000Z | backend/api/migrations/0001_initial.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | backend/api/migrations/0001_initial.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-01-31 13:36
from __future__ import unicode_literals
import api.models
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initi... | 45.446429 | 152 | 0.576686 |
1a4ce2ce89ce8fbc452fec1c74ab0d9fcb469662 | 16,686 | py | Python | troncli/utils.py | seancrx/tron-cli | 1507b4c650a1da0785e5515feccca6a9aa375d25 | [
"MIT"
] | 2 | 2022-02-01T02:37:09.000Z | 2022-02-13T20:18:26.000Z | troncli/utils.py | 1000WONG/tron-cli | c1e4c14096b4572d557af8da86305ba795b93b16 | [
"MIT"
] | 7 | 2019-05-14T11:13:30.000Z | 2021-12-13T20:07:12.000Z | troncli/utils.py | 1000WONG/tron-cli | c1e4c14096b4572d557af8da86305ba795b93b16 | [
"MIT"
] | 12 | 2019-12-23T11:56:47.000Z | 2022-02-01T02:36:42.000Z | #!/usr/bin/env python3
import os
import requests
import json
import sys
import psutil
import subprocess
import re
from colorama import Fore, Style, Back
from tqdm import tqdm
import urllib3
from troncli.constants import *
"""
Printing Messages
"""
def logo_simple():
print(Fore.RED + Style.BRIGHT + '')
print... | 36.672527 | 134 | 0.511926 |
1a4d1495aec7fb4bf4759ff5e580d3b892d1755c | 15,241 | py | Python | definitions/models/custom_cnn.py | jakobwoegerbauer/kagglebirds2020 | 4c3212c95d2bb11bdde659ee5ad44e00c71492a6 | [
"MIT"
] | 4 | 2020-12-27T04:59:52.000Z | 2021-03-27T00:56:35.000Z | definitions/models/custom_cnn.py | jakobwoegerbauer/kagglebirds2020 | 4c3212c95d2bb11bdde659ee5ad44e00c71492a6 | [
"MIT"
] | null | null | null | definitions/models/custom_cnn.py | jakobwoegerbauer/kagglebirds2020 | 4c3212c95d2bb11bdde659ee5ad44e00c71492a6 | [
"MIT"
] | 3 | 2021-01-30T20:03:04.000Z | 2021-08-01T13:58:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
CNN completely definable via command line arguments.
Provides create().
Author: Jan Schlüter
"""
import re
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from . import PickDictKey, PutDictKey, ReceptiveField
from .layers impor... | 41.642077 | 88 | 0.562233 |
1a4d644b05380eca9028ca6eb9a2aa483ee2ec92 | 26,387 | py | Python | lemur/tests/test_certificates.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/tests/test_certificates.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/tests/test_certificates.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals # at top of module
import datetime
import json
import arrow
import pytest
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from marshmallow import ValidationError
from freezegun import freeze_time
from mock import patch
from lemur.certifi... | 35.754743 | 199 | 0.69917 |
1a4d677b0b462dc59204812612e4bc25318a2a4b | 418 | py | Python | vaccination/vaccination_checker/models.py | Baschdl/vaccination_checker | e5efcb96a4b35dd76c2746f46b527b158fbba2c8 | [
"MIT"
] | null | null | null | vaccination/vaccination_checker/models.py | Baschdl/vaccination_checker | e5efcb96a4b35dd76c2746f46b527b158fbba2c8 | [
"MIT"
] | null | null | null | vaccination/vaccination_checker/models.py | Baschdl/vaccination_checker | e5efcb96a4b35dd76c2746f46b527b158fbba2c8 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
from django.db import models
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASC... | 26.125 | 68 | 0.763158 |
1a4d8422a46e942cb21ef5611bae9e390d037924 | 1,792 | py | Python | ngraph/transformers/passes/verify.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/transformers/passes/verify.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/transformers/passes/verify.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 Intel 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.apa... | 40.727273 | 92 | 0.617188 |
1a4dbbb5cb2767b882cc6367a72e8e1fae0c4571 | 8,652 | py | Python | openpype/hosts/blender/plugins/load/load_layout_json.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 1 | 2020-09-21T14:55:33.000Z | 2020-09-21T14:55:33.000Z | openpype/hosts/blender/plugins/load/load_layout_json.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | openpype/hosts/blender/plugins/load/load_layout_json.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | """Load a layout in Blender."""
from pathlib import Path
from pprint import pformat
from typing import Dict, Optional
import bpy
import json
from avalon import api
from avalon.blender.pipeline import AVALON_CONTAINERS
from avalon.blender.pipeline import AVALON_CONTAINER_ID
from avalon.blender.pipeline import AVALON_... | 33.276923 | 79 | 0.592233 |
1a4dc7c96fe1e01d32e7f895ae8a4013db881af7 | 1,683 | py | Python | ntm/controller.py | bhuvansingla/pytorch-ntm | 89c7f50c6cd4e3ee89dcc1a3aba15e728f1f0679 | [
"BSD-3-Clause"
] | null | null | null | ntm/controller.py | bhuvansingla/pytorch-ntm | 89c7f50c6cd4e3ee89dcc1a3aba15e728f1f0679 | [
"BSD-3-Clause"
] | null | null | null | ntm/controller.py | bhuvansingla/pytorch-ntm | 89c7f50c6cd4e3ee89dcc1a3aba15e728f1f0679 | [
"BSD-3-Clause"
] | null | null | null | """LSTM Controller."""
import torch
from torch import nn
from torch.nn import Parameter
import numpy as np
# torch.set_default_tensor_type('torch.cuda.FloatTensor')
class LSTMController(nn.Module):
"""An NTM controller based on LSTM."""
def __init__(self, num_inputs, num_outputs, num_layers):
super(LS... | 34.346939 | 94 | 0.630422 |
1a4dd4b7e41aeded1dff66c6b7df1a42af19df3e | 8,303 | py | Python | homeassistant/components/energy/sensor.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | 1 | 2021-07-31T21:08:49.000Z | 2021-07-31T21:08:49.000Z | homeassistant/components/energy/sensor.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | 27 | 2021-07-26T06:13:52.000Z | 2022-03-31T06:15:55.000Z | homeassistant/components/energy/sensor.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | 1 | 2021-04-04T22:03:57.000Z | 2021-04-04T22:03:57.000Z | """Helper sensor for calculating utility costs."""
from __future__ import annotations
from dataclasses import dataclass
from functools import partial
from typing import Any, Final, Literal, TypeVar, cast
from homeassistant.components.sensor import (
ATTR_LAST_RESET,
DEVICE_CLASS_MONETARY,
STATE_CLASS_MEAS... | 32.057915 | 88 | 0.62905 |
1a4ddcbc6a001d3195ed5e88dc0c4a7e1738bbc7 | 23,848 | py | Python | feature_space_tree/attributes/postfilter_extra.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/postfilter_extra.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/postfilter_extra.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
# Copyright (C) 2011-2012 FeatureSpaceTree Project
#
# 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
... | 37.734177 | 138 | 0.447794 |
1a4de080d158b5b57e60a93f77aa74c06a253837 | 11,819 | py | Python | roppy/depth.py | bjornaa/roppy | c10fd625d31bc734cc848ff046b9ff2145fe6cea | [
"MIT"
] | 2 | 2017-11-01T03:05:19.000Z | 2018-06-05T08:59:39.000Z | roppy/depth.py | bjornaa/roppy | c10fd625d31bc734cc848ff046b9ff2145fe6cea | [
"MIT"
] | null | null | null | roppy/depth.py | bjornaa/roppy | c10fd625d31bc734cc848ff046b9ff2145fe6cea | [
"MIT"
] | 1 | 2021-06-07T14:01:11.000Z | 2021-06-07T14:01:11.000Z | # -*- coding: utf-8 -*-
"""Vertical structure functions for ROMS
:func:`sdepth`
Depth of s-levels
:func:`zslice`
Slice a 3D field in s-coordinates to fixed depth
:func:`multi_zslice`
Slice a 3D field to several depth levels
:func:`z_average`
Vertical average of a 3D field
:func:`s_stretch`
Compute vertical ... | 27.614486 | 90 | 0.526948 |
1a4df58050b23efc732bc8ddc186f0479a907e57 | 791 | py | Python | setup.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | null | null | null | setup.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | null | null | null | setup.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | 1 | 2021-06-11T15:37:20.000Z | 2021-06-11T15:37:20.000Z | from setuptools import setup, find_packages
def readme():
with open('README.md') as f:
return f.read()
setup(name='hpfspecmatch',
version='0.1.1',
description='Matching HPF Spectra',
long_description=readme(),
url='https://github.com/gummiks/hpfspecmatch/',
author='Gudmundur ... | 34.391304 | 104 | 0.659924 |
1a4dff56c3c6fb253a9824cb8811c474c74a38dc | 42,395 | py | Python | terrascript/fortios/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/fortios/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/fortios/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/fortios/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class fortios_alertemail_setting(terrascript.Resource):
pass
class fortios_antivirus_heuristic(terras... | 17.620532 | 86 | 0.815214 |
1a4e00d6527a069d185421b2c2b3e973e19a513e | 2,136 | py | Python | src/python/pants/util/socket.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/socket.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/socket.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import errno
import ... | 38.142857 | 100 | 0.699438 |
1a4e36e7c65cf39f317f173105ce01aa4ce7d5fb | 412 | py | Python | backend/main.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/main.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/main.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | from time import time
from datetime import datetime
from apscheduler.schedulers.background import BackgroundScheduler
from app import create_flask_app
from Database.redis import check_actual_users_redis
scheduler = BackgroundScheduler()
scheduler.add_job(func=check_actual_users_redis, trigger="interval", minutes=60... | 24.235294 | 80 | 0.813107 |
1a4e38020b44b19d4a5fe2c24e9329033f2cf80c | 10,467 | py | Python | neural_tangents/tests/monte_carlo_test.py | fibercoke/neural-tangents | f5ae74533c205298022261a95aadaf6b8750d255 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-14T17:00:53.000Z | 2020-05-14T17:00:53.000Z | neural_tangents/tests/monte_carlo_test.py | fibercoke/neural-tangents | f5ae74533c205298022261a95aadaf6b8750d255 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | neural_tangents/tests/monte_carlo_test.py | fibercoke/neural-tangents | f5ae74533c205298022261a95aadaf6b8750d255 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.623616 | 80 | 0.607528 |
1a4e4f913b585a4e44da7276a8b5f88fb26ad331 | 599 | py | Python | maquinaria/alquileres/serializers/alquileres.py | CFredy9/Maquinaria | 7b55d2e882702b62cdbb11f9684ab54d9b485199 | [
"MIT"
] | null | null | null | maquinaria/alquileres/serializers/alquileres.py | CFredy9/Maquinaria | 7b55d2e882702b62cdbb11f9684ab54d9b485199 | [
"MIT"
] | null | null | null | maquinaria/alquileres/serializers/alquileres.py | CFredy9/Maquinaria | 7b55d2e882702b62cdbb11f9684ab54d9b485199 | [
"MIT"
] | null | null | null | """Serializers Alquileres"""
#Django REST Framework
from rest_framework import serializers
#Model
from maquinaria.alquileres.models import Alquiler
from maquinaria.maquinas.models import Maquina
class AlquilerModelSerializer(serializers.ModelSerializer):
"""Modelo Serializer de Cliente"""
class Meta:
"""Clase ... | 17.617647 | 59 | 0.724541 |
1a4e567ebfeee02b2caadc5fdd48c0aa7e400f10 | 261 | py | Python | trazer/__init__.py | starsoi/trazer | ca930b55c2469972abe43d80c405e3a49cdbe668 | [
"MIT"
] | null | null | null | trazer/__init__.py | starsoi/trazer | ca930b55c2469972abe43d80c405e3a49cdbe668 | [
"MIT"
] | 1 | 2021-11-28T16:59:28.000Z | 2021-11-28T16:59:28.000Z | trazer/__init__.py | starsoi/trazer | ca930b55c2469972abe43d80c405e3a49cdbe668 | [
"MIT"
] | null | null | null | from .trace import (
Trace,
TraceEventDurationBegin,
TraceEventDurationEnd,
TraceEventCounter,
TraceEventInstant,
TraceEventMetadata,
TraceEventFlowStart,
TraceEventFlowEnd,
EventChain,
)
from .analyzer import TraceAnalyzer
| 18.642857 | 35 | 0.739464 |
1a4e6d9d0768e713fd8c07f1c6ef22887033f7ae | 11,858 | py | Python | pymicro/view/vtk_anim.py | tobyfrancis/pymicro | 5c2ed0bb6990463ea6ee59586c9f59cd9b7b13ba | [
"MIT"
] | null | null | null | pymicro/view/vtk_anim.py | tobyfrancis/pymicro | 5c2ed0bb6990463ea6ee59586c9f59cd9b7b13ba | [
"MIT"
] | null | null | null | pymicro/view/vtk_anim.py | tobyfrancis/pymicro | 5c2ed0bb6990463ea6ee59586c9f59cd9b7b13ba | [
"MIT"
] | null | null | null | '''The vtk_anim module define a set of classes to generate 3d
animations with vtk in the form of a series of png images.
'''
import vtk
import os
import numpy as np
from pymicro.view.vtk_utils import set_opacity
class vtkAnimationScene:
def __init__(self, ren, ren_size=(600, 600)):
self.timer_count = ... | 35.502994 | 116 | 0.616799 |
1a4e8ddcf589b435e9a8fe1b9d1129591d36bdc9 | 12,384 | py | Python | Examples/ThorRtsm.py | UASLab/OpenFlightAnalysis | b5ecb3ea7ff82f5fb21efa7e9cbee60bf68aea37 | [
"MIT"
] | 7 | 2019-03-15T17:28:35.000Z | 2022-02-11T07:27:40.000Z | Examples/ThorRtsm.py | UASLab/OpenFlightAnalysis | b5ecb3ea7ff82f5fb21efa7e9cbee60bf68aea37 | [
"MIT"
] | null | null | null | Examples/ThorRtsm.py | UASLab/OpenFlightAnalysis | b5ecb3ea7ff82f5fb21efa7e9cbee60bf68aea37 | [
"MIT"
] | 2 | 2021-05-15T06:23:50.000Z | 2022-03-04T19:38:39.000Z | """
University of Minnesota
Aerospace Engineering and Mechanics - UAV Lab
Copyright 2019 Regents of the University of Minnesota
See: LICENSE.md for complete license details
Author: Chris Regan
Analysis for Thor RTSM
"""
#%%
# Import Libraries
import numpy as np
import matplotlib.pyplot as plt
# Hack to allow loadin... | 40.07767 | 259 | 0.627099 |
1a4e8e293b62bb826dc58bf6b4378b1c3e8acdab | 2,644 | py | Python | test/test_pmac/test_system/test_deferred_moves.py | hir12111/pmac | aaedd320e1548c085adce55edfd1183716a74f3b | [
"Apache-2.0"
] | 14 | 2016-08-24T11:18:59.000Z | 2022-03-04T02:14:11.000Z | test/test_pmac/test_system/test_deferred_moves.py | hir12111/pmac | aaedd320e1548c085adce55edfd1183716a74f3b | [
"Apache-2.0"
] | 26 | 2016-12-08T13:17:05.000Z | 2022-02-01T16:39:40.000Z | test/test_pmac/test_system/test_deferred_moves.py | hir12111/pmac | aaedd320e1548c085adce55edfd1183716a74f3b | [
"Apache-2.0"
] | 8 | 2016-10-07T12:55:38.000Z | 2020-10-20T15:58:23.000Z | from unittest import TestCase
from test.brick.movemonitor import MoveMonitor
from test.brick.testbrick import TBrick, DECIMALS
from cothread import Sleep
from datetime import datetime
# These tests verify deferred moves
class TestDeferred(TestCase):
def test_cs_defer(self):
"""
check timed deferre... | 33.468354 | 81 | 0.615734 |
1a4ec1f7eb0580c0305cde2303c8720baec5993d | 901 | py | Python | AlgorithmsPractice/python/67_easy_Add Binary.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | AlgorithmsPractice/python/67_easy_Add Binary.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | AlgorithmsPractice/python/67_easy_Add Binary.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | """
Given two binary strings, return their sum (also a binary string).
The input strings are both non-empty and contains only characters 1 or 0.
Example 1:
Input: a = "11", b = "1"
Output: "100"
Example 2:
Input: a = "1010", b = "1011"
Output: "10101"
"""
# 2018-6-23
# Add Binary
class Solution:
def addBinary(s... | 19.586957 | 73 | 0.496115 |
1a4ec4ce457710a3de7e6447ebc8e965dfce5ed4 | 3,454 | py | Python | plan2explore/control/planning.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/control/planning.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/control/planning.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | # Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore 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... | 40.635294 | 107 | 0.712218 |
1a4ee0f701305ba18e9c737f4c236dadcf014a0c | 2,011 | py | Python | cities_light/migrations/0002_city.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | 4 | 2015-10-05T09:20:35.000Z | 2019-07-30T17:47:03.000Z | cities_light/migrations/0002_city.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | 1 | 2020-01-25T13:02:17.000Z | 2020-01-25T13:02:17.000Z | cities_light/migrations/0002_city.py | gpichot/django-cities-light | d0e5891fd7505c588e39304b961de96aeef7dfb5 | [
"MIT"
] | 2 | 2019-11-29T15:55:46.000Z | 2020-01-08T09:06:33.000Z | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
import autoslug.fields
import cities_light.models
class Migration(migrations.Migration):
dependencies = [
('cities_light', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 46.767442 | 128 | 0.597713 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.