hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 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 4 247 | max_forks_repo_name stringlengths 4 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8a26904370270bb9ef3f9739a127a6f42fb2fd42 | 1,954 | py | Python | 25-Scheme/lab09/lab09/tests/composed.py | ericchen12377/CS61A_LearningDoc | 31f23962b0e2834795bf61eeb0f4884cc5da1809 | [
"MIT"
] | 2 | 2020-04-24T18:36:53.000Z | 2020-04-25T00:15:55.000Z | 25-Scheme/lab09/lab09/tests/composed.py | ericchen12377/CS61A_LearningDoc | 31f23962b0e2834795bf61eeb0f4884cc5da1809 | [
"MIT"
] | null | null | null | 25-Scheme/lab09/lab09/tests/composed.py | ericchen12377/CS61A_LearningDoc | 31f23962b0e2834795bf61eeb0f4884cc5da1809 | [
"MIT"
] | null | null | null | test = {
'name': 'composed',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
scm> ((composed add-one add-one) 2)
a1e11865670a42d05e20b9a3455dc457
# locked
""",
'hidden': False,
'locked': True
},
{
... | 23.829268 | 72 | 0.420676 | test = {
'name': 'composed',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
scm> ((composed add-one add-one) 2)
a1e11865670a42d05e20b9a3455dc457
# locked
""",
'hidden': False,
'locked': True
},
{
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cde1909da181e5ecc25ad5f5fd545a95d8f60d11 | 2,580 | py | Python | src/visualize.py | Mirofil/RobustDARTS | da8654f63c89b28207c1253bdc6ad20222e99c9d | [
"Apache-2.0"
] | 151 | 2019-09-25T06:25:38.000Z | 2022-02-05T04:35:11.000Z | src/visualize.py | Mirofil/RobustDARTS | da8654f63c89b28207c1253bdc6ad20222e99c9d | [
"Apache-2.0"
] | 6 | 2019-12-27T08:10:22.000Z | 2020-11-10T16:01:20.000Z | src/visualize.py | Mirofil/RobustDARTS | da8654f63c89b28207c1253bdc6ad20222e99c9d | [
"Apache-2.0"
] | 39 | 2019-09-26T07:14:08.000Z | 2021-12-27T10:20:27.000Z | import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print("usage:\n python {} ARCH_NAME".format(sys.argv[0]))
sys.exit(1)
genotype_name = sys.argv[1]
try:
genotype = eval('genotypes.{}'.format(genotype_name))
except AttributeError:
print("{} is not specified in genotypes.py".format... | 26.326531 | 141 | 0.60969 | import sys
import genotypes
from graphviz import Digraph
from genotypes import PRIMITIVES
def plot_space(primitives, filename):
g = Digraph(
format='pdf',
edge_attr=dict(fontsize='20', fontname="times"),
node_attr=dict(style='filled', shape='rect', align='center', fontsize='20', height='0.5', widt... | 0 | 0 | 0 | 0 | 0 | 1,882 | 0 | 13 | 112 |
f86649417dde7d4997f359927c0844d691b94fbb | 845 | py | Python | app/backend/meridien/settings/local.py | NicholasCF/meridien | dd00caf341d4c9979b89dc8441224ff2b97eac7f | [
"MIT"
] | null | null | null | app/backend/meridien/settings/local.py | NicholasCF/meridien | dd00caf341d4c9979b89dc8441224ff2b97eac7f | [
"MIT"
] | 41 | 2020-05-24T06:47:53.000Z | 2022-02-27T11:10:41.000Z | app/backend/meridien/settings/local.py | NicholasCF/meridien | dd00caf341d4c9979b89dc8441224ff2b97eac7f | [
"MIT"
] | 2 | 2020-11-26T12:19:30.000Z | 2020-12-19T01:14:02.000Z |
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8ka@=25ffr7377i_s*$$6n_=sepb1jpwhrbbgviphal7q=(3zz'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
'default': {... | 24.142857 | 66 | 0.67574 | from meridien.settings.base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8ka@=25ffr7377i_s*$$6n_=sepb1jpwhrbbgviphal7q=(3zz'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#dat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 22 |
7c9f348b03d42a72fc76f0d7f884d0b24a4362d0 | 807 | py | Python | Easy/StringMatching.py | revanthsenthil/dCoder_select | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | 1 | 2021-08-03T21:23:08.000Z | 2021-08-03T21:23:08.000Z | Easy/StringMatching.py | revanthsenthil/dCoder-Solved | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | null | null | null | Easy/StringMatching.py | revanthsenthil/dCoder-Solved | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | 1 | 2021-04-22T09:20:12.000Z | 2021-04-22T09:20:12.000Z | """
Problem Description:
Cody has a sequence of characters N. He likes a sequence if it contains his favourite sequence as a substring.
Given the sequence and his favourite sequence F, check whether the favourite sequence is present in the sequence.
Input:
The first line of input contains a single line T, which repres... | 23.057143 | 113 | 0.716233 | """
Problem Description:
Cody has a sequence of characters N. He likes a sequence if it contains his favourite sequence as a substring.
Given the sequence and his favourite sequence F, check whether the favourite sequence is present in the sequence.
Input:
The first line of input contains a single line T, which repres... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
03987ead140b81c6c957329556d3dd9eb6b94c02 | 3,079 | py | Python | SLB.py | kinglionsoft/ali-ecs | 8a7cd902dc0c691ba486585c42b80043da4a1597 | [
"MIT"
] | null | null | null | SLB.py | kinglionsoft/ali-ecs | 8a7cd902dc0c691ba486585c42b80043da4a1597 | [
"MIT"
] | null | null | null | SLB.py | kinglionsoft/ali-ecs | 8a7cd902dc0c691ba486585c42b80043da4a1597 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
Sample.main(['<accessKeyId>', '<accessSecret>', '<region>', 'acl-id']) | 33.467391 | 119 | 0.634622 | # -*- coding: utf-8 -*-
import sys
from typing import List
import requests
from alibabacloud_slb20140515.client import Client as Slb20140515Client
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_slb20140515 import models as slb_20140515_models
class Sample:
def __init__(self):
... | 48 | 2,547 | 0 | 110 | 0 | 0 | 0 | 121 | 157 |
e47cd2291ace2b554a9ac4ba430c9bd2a9575e07 | 7,555 | py | Python | Robovest/robovest.py | yingluwang/Fin-Tech_Intelligent-Portforlio-Recommendation | 7e1ef0ecc71d8335d25d5c2c5f219b5c5f9cdb66 | [
"MIT"
] | 2 | 2017-10-08T11:06:28.000Z | 2019-06-10T07:43:46.000Z | Robovest/robovest.py | yingluwang/Fin-Tech_Intelligent-Portforlio-Recommendation | 7e1ef0ecc71d8335d25d5c2c5f219b5c5f9cdb66 | [
"MIT"
] | 1 | 2020-06-05T18:10:52.000Z | 2020-06-05T18:10:52.000Z | Robovest/robovest.py | yingluwang/Fin-Tech_Intelligent-Portforlio-Recommendation | 7e1ef0ecc71d8335d25d5c2c5f219b5c5f9cdb66 | [
"MIT"
] | 1 | 2018-06-13T02:49:22.000Z | 2018-06-13T02:49:22.000Z | # all the imports
#nltk.download()
import tweepy
import os
import sqlite3
import datetime
from flask import Flask, g
app = Flask(__name__) # create the application instance :)
app.config.from_object(__name__) # load config from this file , flaskr.py
tickers = ["MINT","EMB","IAU","VCIT","MUB","SCHA","VEA","VYM","SC... | 31.348548 | 401 | 0.647386 | # all the imports
import psycopg2
import nltk
from robovest.portfolio import*
#nltk.download()
import tweepy
import os
import sqlite3
import datetime
import numpy as np
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from flask import Flask, request, session, g, redirect, url_for, abort, \
render_templ... | 0 | 2,445 | 0 | 0 | 0 | 2,829 | 0 | 104 | 478 |
72c35ea74260260a0e6d310370bc1e461a820f05 | 6,051 | py | Python | metadata-ingestion/src/datahub/ingestion/sink/datahub_rest.py | LucaBassanesecuebiq/datahub | f659cc89388cc6322795c7ba7758d65775a7dedf | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/sink/datahub_rest.py | LucaBassanesecuebiq/datahub | f659cc89388cc6322795c7ba7758d65775a7dedf | [
"Apache-2.0"
] | 1 | 2022-02-02T17:26:16.000Z | 2022-02-02T17:26:16.000Z | metadata-ingestion/src/datahub/ingestion/sink/datahub_rest.py | liftoffio/datahub | ff163059587a137a22fa0c655f568a40eda44236 | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 39.03871 | 97 | 0.632788 | import concurrent.futures
import functools
import logging
from dataclasses import dataclass
from typing import Union, cast
from datahub.cli.cli_utils import set_env_variables_override_config
from datahub.configuration.common import OperationalError
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from dat... | 0 | 4,997 | 0 | 37 | 0 | 0 | 0 | 561 | 400 |
9c43110fdc192b45c3d8ed5df71194250983b1d9 | 63 | py | Python | django_project/kv_settings/__init__.py | eshandas/django_key_value_settings | 70ba8c0877f4b59cb66e69507b1e78bbd62f7e65 | [
"MIT"
] | null | null | null | django_project/kv_settings/__init__.py | eshandas/django_key_value_settings | 70ba8c0877f4b59cb66e69507b1e78bbd62f7e65 | [
"MIT"
] | 7 | 2020-06-06T00:25:53.000Z | 2022-03-12T00:03:44.000Z | kv_settings/__init__.py | eshandas/django_key_value_settings | 70ba8c0877f4b59cb66e69507b1e78bbd62f7e65 | [
"MIT"
] | null | null | null | default_app_config = 'kv_settings.apps.KeyValueSettingsConfig'
| 31.5 | 62 | 0.873016 | default_app_config = 'kv_settings.apps.KeyValueSettingsConfig'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
794b4ed15c8f93c479bec99b65b51a11d39732e7 | 377 | py | Python | flows/models.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 104 | 2015-01-05T14:29:16.000Z | 2021-11-08T11:20:24.000Z | flows/models.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 4 | 2015-09-23T11:14:50.000Z | 2020-03-21T06:08:34.000Z | flows/models.py | sergioisidoro/django-flows | 326baa3e216a15bd7a8d13b2a09ba9752e250dbb | [
"BSD-2-Clause"
] | 16 | 2015-01-05T10:13:44.000Z | 2022-02-14T05:21:23.000Z | # -*- coding: UTF-8 -*-
# Note: this is mainly required because using the Django test runner
# requires that apps under test have a 'models' module, even if it's
# just empty.
from flows import config
if config.FLOWS_STATE_STORE == 'flows.statestore.django_store': | 37.7 | 109 | 0.763926 | # -*- coding: UTF-8 -*-
# Note: this is mainly required because using the Django test runner
# requires that apps under test have a 'models' module, even if it's
# just empty.
from flows import config
if config.FLOWS_STATE_STORE == 'flows.statestore.django_store':
from flows.statestore.django_store import StateM... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 79 |
b1c9d24c4d92140fd0fc0bd73cab307649f1602b | 439 | py | Python | Thread_Socket/Thread-Multiprocess.py | dumin199101/Scrapy-Project | b4135beb73a2c5aad1728f747c1856266af649dd | [
"Apache-2.0"
] | 1 | 2019-07-11T03:28:25.000Z | 2019-07-11T03:28:25.000Z | Thread_Socket/Thread-Multiprocess.py | dumin199101/Scrapy-Project | b4135beb73a2c5aad1728f747c1856266af649dd | [
"Apache-2.0"
] | null | null | null | Thread_Socket/Thread-Multiprocess.py | dumin199101/Scrapy-Project | b4135beb73a2c5aad1728f747c1856266af649dd | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
"""
multiprocessing
"""
import os
from multiprocessing import Process
#
if __name__ == '__main__':
print('Parent process %s.'% os.getpid())
for i in range(5):
p = Process(target=run_proc,args=(str(i),))
print('Process will start.')
p.start()
p.join()
print('Proc... | 23.105263 | 65 | 0.626424 | # coding=utf-8
"""
使用multiprocessing模块创建多进程
"""
import os
from multiprocessing import Process
# 子进程要执行的代码
def run_proc(name):
print('Child progress %s (%s) Running...'%(name,os.getpid()))
if __name__ == '__main__':
print('Parent process %s.'% os.getpid())
for i in range(5):
p = Process(target=run_... | 54 | 0 | 0 | 0 | 0 | 64 | 0 | 0 | 22 |
874402dc3739cdffb2a6dc31b45049338e340ffd | 5,258 | py | Python | web/server/views.py | p-schlickmann/proffy-app | 2c8edb3195993e29f2c4033eed1f330ea79a5cd6 | [
"MIT"
] | null | null | null | web/server/views.py | p-schlickmann/proffy-app | 2c8edb3195993e29f2c4033eed1f330ea79a5cd6 | [
"MIT"
] | null | null | null | web/server/views.py | p-schlickmann/proffy-app | 2c8edb3195993e29f2c4033eed1f330ea79a5cd6 | [
"MIT"
] | null | null | null |
# Create your views here.
| 33.922581 | 132 | 0.579498 | from django.shortcuts import render
import time
import datetime
from server import models
# Create your views here.
def index(request):
return render(request, "server/index.html")
def study(request):
return render(request, "server/study.html", {
'proffys': models.Teacher.objects.all()
})
de... | 22 | 0 | 0 | 0 | 0 | 4,984 | 0 | 2 | 227 |
06f067b36da9ed63fc57904f7389ad728f45b423 | 425 | py | Python | setup.py | rlugojr/pygments-snowball | 4d9b086f4e2f81a3cd351c1fd2eaddf0d20abee9 | [
"BSD-2-Clause"
] | 2 | 2018-03-01T05:38:42.000Z | 2021-02-08T15:49:59.000Z | setup.py | rlugojr/pygments-snowball | 4d9b086f4e2f81a3cd351c1fd2eaddf0d20abee9 | [
"BSD-2-Clause"
] | 1 | 2015-10-09T04:33:10.000Z | 2015-10-09T04:33:10.000Z | setup.py | rlugojr/pygments-snowball | 4d9b086f4e2f81a3cd351c1fd2eaddf0d20abee9 | [
"BSD-2-Clause"
] | 2 | 2015-10-09T00:23:46.000Z | 2017-02-20T06:28:33.000Z | from setuptools import setup
setup(
name="Pygments Snowball Plugin",
version = "1.0",
scripts = ['pygments_snowball.py'],
entry_points = """
[pygments.lexers]
snowball_lexer = pygments_snowball:SnowballLexer
""",
description = 'Pygments Lexer Plugin for Snowball',
license = '... | 28.333333 | 56 | 0.649412 | from setuptools import setup
setup(
name="Pygments Snowball Plugin",
version = "1.0",
scripts = ['pygments_snowball.py'],
entry_points = """
[pygments.lexers]
snowball_lexer = pygments_snowball:SnowballLexer
""",
description = 'Pygments Lexer Plugin for Snowball',
license = '... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6f8359d5ef293b0acd6612a7956555e5aaa066b7 | 2,664 | py | Python | GSAS-II-WONDER/imports/G2img_Rigaku.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | GSAS-II-WONDER/imports/G2img_Rigaku.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | GSAS-II-WONDER/imports/G2img_Rigaku.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
########### SVN repository information ###################
# $Date: 2017-10-23 11:39:16 -0500 (Mon, 23 Oct 2017) $
# $Author: vondreele $
# $Revision: 3136 $
# $URL: https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2img_Rigaku.py $
# $Id: G2img_Rigaku.py 3136 2017-10-23 16:39:16Z vondre... | 34.597403 | 106 | 0.596471 | # -*- coding: utf-8 -*-
########### SVN repository information ###################
# $Date: 2017-10-23 11:39:16 -0500 (Mon, 23 Oct 2017) $
# $Author: vondreele $
# $Revision: 3136 $
# $URL: https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2img_Rigaku.py $
# $Id: G2img_Rigaku.py 3136 2017-10-23 16:39:16Z vondre... | 0 | 0 | 0 | 984 | 0 | 0 | 0 | 4 | 44 |
0119dceea660beaed65024aa33059b7c1e1cc25a | 1,889 | py | Python | src/m6_your_turtles.py | shaneecho/01-IntroductionToPython | 4bd03dd0631b24a8a58c6709c05c73eea9dc1567 | [
"MIT"
] | null | null | null | src/m6_your_turtles.py | shaneecho/01-IntroductionToPython | 4bd03dd0631b24a8a58c6709c05c73eea9dc1567 | [
"MIT"
] | null | null | null | src/m6_your_turtles.py | shaneecho/01-IntroductionToPython | 4bd03dd0631b24a8a58c6709c05c73eea9dc1567 | [
"MIT"
] | null | null | null | """
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Aaron Wilkin, their colleagues, and Shixin Yan.
"""
########################################################################
# DONE: 1.
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your o... | 31.483333 | 73 | 0.586024 | """
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Aaron Wilkin, their colleagues, and Shixin Yan.
"""
########################################################################
# DONE: 1.
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your o... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ccb90990658e51c1364711573c5224ef470491c3 | 2,810 | py | Python | script/MakeRef.py | weefuzzy/flucoma-docs | bc7cc6b9f4f2b35ba20659a894590fa1879a34f7 | [
"BSD-3-Clause"
] | 2 | 2020-09-03T21:24:14.000Z | 2020-09-30T07:54:41.000Z | script/MakeRef.py | weefuzzy/flucoma-docs | bc7cc6b9f4f2b35ba20659a894590fa1879a34f7 | [
"BSD-3-Clause"
] | 66 | 2021-06-10T10:29:26.000Z | 2022-03-29T11:24:16.000Z | script/MakeRef.py | weefuzzy/flucoma-docs | bc7cc6b9f4f2b35ba20659a894590fa1879a34f7 | [
"BSD-3-Clause"
] | 4 | 2021-06-24T12:06:05.000Z | 2021-09-20T10:48:54.000Z | # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
# Copyright 2017-2019 University of Huddersfield.
# Licensed under the BSD-3 License.
# See license.md file in the project root for full license information.
# This project has received funding from the European Research Council (ERC)
# under the... | 33.855422 | 119 | 0.677224 | # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
# Copyright 2017-2019 University of Huddersfield.
# Licensed under the BSD-3 License.
# See license.md file in the project root for full license information.
# This project has received funding from the European Research Council (ERC)
# under the... | 3 | 0 | 0 | 0 | 0 | 832 | 0 | -5 | 67 |
04d616b61bd8c5c92992d7d948f74bfe17e96634 | 1,535 | py | Python | api/migrations/0003_auto_20161111_2324.py | gdelnegro/orders_api | e6cc45e0b486ae5bb50c095174f251a941733d6b | [
"MIT"
] | null | null | null | api/migrations/0003_auto_20161111_2324.py | gdelnegro/orders_api | e6cc45e0b486ae5bb50c095174f251a941733d6b | [
"MIT"
] | null | null | null | api/migrations/0003_auto_20161111_2324.py | gdelnegro/orders_api | e6cc45e0b486ae5bb50c095174f251a941733d6b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-11 23:24
from __future__ import unicode_literals
| 39.358974 | 136 | 0.607818 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-11 23:24
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0002_auto_20161111_2309'),
]
operations = [... | 0 | 0 | 0 | 1,323 | 0 | 0 | 0 | 30 | 68 |
fa31827beee52528e022c7012ef90988bb621e78 | 23,958 | py | Python | ppci/binutils/linker.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | null | null | null | ppci/binutils/linker.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | null | null | null | ppci/binutils/linker.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 1 | 2021-11-23T14:23:04.000Z | 2021-11-23T14:23:04.000Z | """ Linker utility. """
from .objectfile import get_object
from .layout import get_layout
from .archive import get_archive
def link(
objects,
layout=None,
use_runtime=False,
partial_link=False,
reporter=None,
debug=False,
extra_symbols=None,
libraries=None,
entry=None,
):
""" L... | 37.086687 | 79 | 0.570457 | """ Linker utility. """
import logging
from collections import defaultdict
from .objectfile import ObjectFile, Image, get_object, RelocationEntry
from ..common import CompilerError
from .layout import Layout, Section, SectionData, SymbolDefinition, Align
from .layout import get_layout
from .debuginfo import SymbolIdAd... | 0 | 0 | 0 | 21,551 | 0 | 0 | 0 | 148 | 134 |
dfe16477368e24a4f2172694856b8591a7539edf | 511 | py | Python | rest_api/api/models.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | 1 | 2021-11-25T00:02:36.000Z | 2021-11-25T00:02:36.000Z | rest_api/api/models.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | null | null | null | rest_api/api/models.py | markbirds/Django-Code-Repo | b55762d2dab00640acf2e8e00ddc66716d53c6b5 | [
"MIT"
] | null | null | null |
# Create your models here.
| 36.5 | 101 | 0.737769 | from django.db import models
import uuid
# Create your models here.
class User(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=50)
age = models.IntegerField()
language = models.CharField(null=True,max_length=50,verbose_name="... | 0 | 0 | 0 | 420 | 0 | 0 | 0 | -3 | 66 |
d4c139e44c9983284d65e44c0b0cfcc570e4e8b9 | 140 | py | Python | setup.py | SaradhaVenkatachalapathy/annotate_images | fd10672909211d87c24e5e3eedaebb1f5d3ebda3 | [
"MIT"
] | 1 | 2021-08-06T18:40:14.000Z | 2021-08-06T18:40:14.000Z | setup.py | SaradhaVenkatachalapathy/annotate_images | fd10672909211d87c24e5e3eedaebb1f5d3ebda3 | [
"MIT"
] | 1 | 2021-08-19T10:54:47.000Z | 2021-08-19T11:03:00.000Z | setup.py | SaradhaVenkatachalapathy/annotate_images | fd10672909211d87c24e5e3eedaebb1f5d3ebda3 | [
"MIT"
] | 1 | 2021-08-11T11:41:48.000Z | 2021-08-11T11:41:48.000Z | from setuptools import setup
setup(
name='interactive_segmentation',
version='1.0',
packages=['annotate'],
license='MIT'
)
| 15.555556 | 36 | 0.664286 | from setuptools import setup
setup(
name='interactive_segmentation',
version='1.0',
packages=['annotate'],
license='MIT'
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
daa7d26d703b2e6fd2855c3dde932b88c4d35034 | 69,842 | py | Python | ai4water/datasets/camels.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | ai4water/datasets/camels.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | ai4water/datasets/camels.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | import os
try:
import xarray as xr
except ModuleNotFoundError:
xr = None
try: # shapely may not be installed, as it may be difficult to isntall and is only needed for plotting data.
from ai4water.pre_processing.spatial_utils import plot_shapefile
except ModuleNotFoundError:
plot_shapefile = None
# d... | 40.001145 | 204 | 0.57328 | import json
import os
import glob
import random
from typing import Union
try:
import xarray as xr
except ModuleNotFoundError:
xr = None
import numpy as np
import pandas as pd
from .datasets import Datasets
from .utils import check_attributes, download, sanity_check
from ai4water.utils.utils import dateandtim... | 0 | 6,923 | 0 | 61,872 | 0 | 211 | 0 | 44 | 430 |
788a6282addf87f71248819c2eb6fdbf03f86fd6 | 981 | py | Python | Algorithms/1302_Deepest_Leaves_Sum/Python/Deepest_Leaves_Sum_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null | Algorithms/1302_Deepest_Leaves_Sum/Python/Deepest_Leaves_Sum_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null | Algorithms/1302_Deepest_Leaves_Sum/Python/Deepest_Leaves_Sum_Solution_1.py | lht19900714/Leetcode_Solutions | dac7a038329a5c1f8a78e86cc6f49116b963f1fb | [
"MIT"
] | null | null | null |
# Space: O(n)
# Time: O(n)
# BFS approach
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
| 25.815789 | 73 | 0.56473 |
# Space: O(n)
# Time: O(n)
# BFS approach
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def deepestLeavesSum(self, root):
if root is None: ret... | 0 | 0 | 0 | 716 | 0 | 0 | 0 | 0 | 23 |
f31b4a03f3a15378101968d030a27d2340c106bf | 179 | py | Python | configs/TCCC_roi/faster_rcnn_r50_fpn_1x_voc_gc_RoiCC.py | LeoXuZH/CervicalCancerDetection | 0ce682f01c9a428eb73170151c2d8d9efc6ce44f | [
"Apache-2.0"
] | null | null | null | configs/TCCC_roi/faster_rcnn_r50_fpn_1x_voc_gc_RoiCC.py | LeoXuZH/CervicalCancerDetection | 0ce682f01c9a428eb73170151c2d8d9efc6ce44f | [
"Apache-2.0"
] | null | null | null | configs/TCCC_roi/faster_rcnn_r50_fpn_1x_voc_gc_RoiCC.py | LeoXuZH/CervicalCancerDetection | 0ce682f01c9a428eb73170151c2d8d9efc6ce44f | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/faster_rcnn_r50_fpn_gc.py',
'../_base_/datasets/voc0712_RoiCC.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
| 29.833333 | 72 | 0.681564 | _base_ = [
'../_base_/models/faster_rcnn_r50_fpn_gc.py',
'../_base_/datasets/voc0712_RoiCC.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
00761be2a204eeefb6ca144d14a0ec9670218b4d | 222 | py | Python | pincer/middleware/voice_state_update.py | ashu96902/Pincer | 102ac4ff998cbb3c57a86b252439f69895650cf3 | [
"MIT"
] | null | null | null | pincer/middleware/voice_state_update.py | ashu96902/Pincer | 102ac4ff998cbb3c57a86b252439f69895650cf3 | [
"MIT"
] | null | null | null | pincer/middleware/voice_state_update.py | ashu96902/Pincer | 102ac4ff998cbb3c57a86b252439f69895650cf3 | [
"MIT"
] | null | null | null | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
"""
sent when a user's voice state changes in a subscribed voice channel
(mute, volume, etc.)
"""
# TODO: Implement event
| 22.2 | 68 | 0.72973 | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
"""
sent when a user's voice state changes in a subscribed voice channel
(mute, volume, etc.)
"""
# TODO: Implement event
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e7ed449e36683dcf73ec74879466f4e527de66a | 1,902 | py | Python | hdash/validator/categories.py | inodb/hdash | 829ffbe856af17876343bc81f577fa7ee2118784 | [
"MIT"
] | null | null | null | hdash/validator/categories.py | inodb/hdash | 829ffbe856af17876343bc81f577fa7ee2118784 | [
"MIT"
] | 2 | 2021-05-24T17:15:45.000Z | 2022-03-09T21:44:32.000Z | hdash/validator/categories.py | inodb/hdash | 829ffbe856af17876343bc81f577fa7ee2118784 | [
"MIT"
] | 1 | 2021-11-16T23:15:47.000Z | 2021-11-16T23:15:47.000Z | """Meta Data Categories."""
| 44.232558 | 74 | 0.730284 | """Meta Data Categories."""
class Categories:
"""Meta Data Categories."""
BIOSPECIMEN = "Biospecimen"
DEMOGRAPHICS = "Demographics"
SC_RNA_SEQ_LEVEL_1 = "ScRNA-seqLevel1"
SC_RNA_SEQ_LEVEL_2 = "ScRNA-seqLevel2"
SC_RNA_SEQ_LEVEL_3 = "ScRNA-seqLevel3"
SC_RNA_SEQ_LEVEL_4 = "ScRNA-seqLevel4"
... | 0 | 0 | 0 | 1,850 | 0 | 0 | 0 | 0 | 23 |
200cb2c5a57c4fc4b5cd824529333ee8154744d2 | 7,526 | py | Python | oidc_provider/lib/endpoints/token.py | vvandriichuk/django-oidc-provider | 557da7747a75d9874520bd7016292bb2a1b9530e | [
"MIT"
] | null | null | null | oidc_provider/lib/endpoints/token.py | vvandriichuk/django-oidc-provider | 557da7747a75d9874520bd7016292bb2a1b9530e | [
"MIT"
] | 1 | 2020-06-05T16:38:28.000Z | 2020-06-05T16:38:28.000Z | oidc_provider/lib/endpoints/token.py | vvandriichuk/django-oidc-provider | 557da7747a75d9874520bd7016292bb2a1b9530e | [
"MIT"
] | null | null | null | import logging
try:
from urllib.parse import unquote
except ImportError:
logger = logging.getLogger(__name__)
| 35.838095 | 99 | 0.591682 | from base64 import b64decode, urlsafe_b64encode
import hashlib
import logging
import re
try:
from urllib.parse import unquote
except ImportError:
from urllib import unquote
from django.http import JsonResponse
from oidc_provider.lib.errors import *
from oidc_provider.lib.utils.params import *
from oidc_provid... | 0 | 264 | 0 | 6,781 | 0 | 0 | 0 | 115 | 249 |
530b502e6aa2c70390c46473f414abb8baf75464 | 1,956 | py | Python | currency_crawler.py | ingyunson/automation | 047eb286cc740127d4136008fbd398916d200365 | [
"MIT"
] | null | null | null | currency_crawler.py | ingyunson/automation | 047eb286cc740127d4136008fbd398916d200365 | [
"MIT"
] | 6 | 2018-09-05T10:19:47.000Z | 2018-10-30T14:09:55.000Z | currency_crawler.py | ingyunson/automation | 047eb286cc740127d4136008fbd398916d200365 | [
"MIT"
] | null | null | null |
# API
if __name__ == '__main__':
main() | 36.222222 | 127 | 0.615031 | import requests
import datetime
import json
import telegram
#공공 오픈 API를 이용하여 외환 정보 받아오기
def api_set(day):
date = day.strftime('%Y-%m-%d')
api_key = <API KEY>
api = 'https://www.koreaexim.go.kr/site/program/financial/exchangeJSON?authkey={key}&searchdate={date}&data={data}'.format(
key=api_key, date... | 792 | 0 | 0 | 0 | 0 | 1,535 | 0 | -28 | 133 |
15ce68266b98edbf7b79be1b0e0552cbef73bde7 | 58 | py | Python | examples/conditionally_existing_if_else.py | doboy/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 7 | 2016-09-23T00:44:05.000Z | 2021-10-04T21:19:12.000Z | examples/conditionally_existing_if_else.py | jameswu1991/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 1 | 2016-09-23T00:45:05.000Z | 2019-02-16T19:05:37.000Z | examples/conditionally_existing_if_else.py | jameswu1991/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 3 | 2016-09-23T01:13:15.000Z | 2018-07-20T21:22:17.000Z | if False:
x = 3
elif False:
y = 4
else:
z = 5
| 8.285714 | 11 | 0.448276 | if False:
x = 3
elif False:
y = 4
else:
z = 5
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8e7d46b5fca05f2d980aad7c45a2c48983d7444b | 15 | py | Python | src/spacefarer/shared.py | gaming32/SpaceFarer | 04a8631bc8029202fdb4b87d290dbe27504cb0c1 | [
"MIT"
] | null | null | null | src/spacefarer/shared.py | gaming32/SpaceFarer | 04a8631bc8029202fdb4b87d290dbe27504cb0c1 | [
"MIT"
] | null | null | null | src/spacefarer/shared.py | gaming32/SpaceFarer | 04a8631bc8029202fdb4b87d290dbe27504cb0c1 | [
"MIT"
] | null | null | null | delta_time = 0
| 7.5 | 14 | 0.733333 | delta_time = 0
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bca2078d279bbc04061518cca958f9f61c6dc73a | 1,380 | py | Python | beacontools/structs/eddystone.py | pibico/beacontools | 513e1c7ff2aaf74b6c7d7b10805c2f6ca4384e3d | [
"MIT"
] | 139 | 2017-06-09T17:15:23.000Z | 2022-03-15T03:02:17.000Z | beacontools/structs/eddystone.py | pibico/beacontools | 513e1c7ff2aaf74b6c7d7b10805c2f6ca4384e3d | [
"MIT"
] | 71 | 2017-06-20T03:20:56.000Z | 2022-02-13T22:47:53.000Z | beacontools/structs/eddystone.py | pibico/beacontools | 513e1c7ff2aaf74b6c7d7b10805c2f6ca4384e3d | [
"MIT"
] | 59 | 2017-06-20T03:10:00.000Z | 2022-03-15T23:54:44.000Z | """All low level structures used for parsing eddystone packets."""
from construct import Struct, Byte, Switch, OneOf, Int8sl, Array, GreedyString, Int16ub, Int16ul, Int32ub
from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLM_UNENCRYPTED, EDDYSTONE_TLM_ENCRYPTED
# pylint: disable=invalid-name
EddystoneUIDFrame =... | 28.163265 | 93 | 0.681884 | """All low level structures used for parsing eddystone packets."""
from construct import Struct, Byte, Switch, OneOf, Int8sl, Array, \
GreedyString, Int16ub, Int16ul, Int32ub
from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLM_UNENCRYPTED, EDDYSTONE_TLM_ENCRYPTED
# pylint: disable=invalid-n... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0 |
260163c0f4d9697942b0734e2f470c20101143d0 | 2,887 | py | Python | interpreter.py | amupxm/python_simple_interpreter | 120e387947889cb3707dd33a019eeb6fb99fc6aa | [
"MIT"
] | 2 | 2021-06-05T08:33:19.000Z | 2021-08-10T11:40:06.000Z | interpreter.py | amupxm/python_simple_interpreter | 120e387947889cb3707dd33a019eeb6fb99fc6aa | [
"MIT"
] | null | null | null | interpreter.py | amupxm/python_simple_interpreter | 120e387947889cb3707dd33a019eeb6fb99fc6aa | [
"MIT"
] | null | null | null | #read the program.amup file
raw_file = open("program.amup", "r")
#make empty structure of program
arr = {
"target": "",
"sec_target": "",
"thr_target": "",
"operator": "+",
"A": 0,
"B": 0,
"C": 0,
"D": 0
}
#make empty list of converted to C++ language program
lines = []
#simple functio... | 35.641975 | 98 | 0.420159 | #read the program.amup file
raw_file = open("program.amup", "r")
#make empty structure of program
arr = {
"target": "",
"sec_target": "",
"thr_target": "",
"operator": "+",
"A": 0,
"B": 0,
"C": 0,
"D": 0
}
#make empty list of converted to C++ language program
lines = []
#simple functio... | 0 | 0 | 0 | 0 | 0 | 30 | 0 | 0 | 22 |
f1328c631185034d32e2da1e415c4d60d40d6d58 | 4,081 | py | Python | tests/test_s3.py | mrslow/yandex-s3 | 560a901d8f5c636e268cd2a9f8a2a72841f2cf7e | [
"MIT"
] | 2 | 2021-08-20T15:24:03.000Z | 2021-08-24T14:34:22.000Z | tests/test_s3.py | mrslow/yandex-s3 | 560a901d8f5c636e268cd2a9f8a2a72841f2cf7e | [
"MIT"
] | null | null | null | tests/test_s3.py | mrslow/yandex-s3 | 560a901d8f5c636e268cd2a9f8a2a72841f2cf7e | [
"MIT"
] | null | null | null |
from datetime import datetime
from uuid import uuid4
base_url = 'https://test-bucket.storage.yandexcloud.net'
list_data = (
b'<?xml version="1.0" encoding="UTF-8"?>\n'
b'<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">\n'
b' <Name>flk-test-bucket</Name>\n'
b' <Prefix></Prefix>\n'
... | 29.359712 | 76 | 0.620926 | import pytest
from datetime import datetime
from uuid import uuid4
from s3.core import RequestError
base_url = 'https://test-bucket.storage.yandexcloud.net'
list_data = (
b'<?xml version="1.0" encoding="UTF-8"?>\n'
b'<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">\n'
b' <Name>flk-tes... | 0 | 1,421 | 0 | 0 | 0 | 0 | 0 | 3 | 137 |
b21ef3bf467586a5e88eaddad0cbe0a6c0b4f4fb | 2,719 | py | Python | RBFN_bash/Cancer_preprocess.py | afalak94/Radial-Basis-Function-Neural-Network | ff76cd323073e4bec149f4f1b8117da1fe64a42b | [
"CC0-1.0"
] | null | null | null | RBFN_bash/Cancer_preprocess.py | afalak94/Radial-Basis-Function-Neural-Network | ff76cd323073e4bec149f4f1b8117da1fe64a42b | [
"CC0-1.0"
] | null | null | null | RBFN_bash/Cancer_preprocess.py | afalak94/Radial-Basis-Function-Neural-Network | ff76cd323073e4bec149f4f1b8117da1fe64a42b | [
"CC0-1.0"
] | 1 | 2021-02-21T19:09:03.000Z | 2021-02-21T19:09:03.000Z | import numpy as np
with open('cancer-data.csv') as f:
raw_data = f.read()
####PREPROCESS OF THE DATASET######
#def data_preprocess2(filename):
# # Load a CSV file
# dataset = read_csv(filename, header=None)
# # mark zero values as missing or NaN
# dataset[[1,2,3,4,5,6,7,8,9]] = dataset[[1,2,3,4,5,6,7,8,9]].repl... | 30.211111 | 82 | 0.657595 | import numpy as np
import csv
from pandas import read_csv
import pandas as pd
from sklearn.model_selection import train_test_split
with open('cancer-data.csv') as f:
raw_data = f.read()
####PREPROCESS OF THE DATASET######
def data_preprocess(raw_data):
# Read string files
dataset = list()
csv_reader =... | 0 | 0 | 0 | 0 | 0 | 1,279 | 0 | 24 | 110 |
413837a03cc9be004e0ac42b7ad16f81699bd5ec | 1,337 | py | Python | app/auth/views.py | mishel254/personal-blog | db39299188232ec725ed6f9ed8051a6fa403d355 | [
"MIT"
] | null | null | null | app/auth/views.py | mishel254/personal-blog | db39299188232ec725ed6f9ed8051a6fa403d355 | [
"MIT"
] | null | null | null | app/auth/views.py | mishel254/personal-blog | db39299188232ec725ed6f9ed8051a6fa403d355 | [
"MIT"
] | null | null | null | from .. import db
| 31.093023 | 107 | 0.688856 | from flask import render_template, redirect, url_for,flash,request
from flask_login import login_required, current_user, login_user,logout_user
from ..models import Users
from .forms import Loginform,Signupform
from .. import db
from . import auth
@auth.route('/signup', methods=['GET','POST'])
def signup():
form... | 0 | 1,016 | 0 | 0 | 0 | 0 | 0 | 120 | 180 |
a330fddb281c44e4d5af6c0383a84754087e5ada | 115 | py | Python | tests/python_parser/data/with_statement_multi_items.py | ahupp/pegen | e28fe4fb1972c55af5ddb6a7bdd9cba4ea072b81 | [
"MIT"
] | 106 | 2020-05-14T03:43:47.000Z | 2022-03-26T21:46:47.000Z | tests/python_parser/data/with_statement_multi_items.py | ahupp/pegen | e28fe4fb1972c55af5ddb6a7bdd9cba4ea072b81 | [
"MIT"
] | 60 | 2020-05-07T23:17:46.000Z | 2022-03-30T20:26:25.000Z | tests/python_parser/data/with_statement_multi_items.py | ahupp/pegen | e28fe4fb1972c55af5ddb6a7bdd9cba4ea072b81 | [
"MIT"
] | 20 | 2020-05-22T10:21:30.000Z | 2022-03-26T21:23:44.000Z | with (a, c,):
pass
with (a as b, c):
pass
| 9.583333 | 23 | 0.486957 | with (a, c,):
pass
with (a as b, c):
pass
async with (a, c,):
pass
async with (a as b, c):
pass
| 0 | 0 | 18 | 0 | 0 | 0 | 0 | 0 | 46 |
82132716d68b40cda484559658bbd18b1d8a529e | 1,881 | py | Python | wagtailplus/wagtaillinks/migrations/0002_initial_data.py | DanAtShenTech/wagtailplus | 22cac857175d8a6f77e470751831c14a92ccd768 | [
"BSD-2-Clause"
] | null | null | null | wagtailplus/wagtaillinks/migrations/0002_initial_data.py | DanAtShenTech/wagtailplus | 22cac857175d8a6f77e470751831c14a92ccd768 | [
"BSD-2-Clause"
] | null | null | null | wagtailplus/wagtaillinks/migrations/0002_initial_data.py | DanAtShenTech/wagtailplus | 22cac857175d8a6f77e470751831c14a92ccd768 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 33 | 93 | 0.647528 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import VERSION as DJANGO_VERSION
from django.db import migrations
def add_link_permissions_to_admin_groups(apps, schema_editor):
ContentType = apps.get_model('contenttypes.ContentType')
Permission = apps.get_model('auth.Permission')... | 0 | 0 | 0 | 322 | 0 | 1,368 | 0 | 34 | 91 |
61265805f6fb5ce931146d027f8efa521cac84c1 | 7,057 | py | Python | config/settings.py | epicserve/django-base-site | 7a382d3f74588f45548697e00e2a8a3398c6b526 | [
"MIT"
] | 102 | 2015-01-04T15:48:38.000Z | 2022-03-30T21:39:31.000Z | config/settings.py | epicserve/django-base-site | 7a382d3f74588f45548697e00e2a8a3398c6b526 | [
"MIT"
] | 20 | 2020-03-14T15:20:30.000Z | 2021-09-25T14:52:49.000Z | config/settings.py | epicserve/django-base-site | 7a382d3f74588f45548697e00e2a8a3398c6b526 | [
"MIT"
] | 23 | 2015-05-10T14:22:11.000Z | 2021-09-28T11:32:42.000Z | import socket
import sys
import environs
from apps.base.utils.env import env
BASE_DIR = environs.Path(__file__).parent.parent # type: ignore
READ_DOT_ENV_FILE = env.bool("READ_DOT_ENV_FILE", default=True)
if READ_DOT_ENV_FILE is True:
env.read_env(str(BASE_DIR.joinpath(".env")))
# Quick-start development set... | 33.131455 | 167 | 0.735157 | import os
import socket
import sys
import environs
from apps.base.utils.env import env
BASE_DIR = environs.Path(__file__).parent.parent # type: ignore
READ_DOT_ENV_FILE = env.bool("READ_DOT_ENV_FILE", default=True)
if READ_DOT_ENV_FILE is True:
env.read_env(str(BASE_DIR.joinpath(".env")))
# Quick-start devel... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
af5ce3b397dd38e0b7581aecb120cafaec40ed5b | 6,324 | py | Python | diabolo_play/src/diabolo_play/motion_knot_points.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 11 | 2021-10-15T15:51:24.000Z | 2021-12-26T16:43:17.000Z | diabolo_play/src/diabolo_play/motion_knot_points.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | null | null | null | diabolo_play/src/diabolo_play/motion_knot_points.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 1 | 2022-02-01T01:58:37.000Z | 2022-02-01T01:58:37.000Z | #!/usr/bin/env python
| 44.851064 | 136 | 0.636306 | #!/usr/bin/env python
import rospy
from interactive_markers.interactive_marker_server import InteractiveMarkerServer
from visualization_msgs.msg import InteractiveMarker, InteractiveMarkerControl, Marker
import copy
class KnotPointsServer:
'''
This class allows setting points with interactive markers
This... | 0 | 0 | 0 | 6,074 | 0 | 0 | 0 | 106 | 120 |
3d866ab2994647fdaf22f131e04df80d5e796a1f | 17,617 | py | Python | zrp/modeling/pipeline_builder.py | zestai/zrp | 14211cc90857e21a522637c31d42b0b663fcd368 | [
"Apache-2.0"
] | 14 | 2022-02-09T20:58:31.000Z | 2022-03-29T16:32:01.000Z | zrp/modeling/pipeline_builder.py | zestai/zrp | 14211cc90857e21a522637c31d42b0b663fcd368 | [
"Apache-2.0"
] | 3 | 2022-02-04T17:25:38.000Z | 2022-03-15T01:13:32.000Z | zrp/modeling/pipeline_builder.py | zestai/zrp | 14211cc90857e21a522637c31d42b0b663fcd368 | [
"Apache-2.0"
] | null | null | null | from os.path import dirname
import warnings
warnings.filterwarnings(action='ignore')
curpath = dirname(__file__)
| 44.487374 | 503 | 0.605608 | from os.path import expanduser, dirname
import pandas as pd
import numpy as np
import os
import re
import sys
import json
import joblib
import pickle
import xgboost
from xgboost import XGBClassifier
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.model_selection import ... | 0 | 0 | 0 | 16,555 | 0 | 0 | 0 | 356 | 578 |
f19a82bc90283af620ba726af0d67a2df3d1daf2 | 4,997 | py | Python | mumbleBot.py | zorodc/py-mumbot | 7ca5c2295d786852e5d8bcab50dc582ef5bb1de1 | [
"0BSD"
] | null | null | null | mumbleBot.py | zorodc/py-mumbot | 7ca5c2295d786852e5d8bcab50dc582ef5bb1de1 | [
"0BSD"
] | null | null | null | mumbleBot.py | zorodc/py-mumbot | 7ca5c2295d786852e5d8bcab50dc582ef5bb1de1 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
# depends on 'pymumble'
# A mumble bot, plays music, tells fortunes.
# Uses youtube-dl as a backend.
from pymumble_py3.mumble import Mumble
from sys import argv
# Helpers for command functions
def dynamicCall(function, alist):
"""Decompress a list into arguments dynamically."""
try:
... | 31.626582 | 101 | 0.61657 | #!/usr/bin/env python3
# depends on 'pymumble'
# A mumble bot, plays music, tells fortunes.
# Uses youtube-dl as a backend.
import subprocess
import wave
from pymumble_py3.mumble import Mumble
from pymumble_py3.callbacks import *
from subprocess import call
from sys import argv
from os import remo... | 0 | 0 | 0 | 0 | 0 | 2,756 | 0 | 40 | 359 |
d9d69ee997a23a52b4855205b3f28386526dabeb | 267 | py | Python | Coursera/Week.7/Task.13.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.7/Task.13.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.7/Task.13.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | '''
'''
n = int(input())
cities = dict()
for line in range(n):
line = input()
line = line.split()
country = line[0]
for city in line[1:]:
cities[city] = country
m = int(input())
for city in range(m):
print(cities[input()])
| 17.8 | 30 | 0.569288 | '''
Страны и города
'''
n = int(input())
cities = dict()
for line in range(n):
line = input()
line = line.split()
country = line[0]
for city in line[1:]:
cities[city] = country
m = int(input())
for city in range(m):
print(cities[input()])
| 26 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
807c2d99123c1b54f4c2ef1d337b46a0661b70cf | 4,936 | py | Python | migrate_locations_to_concepts.py | ecohealthalliance/concept-tools | 865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53 | [
"Apache-2.0"
] | null | null | null | migrate_locations_to_concepts.py | ecohealthalliance/concept-tools | 865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53 | [
"Apache-2.0"
] | null | null | null | migrate_locations_to_concepts.py | ecohealthalliance/concept-tools | 865a7ceb94ca8d927eb9a7ed53fcb6c1e1a68f53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Combine data from the
crosswiki_dictionary
crosswiki_invdict
dbpedia_geo
geoname_links
You'll want to make an index on the geonameid property in the
geoanmes.allCountries collection, e.g.:
db.allCountries.ensureIndex({geonameid: 1})
"""
if __name__ == '__main__':
lm ... | 30.469136 | 85 | 0.558752 | #!/usr/bin/env python
"""
Combine data from the
crosswiki_dictionary
crosswiki_invdict
dbpedia_geo
geoname_links
You'll want to make an index on the geonameid property in the
geoanmes.allCountries collection, e.g.:
db.allCountries.ensureIndex({geonameid: 1})
"""
import sys
import re
import codecs
i... | 0 | 0 | 0 | 4,456 | 0 | 0 | 0 | -35 | 157 |
cb7c406903017ff9130aec1ce2d523b0aadd359c | 841 | py | Python | slack-consumer/slack.py | VirtualSatai/humble-bot | 2f83642a319d933da46427b5b8090149576e2c76 | [
"MIT"
] | null | null | null | slack-consumer/slack.py | VirtualSatai/humble-bot | 2f83642a319d933da46427b5b8090149576e2c76 | [
"MIT"
] | 10 | 2018-05-15T08:07:32.000Z | 2018-05-21T08:04:04.000Z | slack-consumer/slack.py | VirtualSatai/humble-bot | 2f83642a319d933da46427b5b8090149576e2c76 | [
"MIT"
] | 1 | 2018-05-17T13:26:55.000Z | 2018-05-17T13:26:55.000Z | import json
import os
import time
import zmq
from slackclient import SlackClient
from zmq import Context
SLACK_CHANNEL_ID = os.environ["SLACK_CHANNEL_ID"]
SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"]
TOPICFILTER = "1"
TIMEOUT = 1
ctx = Context()
print("Connecting to the producer")
socket = ctx.socket(zmq.SUB)
s... | 22.131579 | 92 | 0.69679 | import json
import os
import time
import zmq
from slackclient import SlackClient
from zmq import Context
SLACK_CHANNEL_ID = os.environ["SLACK_CHANNEL_ID"]
SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"]
TOPICFILTER = "1"
TIMEOUT = 1
ctx = Context()
print("Connecting to the producer")
socket = ctx.socket(zmq.SUB)
s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1c875668018aac49c11b481f81f0470a36e53b7e | 4,548 | py | Python | extract_img.py | JadeMaveric/image-collage-maker | b75bb63460e21e773ed681ad09aad6f3bcd4798e | [
"MIT"
] | 58 | 2018-11-03T23:05:22.000Z | 2022-03-22T20:03:50.000Z | extract_img.py | JadeMaveric/image-collage-maker | b75bb63460e21e773ed681ad09aad6f3bcd4798e | [
"MIT"
] | 6 | 2018-12-01T02:45:08.000Z | 2022-01-30T23:10:52.000Z | extract_img.py | JadeMaveric/image-collage-maker | b75bb63460e21e773ed681ad09aad6f3bcd4798e | [
"MIT"
] | 10 | 2018-11-29T20:59:31.000Z | 2021-11-18T14:28:38.000Z | """
extract_img.py
get images from WeChat friends list.
"""
import itchat
import os
import pickle
import concurrent.futures
import time
from tqdm import tqdm
from math import ceil
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dir", d... | 33.940299 | 101 | 0.593008 | """
extract_img.py
get images from WeChat friends list.
"""
import itchat
import os
import pickle
from concurrent.futures import *
import concurrent.futures
import time
from tqdm import tqdm
from math import ceil
import argparse
def download_friend(args):
user_name, image_id, download_dir = args
... | 0 | 0 | 0 | 0 | 0 | 572 | 0 | 11 | 98 |
f91dd51da7bac4dbb222349c288f50dcaf097cd6 | 1,337 | py | Python | digsby/src/tests/digsby_unittest.py | ifwe/digsby | f5fe00244744aa131e07f09348d10563f3d8fa99 | [
"Python-2.0"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | digsby/src/tests/digsby_unittest.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | digsby/src/tests/digsby_unittest.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | import wx
import unittest
try:
_
except NameError:
import gettext
gettext.install('Digsby')
if getattr(wx, 'WXPY', False):
wx.WindowClass = wx._Window
else:
wx.WindowClass = wx.Window
try:
sentinel
except NameError:
import bootstrap
bootstrap.install_sentinel()
test_main = unittest.... | 21.564516 | 58 | 0.618549 | import wx
import unittest
try:
_
except NameError:
import gettext
gettext.install('Digsby')
if getattr(wx, 'WXPY', False):
wx.WindowClass = wx._Window
else:
wx.WindowClass = wx.Window
try:
sentinel
except NameError:
import bootstrap
bootstrap.install_sentinel()
class TestCase(unittes... | 0 | 0 | 0 | 989 | 0 | 0 | 0 | 0 | 23 |
e280af5bb76f7ca4c74e7ba4975070d6c87d5940 | 12,742 | py | Python | src/wm_interpreter_node.py | WalkingMachine/wm_interpreter | 522864c340886669277d043d385a372c5f86ed5b | [
"Apache-2.0"
] | null | null | null | src/wm_interpreter_node.py | WalkingMachine/wm_interpreter | 522864c340886669277d043d385a372c5f86ed5b | [
"Apache-2.0"
] | null | null | null | src/wm_interpreter_node.py | WalkingMachine/wm_interpreter | 522864c340886669277d043d385a372c5f86ed5b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import rospy
import smach
import smach_ros
TIMEOUT_LENGTH = 10
# define state Idle
# define state WaitingCommand
# define state WaitingConfirmation
# define state DoSomething
# main
def main():
'''rospy.Subscriber("/recognizer_1/output", String, handleRecognizerMessage, queue_size=1)'... | 39.32716 | 115 | 0.504473 | #!/usr/bin/env python
import roslib
import rospy
import smach
import smach_ros
from smach import StateMachine
import actionlib
import time
import threading
from smach_ros import SimpleActionState
from smach_ros import ActionServerWrapper
from std_msgs.msg import String
from std_msgs.msg import UInt8
from wm_interprete... | 0 | 0 | 0 | 8,271 | 0 | 0 | 0 | 49 | 309 |
ba1712adf36dca6db45053cac63860a745bb6b20 | 5,245 | py | Python | app/modules/passport/login_mobile.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 7 | 2018-01-29T02:46:31.000Z | 2018-03-25T11:15:10.000Z | app/modules/passport/login_mobile.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 4 | 2021-06-08T19:38:03.000Z | 2022-03-11T23:18:46.000Z | app/modules/passport/login_mobile.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 1 | 2021-06-12T14:14:35.000Z | 2021-06-12T14:14:35.000Z | from . import passport
passport.add_url_rule("/loginbymobile/index", view_func=IndexHandler.as_view("index"))
| 34.966667 | 109 | 0.67836 | from flask import request, redirect, g
from app import db
from config.setting import MOBILE_WHITE_LIST
from app.modules.vendor.pre_request.flask import filter_params
from app.modules.vendor.pre_request.filter_rules import Rule
from app.modules.passport.register_mobile import RegisterHandler
from app.modules.base.bas... | 378 | 3,805 | 0 | 320 | 0 | 0 | 0 | 502 | 379 |
abcab4ac7876cc5a907987afd65687e37c1abfa3 | 31 | py | Python | snippets/7.py | krrg/python-tutorial | a6ef8865cb46ee48624d7c7451d1894741405cc4 | [
"MIT"
] | null | null | null | snippets/7.py | krrg/python-tutorial | a6ef8865cb46ee48624d7c7451d1894741405cc4 | [
"MIT"
] | null | null | null | snippets/7.py | krrg/python-tutorial | a6ef8865cb46ee48624d7c7451d1894741405cc4 | [
"MIT"
] | null | null | null | x = 42
print x # Outputs `42` | 15.5 | 24 | 0.580645 | x = 42
print x # Outputs `42` | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65ead98804d423c1188a4c86eb90dce421ca20a2 | 6,496 | py | Python | examples/pipeline/match_id_test/pipeline-hetero-lr-feature-engineering.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 715 | 2019-01-24T10:52:03.000Z | 2019-10-31T12:19:22.000Z | examples/pipeline/match_id_test/pipeline-hetero-lr-feature-engineering.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 270 | 2019-02-11T02:57:36.000Z | 2019-08-29T11:22:33.000Z | examples/pipeline/match_id_test/pipeline-hetero-lr-feature-engineering.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 200 | 2019-01-26T14:21:35.000Z | 2019-11-01T01:14:36.000Z | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.088889 | 108 | 0.640702 | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 0 | 0 | 0 | 0 | 0 | 4,977 | 0 | 310 | 289 |
e0cc96fcb4e8bfe6a1a15a57f29958234eeab877 | 28,270 | py | Python | dataAnalytics/simulatorGraphics/simulatorExtra.py | PeterJWei/EnergyFootprinting | 0396efba7d4e6863452e322f9f7561c6cd756478 | [
"MIT"
] | null | null | null | dataAnalytics/simulatorGraphics/simulatorExtra.py | PeterJWei/EnergyFootprinting | 0396efba7d4e6863452e322f9f7561c6cd756478 | [
"MIT"
] | null | null | null | dataAnalytics/simulatorGraphics/simulatorExtra.py | PeterJWei/EnergyFootprinting | 0396efba7d4e6863452e322f9f7561c6cd756478 | [
"MIT"
] | null | null | null |
_num_bins = 96
win = GraphWin("floorplan", 531, 741)
b = Image(Point(265, 371), "floorplan.gif")
r = Rectangle(Point(20, 0), Point(511, 150))
r.setFill("white")
title = Text(Point(265, 30), "Building Occupant Optimization")
simTime = Text(Point(265, 100), "Time- Initial Configuration")
simTime.setSize(18)
title.setSi... | 48.910035 | 162 | 0.652069 | import matplotlib.pyplot as plt
import random
import math
import sys
from graphics import *
_num_bins = 96
win = GraphWin("floorplan", 531, 741)
b = Image(Point(265, 371), "floorplan.gif")
r = Rectangle(Point(20, 0), Point(511, 150))
r.setFill("white")
title = Text(Point(265, 30), "Building Occupant Optimization")
si... | 0 | 0 | 0 | 27,715 | 0 | 0 | 0 | -18 | 133 |
59ff111215f6abac14f607980ea6b1f07a25b20f | 153 | py | Python | case_plaso/__init__.py | casework/CASE-Implementation-Plaso | 37243fce53d2a31388fdb405860955ee443bbe96 | [
"Apache-2.0"
] | 1 | 2019-04-16T17:07:56.000Z | 2019-04-16T17:07:56.000Z | case_plaso/__init__.py | casework/CASE-Implementation-Plaso | 37243fce53d2a31388fdb405860955ee443bbe96 | [
"Apache-2.0"
] | null | null | null | case_plaso/__init__.py | casework/CASE-Implementation-Plaso | 37243fce53d2a31388fdb405860955ee443bbe96 | [
"Apache-2.0"
] | null | null | null |
import rdflib
# Store custom properties and objects not defined in CASE as the PLASO prefix.
PLASO = rdflib.Namespace('http://plaso.example.org/core#') | 30.6 | 78 | 0.771242 |
import rdflib
# Store custom properties and objects not defined in CASE as the PLASO prefix.
PLASO = rdflib.Namespace('http://plaso.example.org/core#') | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0d7d627d1c06671d21f53bcf881ae4e4eabbbf6f | 60 | py | Python | T07-13/program.py | maa76/SSof-Project1920 | 9b4ad9ac41a648c425fcfcd49cd52ff84e528bde | [
"MIT"
] | 2 | 2019-11-20T19:26:07.000Z | 2019-11-22T00:42:23.000Z | T07-13/program.py | maa76/SSof-Project1920 | 9b4ad9ac41a648c425fcfcd49cd52ff84e528bde | [
"MIT"
] | 2 | 2019-11-28T05:21:24.000Z | 2019-11-28T05:21:58.000Z | T07-13/program.py | maa76/SSof-Project1920 | 9b4ad9ac41a648c425fcfcd49cd52ff84e528bde | [
"MIT"
] | 25 | 2019-11-27T01:40:56.000Z | 2019-12-04T23:38:59.000Z | a = source()
b = k
if a:
b = c
elif a:
b = d
sink(b) | 8.571429 | 12 | 0.433333 | a = source()
b = k
if a:
b = c
elif a:
b = d
sink(b) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15188f66f4181f2f1a482c3e158656cdf1b983a5 | 1,647 | py | Python | authentication/SignupHandler.py | anabarasan/moderator2 | d48389b7dbc0892efaf811ab332e3c7fdb59cec0 | [
"MIT"
] | null | null | null | authentication/SignupHandler.py | anabarasan/moderator2 | d48389b7dbc0892efaf811ab332e3c7fdb59cec0 | [
"MIT"
] | 3 | 2015-10-27T11:20:22.000Z | 2015-10-27T11:31:07.000Z | authentication/SignupHandler.py | anabarasan/moderator2 | d48389b7dbc0892efaf811ab332e3c7fdb59cec0 | [
"MIT"
] | null | null | null | # from authentication import sendmail
| 33.612245 | 147 | 0.656345 | from authentication import BaseHandler
from authentication import app
# from authentication import sendmail
@app.route('/signup', 'signup')
class SignupHandler(BaseHandler):
def get(self):
self.render_template('signup.html')
def post(self):
user_name = self.request.get('username')
ema... | 0 | 1,515 | 0 | 0 | 0 | 0 | 0 | 26 | 67 |
01dd071fc49f87f71bc4878eb9578d3f0818c006 | 5,004 | py | Python | pentest-scripts/learning-python-for-forensics/Chapter 3/setupapi_parser.py | paulveillard/cybersecurity-penetration-testing | a5afff13ec25afd0cf16ef966d35bddb91518af4 | [
"Apache-2.0"
] | 6 | 2021-12-07T21:02:12.000Z | 2022-03-03T12:08:14.000Z | pentest-scripts/learning-python-for-forensics/Chapter 3/setupapi_parser.py | paulveillard/cybersecurity-penetration-testing | a5afff13ec25afd0cf16ef966d35bddb91518af4 | [
"Apache-2.0"
] | null | null | null | pentest-scripts/learning-python-for-forensics/Chapter 3/setupapi_parser.py | paulveillard/cybersecurity-penetration-testing | a5afff13ec25afd0cf16ef966d35bddb91518af4 | [
"Apache-2.0"
] | 1 | 2022-01-15T23:57:36.000Z | 2022-01-15T23:57:36.000Z | import argparse
import os
import sys
import usb_lookup
__author__ = 'Preston Miller & Chapin Bryce'
__date__ = '20160401'
__version__ = 0.03
__description__ = 'This scripts reads a Windows 7 Setup API log and prints USB Devices to the user'
def main(in_file):
"""
Main function to handle operation
:param ... | 33.583893 | 120 | 0.643086 | import argparse
import os
import sys
import usb_lookup
__author__ = 'Preston Miller & Chapin Bryce'
__date__ = '20160401'
__version__ = 0.03
__description__ = 'This scripts reads a Windows 7 Setup API log and prints USB Devices to the user'
def main(in_file):
"""
Main function to handle operation
:param ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b884a674517638e0e6230eed1a55d1d055cedc2f | 2,939 | py | Python | backend/project/app/extension/history/conference_ortho_plastic.py | goodyttoor/tcl_v7 | ceb545fa3f0e3eaf3a1a43c7e4a2102014b82a47 | [
"MIT"
] | null | null | null | backend/project/app/extension/history/conference_ortho_plastic.py | goodyttoor/tcl_v7 | ceb545fa3f0e3eaf3a1a43c7e4a2102014b82a47 | [
"MIT"
] | null | null | null | backend/project/app/extension/history/conference_ortho_plastic.py | goodyttoor/tcl_v7 | ceb545fa3f0e3eaf3a1a43c7e4a2102014b82a47 | [
"MIT"
] | null | null | null |
from fastapi import APIRouter
router = APIRouter()
| 33.022472 | 145 | 0.787683 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter, Depends
from sqlmodel import Field, SQLModel
from ...db import get_session
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
router = APIRouter()
class HistoryOrthoPlasticConference(SQLModel, tabl... | 0 | 1,531 | 0 | 924 | 0 | 0 | 0 | 80 | 341 |
ddbc6ba2496ec92e3e239527842fdb6ed65fd68b | 2,045 | py | Python | sandbox/numpy/tuto1.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 2 | 2021-12-12T13:26:06.000Z | 2022-03-03T16:14:53.000Z | sandbox/numpy/tuto1.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 5 | 2019-03-01T07:08:46.000Z | 2019-04-28T07:32:42.000Z | sandbox/numpy/tuto1.py | rboman/progs | c60b4e0487d01ccd007bcba79d1548ebe1685655 | [
"Apache-2.0"
] | 2 | 2017-12-13T13:13:52.000Z | 2019-03-13T20:08:15.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# from https://docs.scipy.org/doc/numpy-dev/user/quickstart.html
import numpy as np
a = np.arange(15).reshape(3, 5)
print("a=",a)
print("\ta.shape =",a.shape)
print("\ta.ndim =",a.ndim)
print("\ta.dtype.name =",a.dtype.name)
print("\ta.itemsize =",a.itemsize)
print("\t... | 22.977528 | 79 | 0.56577 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# from https://docs.scipy.org/doc/numpy-dev/user/quickstart.html
import numpy as np
a = np.arange(15).reshape(3, 5)
print("a=",a)
print("\ta.shape =",a.shape)
print("\ta.ndim =",a.ndim)
print("\ta.dtype.name =",a.dtype.name)
print("\ta.itemsize =",a.itemsize)
print("\t... | 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81ed5c7ba1b5328f5aab207b78f2890ef13dce3e | 6,990 | py | Python | capreolus/extractor/lce_bertpassage.py | nimasadri11/capreolus | 27b081ec1a37d2af6afa6b61eb1cb7cc4ec9db1c | [
"Apache-2.0"
] | null | null | null | capreolus/extractor/lce_bertpassage.py | nimasadri11/capreolus | 27b081ec1a37d2af6afa6b61eb1cb7cc4ec9db1c | [
"Apache-2.0"
] | null | null | null | capreolus/extractor/lce_bertpassage.py | nimasadri11/capreolus | 27b081ec1a37d2af6afa6b61eb1cb7cc4ec9db1c | [
"Apache-2.0"
] | null | null | null |
from capreolus import get_logger
logger = get_logger(__name__)
| 42.883436 | 125 | 0.636767 | import tensorflow as tf
import numpy as np
from capreolus import get_logger
from capreolus.utils.exceptions import MissingDocError
from . import Extractor
from .bertpassage import BertPassage
logger = get_logger(__name__)
@Extractor.register
class LCEBertPassage(BertPassage):
module_name = "LCEbertpassage"
... | 0 | 6,742 | 0 | 0 | 0 | 0 | 0 | 49 | 133 |
58ef35ef583db31c3c7e841852d8f66705d8fd70 | 1,254 | py | Python | Back Tracking/n_queen_problem.py | NirupamDebnath/Geeks-DS-Algo | 8482443d095e8eb879c5d4b9c02ff7d04416e7ff | [
"MIT"
] | null | null | null | Back Tracking/n_queen_problem.py | NirupamDebnath/Geeks-DS-Algo | 8482443d095e8eb879c5d4b9c02ff7d04416e7ff | [
"MIT"
] | null | null | null | Back Tracking/n_queen_problem.py | NirupamDebnath/Geeks-DS-Algo | 8482443d095e8eb879c5d4b9c02ff7d04416e7ff | [
"MIT"
] | null | null | null |
N = 8
count = 0
if __name__ == "__main__":
# unittest.main()
solveNQ()
print(count)
| 20.225806 | 60 | 0.472887 | import unittest
N = 8
count = 0
def solveNQ():
board = [ [0]*N for i in range(N) ]
solveNQUtil(board, 0)
def printSolution(board):
print(*board, sep="\n", end="\n\n")
def is_safe(board, y, x):
for i in range(0,x):
if board[y][i] == 1:
return False
for j, i in zip(range(... | 0 | 0 | 0 | 218 | 0 | 802 | 0 | -6 | 137 |
5be8fdf86c89107dca13b25251e87bfd91e65deb | 1,200 | py | Python | applications/RsvpService/controllers/default.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | applications/RsvpService/controllers/default.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | applications/RsvpService/controllers/default.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 30.769231 | 96 | 0.645833 | # -*- coding: utf-8 -*-
@auth.requires_login()
def create_event():
if request.args(0):
event = db.event(request.args(0),created_by=auth.user_id) or redirect(URL('index'))
rows = db(db.rsvp.event==event.id).select()
else: event, rows=None, []
form = SQLFORM(db.event,event,deletable=T... | 0 | 996 | 0 | 0 | 0 | 54 | 0 | 0 | 126 |
bb6e8c524502d0817497bc62554b89cc489eb9a9 | 67 | py | Python | hseolymp/2016-17/demo/mars_quick.py | dluschan/olymp | dfbf4352dbc7f6fd7563e7bd19aff6fd67fb50b7 | [
"MIT"
] | null | null | null | hseolymp/2016-17/demo/mars_quick.py | dluschan/olymp | dfbf4352dbc7f6fd7563e7bd19aff6fd67fb50b7 | [
"MIT"
] | null | null | null | hseolymp/2016-17/demo/mars_quick.py | dluschan/olymp | dfbf4352dbc7f6fd7563e7bd19aff6fd67fb50b7 | [
"MIT"
] | 1 | 2018-09-14T18:50:48.000Z | 2018-09-14T18:50:48.000Z | import math
n = int(input())
print(3 + math.ceil(math.log(n/3, 2))) | 22.333333 | 38 | 0.641791 | import math
n = int(input())
print(3 + math.ceil(math.log(n/3, 2))) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1e7eb35d3cac083196d56984f2f8b0d28800bdf5 | 3,351 | py | Python | test_goldenberg.py | Milad-Rakhsha/Friction-Contact | 59d17b231c5dd764c741c941e5443141d43ec7e8 | [
"BSD-3-Clause"
] | null | null | null | test_goldenberg.py | Milad-Rakhsha/Friction-Contact | 59d17b231c5dd764c741c941e5443141d43ec7e8 | [
"BSD-3-Clause"
] | null | null | null | test_goldenberg.py | Milad-Rakhsha/Friction-Contact | 59d17b231c5dd764c741c941e5443141d43ec7e8 | [
"BSD-3-Clause"
] | null | null | null | # =============================================================================
# SIMULATION-BASED ENGINEERING LAB (SBEL) - http://sbel.wisc.edu
# University of Wisconsin-Madison
#
# Copyright (c) 2020 SBEL
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# at http... | 30.463636 | 100 | 0.541928 | # =============================================================================
# SIMULATION-BASED ENGINEERING LAB (SBEL) - http://sbel.wisc.edu
# University of Wisconsin-Madison
#
# Copyright (c) 2020 SBEL
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# at http... | 0 | 0 | 0 | 0 | 0 | 2,543 | 0 | 47 | 135 |
d820b838f82f5bc3ceecf210a2278f2a5fd53128 | 732 | py | Python | steganography/utilities/img_manipulation.py | WarrenDevonshire/Steganography | 7a18b0dae7e689198bc946e0611d28376c0b8e47 | [
"MIT"
] | null | null | null | steganography/utilities/img_manipulation.py | WarrenDevonshire/Steganography | 7a18b0dae7e689198bc946e0611d28376c0b8e47 | [
"MIT"
] | 5 | 2019-10-25T00:14:11.000Z | 2019-10-27T17:03:13.000Z | steganography/utilities/img_manipulation.py | WarrenDevonshire/Steganography | 7a18b0dae7e689198bc946e0611d28376c0b8e47 | [
"MIT"
] | null | null | null |
def merge_pixels(pixel1, pixel2):
"""
Merge two R or G or B pixels using 4 least significant bits.
INPUT: A string tuple (e.g. ("00101010")),
Another string tuple (e.g. ("00101010"))
OUTPUT: An integer tuple with the two RGB values merged 00100010
"""
merged_pixel = (pixel1[:4] +... | 22.181818 | 68 | 0.669399 | from PIL import Image
import numpy as np
def to_array(image):
image_arr = np.array(image)
shape = image_arr.shape
flat_arr = image_arr.ravel()
return flat_arr, shape
def to_image(arr, img_shape):
matrix = np.matrix(arr)
reform_matrix = np.asarray(matrix).reshape(img_shape)
new_img = I... | 0 | 0 | 0 | 0 | 0 | 288 | 0 | -3 | 90 |
8b4ee52221cfc328af1f6c573b272bda5e11d8fd | 3,814 | py | Python | back/classification/utils/data_augmentation.py | zqswjtu/graduation | 62686bf6364d1a4a8c164e27b343aa4c85094174 | [
"MIT"
] | null | null | null | back/classification/utils/data_augmentation.py | zqswjtu/graduation | 62686bf6364d1a4a8c164e27b343aa4c85094174 | [
"MIT"
] | null | null | null | back/classification/utils/data_augmentation.py | zqswjtu/graduation | 62686bf6364d1a4a8c164e27b343aa4c85094174 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import cv2
import os.path
#
#
#
#
#
#
if __name__ == "__main__":
#
file_dir = r"../dataset/train/Toothbrush/"
for img_name in os.listdir(file_dir):
img_path = file_dir + img_name
img = cv2.imread(img_path)
# cv2.imshow("1",img)
# c... | 32.598291 | 99 | 0.60173 | # -*- coding: UTF-8 -*-
import cv2
import numpy as np
import os.path
# 椒盐噪声
def salt_and_pepper_noise(src, percentage):
sp_noise_img = src.copy()
sp_noise_img = int(percentage * src.shape[0] * src.shape[1])
for i in range(sp_noise_img):
rand_r = np.random.randint(0, src.shape[0] - 1)
rand_... | 141 | 0 | 0 | 0 | 0 | 2,147 | 0 | -3 | 154 |
3cd57093dc9b2af2c47455784807f52fc20c847a | 3,813 | py | Python | contentcuration/contentcuration/db/models/query.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 60 | 2018-03-29T23:33:29.000Z | 2022-03-19T12:10:56.000Z | contentcuration/contentcuration/db/models/query.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 2,260 | 2018-03-02T23:14:49.000Z | 2022-03-29T20:57:21.000Z | contentcuration/contentcuration/db/models/query.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 86 | 2018-03-19T21:26:35.000Z | 2022-03-28T10:09:17.000Z |
RIGHT_JOIN = 'RIGHT JOIN'
| 34.351351 | 112 | 0.65198 | from django.db import connections
from django.db.models.expressions import Col
from django.db.models.sql.compiler import SQLCompiler
from django.db.models.sql.constants import INNER
from django.db.models.sql.query import Query
from django_cte import CTEQuerySet
from django_cte import With as CTEWith
from mptt.querysets... | 0 | 88 | 0 | 3,236 | 0 | 0 | 0 | 165 | 291 |
d9217c1da5fe4ed5e7f0e300cc8bcc84d9e7e882 | 116 | py | Python | explib/explib/__init__.py | jacqueschen1/adam_sgd_heavy_tails | d4ecab6d460fb44ac3fd2b865641b8e47f3848ee | [
"Apache-2.0"
] | 1 | 2021-12-02T21:47:46.000Z | 2021-12-02T21:47:46.000Z | explib/explib/__init__.py | jacqueschen1/adam_sgd_heavy_tails | d4ecab6d460fb44ac3fd2b865641b8e47f3848ee | [
"Apache-2.0"
] | null | null | null | explib/explib/__init__.py | jacqueschen1/adam_sgd_heavy_tails | d4ecab6d460fb44ac3fd2b865641b8e47f3848ee | [
"Apache-2.0"
] | null | null | null | """ExpLib"""
| 19.333333 | 54 | 0.758621 | """ExpLib"""
import json
from . import dataset, expmaker, logging, model, optim
from .experiment import Experiment
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 67 |
f2267cefd1a1d92d51f71964f56d1f81a3c6bf00 | 373 | py | Python | src/Week1/test3.py | dcavar/Py3L | b11d66174e9b5a9e4c372cdd5fa413a790aeb00c | [
"Apache-2.0"
] | 3 | 2018-01-11T22:14:17.000Z | 2019-06-09T22:02:17.000Z | src/Week1/test3.py | dcavar/Py3L | b11d66174e9b5a9e4c372cdd5fa413a790aeb00c | [
"Apache-2.0"
] | null | null | null | src/Week1/test3.py | dcavar/Py3L | b11d66174e9b5a9e4c372cdd5fa413a790aeb00c | [
"Apache-2.0"
] | 1 | 2019-11-24T10:46:52.000Z | 2019-11-24T10:46:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
mytext = "hello world"
print(mytext[1])
print(mytext[2:4])
print( mytext[0: : 2 ] )
print(mytext.center(80))
print("Number of es in mytext:", mytext.count("e") )
print("Number of lds in mytext:", mytext.count("ld") )
print(mytext.endswith("ing"))
print(mytext.capit... | 16.217391 | 54 | 0.662198 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
mytext = "hello world"
print(mytext[1])
print(mytext[2:4])
print( mytext[0: : 2 ] )
print(mytext.center(80))
print("Number of es in mytext:", mytext.count("e") )
print("Number of lds in mytext:", mytext.count("ld") )
print(mytext.endswith("ing"))
print(mytext.capit... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e64cf71ad87338f1cbb3bb0f53a5f90756a867f9 | 26,963 | py | Python | openpose_plus/utils.py | xrtube/openpose-plus | 221806759c46ded8cad84fb3a70658b8e76db73f | [
"Apache-2.0"
] | 4 | 2020-12-23T14:53:45.000Z | 2021-05-17T05:46:07.000Z | openpose_plus/utils.py | YinXiaojieCSDN/openpose-plus | 5a908eabf31c612099a80288550676db3fc19bbb | [
"Apache-2.0"
] | 5 | 2020-01-28T23:10:48.000Z | 2022-02-10T00:41:40.000Z | openpose_plus/utils.py | YinXiaojieCSDN/openpose-plus | 5a908eabf31c612099a80288550676db3fc19bbb | [
"Apache-2.0"
] | 1 | 2020-02-13T13:31:15.000Z | 2020-02-13T13:31:15.000Z | # -*- coding: utf-8 -*-
## xxx
import math
import os
from distutils.dir_util import mkpath
import cv2
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from train_config import config
from pycocotools.coco import maskUtils
from tensorlayer import logging
from tensorlayer.files.utils import (d... | 35.477632 | 176 | 0.572859 | # -*- coding: utf-8 -*-
## xxx
import math
import os
from distutils.dir_util import mkpath
import cv2
import matplotlib.pyplot as plt
import numpy as np
from scipy.spatial.distance import cdist
import tensorflow as tf
from train_config import config
from pycocotools.coco import COCO, maskUtils
from tensorlayer import... | 93 | 245 | 0 | 5,947 | 0 | 165 | 0 | 46 | 120 |
83216a086de92a242afcc5b4241eace0c6f254a4 | 446 | py | Python | Solutions/Problem_055.py | PraneethJain/Project-Euler | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 2 | 2022-03-11T21:31:52.000Z | 2022-03-11T21:37:14.000Z | Solutions/Problem_055.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | null | null | null | Solutions/Problem_055.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 1 | 2022-03-07T12:55:36.000Z | 2022-03-07T12:55:36.000Z | from time import time
t1 = time()
print(len([i for i in range(1, 10001) if Lychrel_Check(i)]))
print(f"Process completed in {time()-t1}s")
| 18.583333 | 60 | 0.55157 | from time import time
def palindrome_check(x: int) -> bool:
return str(x) == str(x)[::-1]
def Lychrel_Check(x):
num = x
i = 0
while i < 50:
num = num + int(str(num)[::-1])
if palindrome_check(num):
return False
i += 1
if i == 50:
return True
return... | 0 | 0 | 0 | 0 | 0 | 257 | 0 | 0 | 46 |
d5eb44adf893bfcb8f341289542301edb9f1004b | 1,886 | py | Python | tests/test_status_scripts.py | dem4ply/chibi_lxc | 159acfacf829d0fd182382323905ee3f699dabe0 | [
"WTFPL"
] | null | null | null | tests/test_status_scripts.py | dem4ply/chibi_lxc | 159acfacf829d0fd182382323905ee3f699dabe0 | [
"WTFPL"
] | null | null | null | tests/test_status_scripts.py | dem4ply/chibi_lxc | 159acfacf829d0fd182382323905ee3f699dabe0 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 26.56338 | 77 | 0.650053 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from chibi_lxc.container import Container
class Centos_test( Container ):
name = 'centos_7_test'
provision_folders = {
'scripts': 'tests/scripts/'
}
status_scripts = (
'script_test.sh',
)
class Centos_one_test( Centos_... | 0 | 146 | 0 | 1,516 | 0 | 0 | 0 | 14 | 159 |
ad3144a0ebf2e823a28fe10ffea6b82a3c273d48 | 20,989 | py | Python | model.py | KingAndQueen/MemN2N_tensorflow | 05bb97458c36fd6c6085af6ff93f843c29eb35af | [
"MIT"
] | null | null | null | model.py | KingAndQueen/MemN2N_tensorflow | 05bb97458c36fd6c6085af6ff93f843c29eb35af | [
"MIT"
] | null | null | null | model.py | KingAndQueen/MemN2N_tensorflow | 05bb97458c36fd6c6085af6ff93f843c29eb35af | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
# from past.builtins import xrange
def zero_nil_slot(t, name=None):
"""
Overwrites the nil_slot (first row) of the input Tensor with zeros.
The nil_slot is a dummy slot and should not be trained and influence
the training algorithm.
"""
with tf.name_... | 43.636175 | 134 | 0.535328 | import os
import math
import random
import numpy as np
import tensorflow as tf
from sklearn import metrics
# from past.builtins import xrange
import pdb
def zero_nil_slot(t, name=None):
"""
Overwrites the nil_slot (first row) of the input Tensor with zeros.
The nil_slot is a dummy slot and should not be ... | 0 | 0 | 0 | 19,675 | 0 | 0 | 0 | -35 | 133 |
36e2cce34b1c3a892796b24c86bf6dadce858234 | 1,660 | py | Python | workload/dc_workload/plot/bandwidth_sensitivity.py | vishal1303/simulator | c9429cecd1a058b2ab13cbed5c4cb802557bf315 | [
"BSD-3-Clause"
] | 2 | 2019-03-03T02:50:51.000Z | 2020-01-28T05:34:24.000Z | workload/dc_workload/plot/bandwidth_sensitivity.py | vishal1303/simulator | c9429cecd1a058b2ab13cbed5c4cb802557bf315 | [
"BSD-3-Clause"
] | null | null | null | workload/dc_workload/plot/bandwidth_sensitivity.py | vishal1303/simulator | c9429cecd1a058b2ab13cbed5c4cb802557bf315 | [
"BSD-3-Clause"
] | 1 | 2019-10-15T13:31:15.000Z | 2019-10-15T13:31:15.000Z | import sys
workload = sys.argv[1]
dirname = "workload/dc_workload/all-to-all-144-"+workload
protocol = sys.argv[2]
bandwidth = ['40G', '100G']
delay = ['200ns']
load = [0.5, 0.6, 0.7, 0.8]
slowdown_val = []
for d in delay:
for l in load:
slowdown_val = []
for b in bandwidth:
try:
... | 29.122807 | 99 | 0.475904 | import sys
import os
workload = sys.argv[1]
dirname = "workload/dc_workload/all-to-all-144-"+workload
protocol = sys.argv[2]
bandwidth = ['40G', '100G']
delay = ['200ns']
load = [0.5, 0.6, 0.7, 0.8]
slowdown_val = []
for d in delay:
for l in load:
slowdown_val = []
for b in bandwidth:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
0060cf8b7cb6ce13fc658ba97409b30dc81e273e | 30,959 | py | Python | amc/models.py | chamaken/django-amc | f5812c71dfde9ddcc286f14170885902a312e8d9 | [
"BSD-3-Clause"
] | null | null | null | amc/models.py | chamaken/django-amc | f5812c71dfde9ddcc286f14170885902a312e8d9 | [
"BSD-3-Clause"
] | null | null | null | amc/models.py | chamaken/django-amc | f5812c71dfde9ddcc286f14170885902a312e8d9 | [
"BSD-3-Clause"
] | null | null | null |
# based on 2017-11-28
# https://developer.apple.com/library/content/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010206
"""Assign default value which has choice"""
PAYLOAD_TYPES = {
'com.apple.mail.managed': EmailPayload,
}
| 34.437152 | 154 | 0.626215 | import socket, uuid
from django.db import models, transaction
from django.db.models import fields, signals
from django.dispatch import receiver
from django.utils.encoding import force_text
from django.utils.functional import Promise
from django.utils.translation import ugettext_lazy as _
class AMCFieldMixin(object):... | 6 | 0 | 0 | 30,082 | 0 | 0 | 0 | 135 | 447 |
716fe86d34c53ffc1782049d4adcf7949d73b419 | 5,083 | py | Python | tests/test_responsetypes.py | atharwa-24/scrapy | 96b22046e1f68243ca380ece7daa0d65aa501697 | [
"BSD-3-Clause"
] | null | null | null | tests/test_responsetypes.py | atharwa-24/scrapy | 96b22046e1f68243ca380ece7daa0d65aa501697 | [
"BSD-3-Clause"
] | null | null | null | tests/test_responsetypes.py | atharwa-24/scrapy | 96b22046e1f68243ca380ece7daa0d65aa501697 | [
"BSD-3-Clause"
] | null | null | null | import unittest
if __name__ == "__main__":
unittest.main()
| 37.375 | 84 | 0.516821 | import unittest
from scrapy.http import Headers
from scrapy.http import HtmlResponse
from scrapy.http import Response
from scrapy.http import TextResponse
from scrapy.http import XmlResponse
from scrapy.responsetypes import responsetypes
class ResponseTypesTest(unittest.TestCase):
def test_from_filename(self):
... | 27 | 0 | 0 | 4,760 | 0 | 0 | 0 | 90 | 156 |
dc73fabe1a81b9eaaa8f45f1ec439f200a87964e | 53,706 | py | Python | aiida_yambo_wannier90/workflows/__init__.py | epfl-theos/aiida-yambo-wannier90 | dabfa402e779e9fc797dda15ec748b0c6c25d647 | [
"MIT"
] | null | null | null | aiida_yambo_wannier90/workflows/__init__.py | epfl-theos/aiida-yambo-wannier90 | dabfa402e779e9fc797dda15ec748b0c6c25d647 | [
"MIT"
] | 2 | 2022-02-21T14:59:22.000Z | 2022-02-21T15:57:49.000Z | aiida_yambo_wannier90/workflows/__init__.py | epfl-theos/aiida-yambo-wannier90 | dabfa402e779e9fc797dda15ec748b0c6c25d647 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Base class for Yambo+Wannier90 workflow."""
import typing as ty
__all__ = ["validate_inputs", "YamboWannier90WorkChain"]
# pylint: disable=too-many-lines
# pylint: disable=fixme
# TODO remove this todo disable
def validate_inputs( # pylint: disable=inconsistent-return-statements,too-many-... | 37.714888 | 131 | 0.615853 | #!/usr/bin/env python
"""Base class for Yambo+Wannier90 workflow."""
from email.charset import QP
import pathlib
import typing as ty
import numpy as np
from aiida import orm
from aiida.common import AttributeDict
from aiida.common.lang import type_check
from aiida.engine import ExitCode, ProcessBuilder, ToContext, Wo... | 0 | 17,419 | 0 | 31,596 | 0 | 0 | 0 | 1,201 | 535 |
60cd8f0f69befb4da854068b393a74d0e5e25a9d | 2,691 | py | Python | mysql_tracer/args_parser.py | anthonyrichir/py-mysql-tracer | bd6623781d8af3ffc4fb0f7cbd4c7deffc55c8d0 | [
"MIT"
] | 1 | 2020-11-23T14:30:53.000Z | 2020-11-23T14:30:53.000Z | mysql_tracer/args_parser.py | anthonyrichir/py-mysql-tracer | bd6623781d8af3ffc4fb0f7cbd4c7deffc55c8d0 | [
"MIT"
] | 3 | 2019-03-11T08:35:26.000Z | 2021-02-04T16:01:45.000Z | mysql_tracer/args_parser.py | anthonyrichir/py-mysql-tracer | bd6623781d8af3ffc4fb0f7cbd4c7deffc55c8d0 | [
"MIT"
] | 1 | 2020-04-18T19:55:43.000Z | 2020-04-18T19:55:43.000Z | """
CLI script to run MySQL SELECT statements
It produces a copy of provided file with additional metadata and an export of results in CSV format
"""
import argparse
def get_main_args_parser(parents, defaults):
"""
Parser for the arguments required to run mysql_tracer.
:param parents: a list of parent a... | 38.442857 | 120 | 0.680788 | """
CLI script to run MySQL SELECT statements
It produces a copy of provided file with additional metadata and an export of results in CSV format
"""
import argparse
def get_main_args_parser(parents, defaults):
"""
Parser for the arguments required to run mysql_tracer.
:param parents: a list of parent a... | 0 | 0 | 0 | 0 | 0 | 775 | 0 | 0 | 23 |
98ef60af778a5360bdf3cd003a34205063618009 | 614 | py | Python | desafio010.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | desafio010.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | desafio010.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | # Marcelo Campos de Medeiros
# ADS UNIFIP
# REVISO DE PYTHON
# AULA 07 GUSTAVO GUANABARA
'''
Faa um programa que leia quanto dinheiro uma pessoa tem e mostre o valor em dolares.
Considerando o dolar U$ 1.00 == R$4.50
'''
print('='*30)
print('{:$^30}'.format(' DOLARES '))
print('='*30)
valor = float(input('Qual va... | 30.7 | 115 | 0.680782 | # Marcelo Campos de Medeiros
# ADS UNIFIP
# REVISÃO DE PYTHON
# AULA 07 GUSTAVO GUANABARA
'''
Faça um programa que leia quanto dinheiro uma pessoa tem e mostre o valor em dolares.
Considerando o dolar U$ 1.00 == R$4.50
'''
print('='*30)
print('{:$^30}'.format(' DOLARES '))
print('='*30)
valor = float(input('Qual ... | 16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f311daaedf6efa986a65ec10a800fd4a629bcf04 | 2,016 | py | Python | aramPredict/aramRecorder.py | beeedy/LOL | 95ed815593a25e7e86d106ddf20e2ce054709ad1 | [
"MIT"
] | null | null | null | aramPredict/aramRecorder.py | beeedy/LOL | 95ed815593a25e7e86d106ddf20e2ce054709ad1 | [
"MIT"
] | null | null | null | aramPredict/aramRecorder.py | beeedy/LOL | 95ed815593a25e7e86d106ddf20e2ce054709ad1 | [
"MIT"
] | null | null | null | import urllib2
import simplejson
import time
from BeautifulSoup import BeautifulSoup
allGames = []
lastGame = []
try:
with open('aramGames.txt', 'r') as gameFile:
allGames = simplejson.load(gameFile)
lastGame = allGames[-1]
except:
print("Could not find list of previously recorded games, making new file now...... | 29.217391 | 166 | 0.681052 | import urllib2
import simplejson
import time
from BeautifulSoup import BeautifulSoup
allGames = []
lastGame = []
def compare_games(game1, game2):
# returns true if the two game are the same, otherwise false
game1 = [name for teams in game1 for player in teams for name in player]
game2 = [name for teams in game2 fo... | 0 | 0 | 0 | 0 | 0 | 353 | 0 | 0 | 23 |
600010543b450b662f293eb38c61a1d45a1f1435 | 1,691 | py | Python | higher_lower_game/server.py | NozomuYoshida/flask_training | bfad76dbecfdee66063e8d2e556002f0e41cf3e7 | [
"MIT"
] | null | null | null | higher_lower_game/server.py | NozomuYoshida/flask_training | bfad76dbecfdee66063e8d2e556002f0e41cf3e7 | [
"MIT"
] | null | null | null | higher_lower_game/server.py | NozomuYoshida/flask_training | bfad76dbecfdee66063e8d2e556002f0e41cf3e7 | [
"MIT"
] | null | null | null | from flask import Flask
from random import randint
app = Flask(__name__)
target_number = randint(1, 10)
if __name__ == '__main__':
app.run(debug=True)from flask import Flask
from random import randint
app = Flask(__name__)
target_number = randint(1, 10)
if __name__ == '__main__':
app.run(debug... | 22.25 | 95 | 0.661147 | from flask import Flask
from random import randint
app = Flask(__name__)
def make_h1(fn):
def wrapper(*args):
return '<h1>' + fn() + '</h1>'
wrapper.__name__ = fn.__name__
return wrapper
@app.route('/')
@make_h1
def home():
return 'Guess a number between 0 and 9<br>' \
'<img src=... | 0 | 1,002 | 0 | 0 | 0 | 224 | 0 | 0 | 138 |
d0c445a81d6ae8b0686f0f1e383ba4a8862e94b4 | 349 | py | Python | tester.py | justinmilner1/Connect4-master | 9cd16b1c23c5a0de07177dd332e53d4574269d28 | [
"MIT"
] | null | null | null | tester.py | justinmilner1/Connect4-master | 9cd16b1c23c5a0de07177dd332e53d4574269d28 | [
"MIT"
] | null | null | null | tester.py | justinmilner1/Connect4-master | 9cd16b1c23c5a0de07177dd332e53d4574269d28 | [
"MIT"
] | null | null | null | import sys
from kaggle_environments import make, utils
out = sys.stdout
submission = utils.read_file("/kaggle/working/main.py")
agent = utils.get_last_callable(submission)
sys.stdout = out
env = make("connectx", debug=True)
env.run([agent, agent])
print("Success!" if env.state[0].status == env.state[1].status == "DONE... | 34.9 | 90 | 0.73639 | import sys
from kaggle_environments import evaluate, make, utils
out = sys.stdout
submission = utils.read_file("/kaggle/working/main.py")
agent = utils.get_last_callable(submission)
sys.stdout = out
env = make("connectx", debug=True)
env.run([agent, agent])
print("Success!" if env.state[0].status == env.state[1].statu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0 |
7c1a85ac0c22e9d1447e5461c289ad2158878198 | 2,988 | py | Python | lockheed_141310/routes/auth.py | Dr-N0/MASA-141310 | a0eed9f97c730ebe8c3e3455fa501b2fc72cf101 | [
"MIT"
] | null | null | null | lockheed_141310/routes/auth.py | Dr-N0/MASA-141310 | a0eed9f97c730ebe8c3e3455fa501b2fc72cf101 | [
"MIT"
] | null | null | null | lockheed_141310/routes/auth.py | Dr-N0/MASA-141310 | a0eed9f97c730ebe8c3e3455fa501b2fc72cf101 | [
"MIT"
] | null | null | null | from flask import Blueprint
auth_bp = Blueprint('auth', __name__)
| 33.954545 | 117 | 0.683066 | from flask import Blueprint, request, jsonify
from flask_jwt_extended import create_access_token, create_refresh_token, set_access_cookies, set_refresh_cookies, \
jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt
from flask_cors import cross_origin
from lockheed_141310 import blacklist
from l... | 0 | 2,451 | 0 | 0 | 0 | 0 | 0 | 263 | 203 |
d2afdcdf348b346003031b19b7ad92ffebb3c6bd | 3,785 | py | Python | io_scene_halo/file_qua/import_qua.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | 36 | 2020-11-29T04:36:19.000Z | 2022-03-16T22:54:45.000Z | io_scene_halo/file_qua/import_qua.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | 18 | 2020-05-24T07:07:55.000Z | 2020-08-24T20:34:14.000Z | io_scene_halo/file_qua/import_qua.py | AerialDave144/Halo-Asset-Blender-Development-Toolset | f1b0c0b22806ebabaf0126ad864896193c02307f | [
"MIT"
] | 15 | 2020-12-02T13:28:52.000Z | 2022-03-12T00:14:10.000Z | # ##### BEGIN MIT LICENSE BLOCK #####
#
# MIT License
#
# Copyright (c) 2021 Steven Garcia
#
# 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 ... | 33.495575 | 144 | 0.632232 | # ##### BEGIN MIT LICENSE BLOCK #####
#
# MIT License
#
# Copyright (c) 2021 Steven Garcia
#
# 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 ... | 0 | 0 | 0 | 2,300 | 0 | 133 | 0 | 26 | 69 |
c2cb8e361edb618da72b97d79636d8f17f5e347a | 1,879 | py | Python | game.py | Laterus/Onzozo | d0e7cf61f2bffff808a1c6c6b27ec8f2b1733372 | [
"Apache-2.0"
] | null | null | null | game.py | Laterus/Onzozo | d0e7cf61f2bffff808a1c6c6b27ec8f2b1733372 | [
"Apache-2.0"
] | null | null | null | game.py | Laterus/Onzozo | d0e7cf61f2bffff808a1c6c6b27ec8f2b1733372 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python3
import discord
import core.battle_lobby as battle_lobby
CLIENT = discord.Client()
if __name__ == '__main__':
main()
| 28.044776 | 63 | 0.588079 | #!/usr/local/bin/python3
import discord
import asyncio
import core.battle_lobby as battle_lobby
from core.common import SERVSET
CLIENT = discord.Client()
@CLIENT.event
async def on_ready():
print ('Logged in as '+CLIENT.user.name)
await setup_battle_lobby()
@CLIENT.event
async def on_reaction_add(reaction, ... | 0 | 451 | 1,045 | 0 | 0 | 96 | 0 | 3 | 136 |
4a627767e3c0444e52809ca3ac8b06284df2c7e6 | 7,989 | py | Python | setting - backup.py | robintptsai/ms101robin | 8b090d2e4795d8a7ac8bb6011b0704c40cb8af86 | [
"MIT"
] | null | null | null | setting - backup.py | robintptsai/ms101robin | 8b090d2e4795d8a7ac8bb6011b0704c40cb8af86 | [
"MIT"
] | null | null | null | setting - backup.py | robintptsai/ms101robin | 8b090d2e4795d8a7ac8bb6011b0704c40cb8af86 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import timedelta
from os import environ
import re
from urllib import quote
DOODLE_VERSION = '1.4' # current Doodle version
CHECK_NEW_VERSION = True # whether check the latest version
THREAD_SAFE = environ.get('APPENGINE_RUNTIME') == 'python27' # whether enable thread safe mode,... | 61.930233 | 269 | 0.758042 | # -*- coding: utf-8 -*-
from datetime import timedelta
from os import environ
import re
from urllib import quote
DOODLE_VERSION = '1.4' # current Doodle version
CHECK_NEW_VERSION = True # whether check the latest version
THREAD_SAFE = environ.get('APPENGINE_RUNTIME') == 'python27' # whether enable thread safe mode,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b87dddeb5d3419f3ab313b67e06d648d48d1b1c | 84 | py | Python | config.py | mathur/mushroom_classifier | acc8f5d01b131603f85a0e5ffc8e72a6e686442c | [
"Apache-2.0"
] | 7 | 2016-04-26T21:15:35.000Z | 2019-11-16T22:23:02.000Z | config.py | mathur/mushroom_classifier | acc8f5d01b131603f85a0e5ffc8e72a6e686442c | [
"Apache-2.0"
] | null | null | null | config.py | mathur/mushroom_classifier | acc8f5d01b131603f85a0e5ffc8e72a6e686442c | [
"Apache-2.0"
] | 1 | 2019-01-14T10:41:30.000Z | 2019-01-14T10:41:30.000Z | LEARNING_RATE = 0.2
NUM_TRAINING_ITERATIONS = 50000
CONVERGENCE_THRESHOLD = 0.000001 | 28 | 32 | 0.845238 | LEARNING_RATE = 0.2
NUM_TRAINING_ITERATIONS = 50000
CONVERGENCE_THRESHOLD = 0.000001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76e2cf3e2e3f13da61d00dd1332f195aba94446e | 157 | py | Python | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | null | null | null | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | 5 | 2020-06-06T01:00:13.000Z | 2021-06-09T18:49:18.000Z | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | null | null | null | #!/home/kasengchou/git/dj-cms/py-env/bin/python3.6
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 26.166667 | 50 | 0.770701 | #!/home/kasengchou/git/dj-cms/py-env/bin/python3.6
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f77e17739df7045ad055482aa2a1ef729e47ec68 | 10,639 | py | Python | beamlines/nanomax/macro_attenuate.py | Lexelius/contrast | 175a289e33775bc5b7a6a2a65c6b13761c618272 | [
"MIT"
] | 3 | 2021-05-20T07:49:53.000Z | 2021-07-12T11:27:39.000Z | beamlines/nanomax/macro_attenuate.py | alexbjorling/contrast | ef7d6d8c51fb922e89c1c46db734e3c09f88a9fc | [
"MIT"
] | 1 | 2021-04-20T10:09:17.000Z | 2021-04-20T10:09:17.000Z | beamlines/nanomax/macro_attenuate.py | alexbjorling/contrast | ef7d6d8c51fb922e89c1c46db734e3c09f88a9fc | [
"MIT"
] | 2 | 2021-08-03T15:13:06.000Z | 2021-09-02T09:47:37.000Z | """
Module providing a macro to automatically absorb X percent of the
beam using the absorbers at the NanoMAX beamline
"""
# ToDo
# - avoid elements with absorption edges close to the current energy
# - way of printing the closest possible absorption values
| 43.96281 | 125 | 0.51565 | """
Module providing a macro to automatically absorb X percent of the
beam using the absorbers at the NanoMAX beamline
"""
import os
import numpy as np
from contrast.environment import env, macro, register_shortcut, runCommand
# ToDo
# - avoid elements with absorption edges close to the current energy
# ... | 0 | 10,238 | 0 | 0 | 0 | 0 | 0 | 38 | 90 |
cde6ac42dd903016ad321671e739158b049c791e | 6,824 | py | Python | instantdl/evaluation/Utils_data_evaluation.py | aliechoes/InstantDL | ce88ff7971c7cd49b4279960cd820b72474daa42 | [
"MIT"
] | 37 | 2020-05-23T16:46:38.000Z | 2022-03-14T12:27:38.000Z | instantdl/evaluation/Utils_data_evaluation.py | ruolinsss/InstantDL | c8c9cce96baafb1bafc3fb021ab37418785c6d8f | [
"MIT"
] | 18 | 2020-06-17T13:34:33.000Z | 2022-02-09T23:47:32.000Z | instantdl/evaluation/Utils_data_evaluation.py | ruolinsss/InstantDL | c8c9cce96baafb1bafc3fb021ab37418785c6d8f | [
"MIT"
] | 6 | 2020-06-17T14:00:54.000Z | 2021-07-27T06:27:08.000Z | """
InstantDL
Utils for data evaluation
Written by Dominik Waibel
"""
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "Computer Modern Roman"
from skimage import io
from skimage.io import imread
from skimage.color import gray2rgb, rgb2gray
from skimage.transform import resize
import os... | 41.865031 | 140 | 0.724795 | """
InstantDL
Utils for data evaluation
Written by Dominik Waibel
"""
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "Computer Modern Roman"
from skimage import io
from skimage.io import imread
from skimage.color import gray2rgb, rgb2gray
from skimage.transform import resize
import os... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db7016b7502cf910b5e7181eaba57cbebf2abc58 | 3,908 | py | Python | openmdao.main/src/openmdao/main/test/test_exprmapper.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | 1 | 2020-06-28T20:38:56.000Z | 2020-06-28T20:38:56.000Z | openmdao.main/src/openmdao/main/test/test_exprmapper.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | openmdao.main/src/openmdao/main/test/test_exprmapper.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | import unittest
nodes = ['A', 'B', 'C', 'D']
if __name__ == "__main__":
unittest.main()
| 31.772358 | 107 | 0.523797 | import unittest
from openmdao.main.assembly import ExprMapper, Assembly, set_as_top
from openmdao.main.component import Component
from openmdao.main.datatypes.int import Int
from openmdao.main.expreval import ExprEvaluator
nodes = ['A', 'B', 'C', 'D']
class Simple(Component):
a = Int(iotype='in')
b = Int(i... | 0 | 0 | 0 | 2,642 | 0 | 892 | 0 | 119 | 158 |
22a11db03a101448d5407d23793a178572bfb3b7 | 885 | py | Python | SoftLayer/CLI/sshkey/list.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 126 | 2015-01-05T05:09:22.000Z | 2021-07-02T00:16:35.000Z | SoftLayer/CLI/sshkey/list.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 969 | 2015-01-05T15:55:31.000Z | 2022-03-31T19:55:20.000Z | SoftLayer/CLI/sshkey/list.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 176 | 2015-01-22T11:23:40.000Z | 2022-02-11T13:16:58.000Z | """List SSH keys."""
# :license: MIT, see LICENSE for more details.
| 25.285714 | 69 | 0.515254 | """List SSH keys."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
@click.command()
@click.option('--sortby',
help='Column to sort by',
type=click.Choice(['id',
... | 0 | 686 | 0 | 0 | 0 | 0 | 0 | 17 | 113 |
5f511edbc1c5ee755c4dc2d1720e1d22c5f8a152 | 503 | py | Python | core/crypter.py | DtxdF/reverse-shell-sdc | d03554561166067407331a4c728a975df03c9614 | [
"MIT"
] | 1 | 2019-01-26T20:02:00.000Z | 2019-01-26T20:02:00.000Z | crypter.py | DtxdF/sdc | c1ca8b7be6de42b1e5197f98414db05fd2657f1e | [
"MIT"
] | null | null | null | crypter.py | DtxdF/sdc | c1ca8b7be6de42b1e5197f98414db05fd2657f1e | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from Crypto.Cipher import AES
from Crypto import Random
iv = Random.new().read(AES.block_size)
| 29.588235 | 57 | 0.725646 | # -*- coding: UTF-8 -*-
from Crypto.Cipher import AES
from Crypto import Random
iv = Random.new().read(AES.block_size)
def encrypt(text, key, inicialization_vector=iv):
ces = AES.new(key, AES.MODE_CFB, inicialization_vector)
cipher_end = inicialization_vector + ces.encrypt(text)
return cipher_end.en... | 0 | 0 | 0 | 0 | 0 | 327 | 0 | 0 | 50 |
eb8bf5b97c0067c20c0d042bcf77ff6052931c07 | 11,588 | py | Python | fastreid/utils/get_st_matrix.py | weleen/MGH.pytorch | 69f2830f6bd60fe3b33c80c04540c0c800d26de1 | [
"Apache-2.0"
] | 4 | 2021-10-06T15:57:29.000Z | 2021-12-21T12:46:19.000Z | fastreid/utils/get_st_matrix.py | weleen/MGH.pytorch | 69f2830f6bd60fe3b33c80c04540c0c800d26de1 | [
"Apache-2.0"
] | 1 | 2022-02-14T06:36:19.000Z | 2022-02-24T08:18:39.000Z | fastreid/utils/get_st_matrix.py | weleen/MGH.pytorch | 69f2830f6bd60fe3b33c80c04540c0c800d26de1 | [
"Apache-2.0"
] | null | null | null | import glob
import os
if __name__ == "__main__":
data_dir = "/data/wuyiming/reid/msmt/MSMT17_V1/train/"
imgs_path = glob.glob(os.path.join(data_dir, '*', '*.jpg'))
matrix = get_st_matrix(imgs_path, pseudo_labels=None)
| 37.993443 | 179 | 0.569382 | import glob
import math
import os
import numpy as np
def joint_similarity(q_cam, q_frame, g_cam, g_frame, distribution, score=None):
gamma = 5
interval = 100
score_st = np.zeros((len(q_cam), len(g_cam)))
for i in range(len(q_cam)):
for j in range(len(g_cam)):
if q_frame[i] > g_fra... | 0 | 0 | 0 | 0 | 0 | 11,115 | 0 | -13 | 252 |
82b5b7b8f5f9224c7b5fcaf67ab14cb67482b2bc | 5,787 | py | Python | python/Lib/site-packages/tensorflow/contrib/nccl/ops/gen_nccl_ops.py | LiquidInkCo/ImageClassifier | c0d471a55a70b3118178488db3c005a9277baade | [
"Apache-2.0"
] | 1 | 2018-01-20T15:08:00.000Z | 2018-01-20T15:08:00.000Z | python/Lib/site-packages/tensorflow/contrib/nccl/ops/gen_nccl_ops.py | LiquidInkCo/ImageClassifier | c0d471a55a70b3118178488db3c005a9277baade | [
"Apache-2.0"
] | null | null | null | python/Lib/site-packages/tensorflow/contrib/nccl/ops/gen_nccl_ops.py | LiquidInkCo/ImageClassifier | c0d471a55a70b3118178488db3c005a9277baade | [
"Apache-2.0"
] | null | null | null | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
# Needed to trigger the call to _set_call_cpp_shape_fn.
def nccl_all_reduce(input, reduction, num_devices, shared_name, name=None):
r"""Outputs a tensor containing the reduction across all input tensors passed to ops
with... | 26.18552 | 98 | 0.658027 | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from google.protobuf import text_format as _text_format
from tensorflow.core.framework import op_def_pb2 as _op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorfl... | 0 | 0 | 0 | 0 | 0 | 244 | 0 | 275 | 181 |
91cfa64f5eaebcc6371e8bfbd6095f967a21bd64 | 52 | py | Python | python/testData/resolve/TypeUndeclaredClassAttr.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/resolve/TypeUndeclaredClassAttr.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/resolve/TypeUndeclaredClassAttr.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z |
print(A.my_attr)
# <ref> | 8.666667 | 16 | 0.5 | class A:
pass
print(A.my_attr)
# <ref> | 0 | 0 | 0 | -4 | 0 | 0 | 0 | 0 | 22 |
9e78a464d85758a6410cf9ef2916db721432642c | 4,860 | py | Python | radar_label_convert_kitti_format.py | wzan0001/Astyx-radar-dataset-convert-to-kitti-format | f0e6bf04fc9cd7b49c96f09803598a2c8561bf5a | [
"MIT"
] | 12 | 2019-11-04T08:56:41.000Z | 2022-03-29T05:47:14.000Z | radar_label_convert_kitti_format.py | paland3/Astyx-radar-dataset-convert-to-kitti-format | f0e6bf04fc9cd7b49c96f09803598a2c8561bf5a | [
"MIT"
] | 3 | 2019-12-04T18:19:06.000Z | 2020-10-08T12:34:21.000Z | radar_label_convert_kitti_format.py | paland3/Astyx-radar-dataset-convert-to-kitti-format | f0e6bf04fc9cd7b49c96f09803598a2c8561bf5a | [
"MIT"
] | 3 | 2019-12-04T18:06:37.000Z | 2020-10-01T09:25:10.000Z | #####################################################
##radar kitti ##
#####################################################
| 37.384615 | 122 | 0.480864 | #####################################################
##将radar 数据转为kitti格式 ##
#####################################################
import json
import math
import os
import numpy as np
import utils
def rotMat2quatern(R):
# transform the rotation matrix into quatern
q = np.zeros... | 21 | 0 | 0 | 0 | 0 | 4,519 | 0 | -44 | 225 |
130d8cea94163011e3019f8d2e8e7db66b3df129 | 2,522 | py | Python | python/sparknlp/__init__.py | rohannng/spark-nlp | ea1b78a54223c2c94b506312367f0ac678c26228 | [
"Apache-2.0"
] | 1 | 2020-04-09T03:35:27.000Z | 2020-04-09T03:35:27.000Z | python/sparknlp/__init__.py | rohannng/spark-nlp | ea1b78a54223c2c94b506312367f0ac678c26228 | [
"Apache-2.0"
] | 2 | 2020-02-26T00:51:15.000Z | 2021-09-27T22:38:55.000Z | python/sparknlp/__init__.py | rohannng/spark-nlp | ea1b78a54223c2c94b506312367f0ac678c26228 | [
"Apache-2.0"
] | null | null | null | import sys
from sparknlp import annotator
sys.modules['com.johnsnowlabs.nlp.annotators'] = annotator
sys.modules['com.johnsnowlabs.nlp.annotators.tokenizer'] = annotator
sys.modules['com.johnsnowlabs.nlp.annotators.tokenizer.wordpiece'] = annotator
sys.modules['com.johnsnowlabs.nlp.annotators.ner'] = annotator
sys.mod... | 46.703704 | 182 | 0.758128 | import sys
from pyspark.sql import SparkSession
from sparknlp import annotator
from sparknlp.base import DocumentAssembler, Finisher, TokenAssembler, Chunk2Doc, Doc2Chunk
sys.modules['com.johnsnowlabs.nlp.annotators'] = annotator
sys.modules['com.johnsnowlabs.nlp.annotators.tokenizer'] = annotator
sys.modules['com.joh... | 0 | 0 | 0 | 0 | 0 | 683 | 0 | 85 | 90 |
6b12d7c010c6f962cecef9162c031dc86f92b8cb | 1,567 | py | Python | cigale_all.py | wisemanp/DESSNHosts | 882c0b81b5164fe16c234366e52e99c167e948a8 | [
"MIT"
] | null | null | null | cigale_all.py | wisemanp/DESSNHosts | 882c0b81b5164fe16c234366e52e99c167e948a8 | [
"MIT"
] | null | null | null | cigale_all.py | wisemanp/DESSNHosts | 882c0b81b5164fe16c234366e52e99c167e948a8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import astropy.io.fits as fits
if __name__=="__main__":
main()
| 35.613636 | 104 | 0.708998 | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import subprocess
import glob
import matplotlib.pyplot as plt
import seaborn as sns
import logging
import os
import argparse
import astropy.io.fits as fits
from astropy.coordinates import SkyCoord
from astropy.table import Table
from astropy import units a... | 0 | 0 | 0 | 0 | 0 | 1,014 | 0 | 83 | 378 |
4de3db5fce1fe180f827eb981705a978e547069e | 1,705 | py | Python | tests/stix_translation/test_maas360_stix_to_query.py | rkchaudhary/stix-shifter | 96985773382e8bd1730df84c4089e620b4eb3939 | [
"Apache-2.0"
] | null | null | null | tests/stix_translation/test_maas360_stix_to_query.py | rkchaudhary/stix-shifter | 96985773382e8bd1730df84c4089e620b4eb3939 | [
"Apache-2.0"
] | null | null | null | tests/stix_translation/test_maas360_stix_to_query.py | rkchaudhary/stix-shifter | 96985773382e8bd1730df84c4089e620b4eb3939 | [
"Apache-2.0"
] | null | null | null | from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
| 46.081081 | 193 | 0.677419 | from stix_shifter.stix_translation import stix_translation
import unittest
translation = stix_translation.StixTranslation()
class TestStixToQuery(unittest.TestCase):
"""
class to perform unit test case guardium translate query
"""
def _test_query_assertions(self, query, queries):
"""
... | 0 | 0 | 0 | 1,557 | 0 | 0 | 0 | -6 | 45 |
77dfe6ceccd70bce06d70a820cbf8fa3dec8473f | 2,185 | py | Python | subcircuit/devices/isense.py | joehood/SubCircuit | 0097735f71b19a4d3f95696d3af0a3df4a620e25 | [
"Apache-2.0"
] | 6 | 2016-03-29T02:04:05.000Z | 2021-11-09T00:26:20.000Z | subcircuit/devices/isense.py | joehood/SubCircuit | 0097735f71b19a4d3f95696d3af0a3df4a620e25 | [
"Apache-2.0"
] | null | null | null | subcircuit/devices/isense.py | joehood/SubCircuit | 0097735f71b19a4d3f95696d3af0a3df4a620e25 | [
"Apache-2.0"
] | null | null | null | """Current Scope Device.
Copyright 2014 Joe Hood
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... | 29.133333 | 72 | 0.637986 | """Current Scope Device.
Copyright 2014 Joe Hood
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... | 0 | 0 | 0 | 1,487 | 0 | 0 | 0 | 26 | 91 |
f4084514a406d6266af2d042d121afe74ab07c77 | 594 | py | Python | plugins/Cowsay/__init__.py | ecumene/Automata | f34a329d161111ee42caaf5fd2bca8d3a202ed39 | [
"MIT"
] | 11 | 2019-07-11T12:53:45.000Z | 2022-01-19T21:11:38.000Z | plugins/Cowsay/__init__.py | ecumene/Automata | f34a329d161111ee42caaf5fd2bca8d3a202ed39 | [
"MIT"
] | 36 | 2019-10-03T18:48:15.000Z | 2022-02-01T16:01:07.000Z | plugins/Cowsay/__init__.py | ecumene/Automata | f34a329d161111ee42caaf5fd2bca8d3a202ed39 | [
"MIT"
] | 21 | 2019-12-09T03:42:34.000Z | 2022-01-30T22:48:58.000Z |
COWSAY_API = "https://cowsay.morecode.org/say"
| 22.846154 | 87 | 0.6633 | import urllib.parse
from nextcord.ext import commands
import nextcord
import httpx
from Plugin import AutomataPlugin
COWSAY_API = "https://cowsay.morecode.org/say"
class Cowsay(AutomataPlugin):
"""
Cowsay
Made using https://cowsay.morecode.org/
"""
@commands.command()
async def cowsay(self... | 4 | 296 | 0 | 106 | 0 | 0 | 0 | 7 | 135 |
35b767e2a5ac0d888b05fcff65cdefe560265a12 | 33,847 | py | Python | garch.py | Brigittecasro1/armagarch | dc9967363b9eeba0510540a34e1d5e987542334a | [
"MIT"
] | null | null | null | garch.py | Brigittecasro1/armagarch | dc9967363b9eeba0510540a34e1d5e987542334a | [
"MIT"
] | null | null | null | garch.py | Brigittecasro1/armagarch | dc9967363b9eeba0510540a34e1d5e987542334a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 2 20:08:14 2018
@author: Ian
"""
| 36.87037 | 104 | 0.429344 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 2 20:08:14 2018
@author: Ian
"""
from basicFun import hessian_2sided
from basicFun import getLag
import numpy as np
import scipy
import shutil
import datetime
from scipy.optimize import brute
from scipy.special import gamma
from statsmodels.tsa.arima_mode... | 0 | 440 | 0 | 33,049 | 0 | 0 | 0 | 38 | 233 |
606368de9fea1a94e44707b87c87a602d81fa160 | 7,358 | py | Python | src/ralph/data_center/tests/factories.py | DoNnMyTh/ralph | 97b91639fa68965ad3fd9d0d2652a6545a2a5b72 | [
"Apache-2.0"
] | 1,668 | 2015-01-01T12:51:20.000Z | 2022-03-29T09:05:35.000Z | src/ralph/data_center/tests/factories.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 2,314 | 2015-01-02T13:26:26.000Z | 2022-03-29T04:06:03.000Z | src/ralph/data_center/tests/factories.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | 534 | 2015-01-05T12:40:28.000Z | 2022-03-29T21:10:12.000Z | from datetime import datetime
date_now = datetime.now().date()
| 29.432 | 80 | 0.71514 | from datetime import datetime, timedelta
import factory
from factory.django import DjangoModelFactory
from factory.fuzzy import FuzzyDecimal, FuzzyInteger
from ralph.assets.models.choices import AssetSource
from ralph.assets.tests.factories import (
AssetHolderFactory,
BaseObjectFactory,
BudgetInfoFactory... | 0 | 196 | 0 | 5,774 | 0 | 0 | 0 | 764 | 545 |