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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
94d9cbc12fc1cb7e7c2dc2e1315b11d5a8e431bd | 1,185 | py | Python | parlai/agents/programr/parser/template/nodes/formal.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | parlai/agents/programr/parser/template/nodes/formal.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | parlai/agents/programr/parser/template/nodes/formal.py | roholazandie/ParlAI | 32352cab81ecb666aefd596232c5ed9f33cbaeb9 | [
"MIT"
] | null | null | null | # from parlai.agents.programr.utils.logging.ylogger import YLogger
import parlai.utils.logging as logging
| 30.384615 | 107 | 0.598312 | from parlai.agents.programr.parser.template.nodes.base import TemplateNode
# from parlai.agents.programr.utils.logging.ylogger import YLogger
import parlai.utils.logging as logging
class TemplateFormalNode(TemplateNode):
def __init__(self):
TemplateNode.__init__(self)
def resolve_to_string(self, brai... | 0 | 0 | 0 | 981 | 0 | 0 | 0 | 53 | 45 |
b18a7c41b051afd662346c840d7f7b3e16bbda88 | 3,844 | py | Python | home.py | prakhar085/LIbrary-Management-System | 1c2edb270f8094411a6e3e160148a8289dd1ae1a | [
"Apache-2.0"
] | null | null | null | home.py | prakhar085/LIbrary-Management-System | 1c2edb270f8094411a6e3e160148a8289dd1ae1a | [
"Apache-2.0"
] | null | null | null | home.py | prakhar085/LIbrary-Management-System | 1c2edb270f8094411a6e3e160148a8289dd1ae1a | [
"Apache-2.0"
] | null | null | null | import mysql.connector
import Admin
import lib_users
lib_database = mysql.connector.connect(
host="localhost",
user="root",
password="PRA085@dik", #Use your server password.
database='library_management_system',
)
##creating tables..
'''
my_cursor = lib_database.cursor()
# 1: Books (columns:- [author +... | 38.828283 | 154 | 0.576743 | import mysql.connector
import Admin
import lib_users
lib_database = mysql.connector.connect(
host="localhost",
user="root",
password="PRA085@dik", #Use your server password.
database='library_management_system',
)
##creating tables..
'''
my_cursor = lib_database.cursor()
# 1: Books (columns:- [author +... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c8edb885003da13dff0ee59b0d0fda7a4bbb9e72 | 5,742 | py | Python | polybius/graphics/ui/menu.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | polybius/graphics/ui/menu.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | polybius/graphics/ui/menu.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | """
Author: Trevor Stalnaker
File: menu.py
A general class for creating menus
Parameters:
pos - (x,y) position for the top-left corner of the menu
dims - (width, height) pixels of the menu
commands - list of dictionaries specifying the button attributes
padding - (horizontal, vertical) padding between... | 36.341772 | 96 | 0.537966 | """
Author: Trevor Stalnaker
File: menu.py
A general class for creating menus
Parameters:
pos - (x,y) position for the top-left corner of the menu
dims - (width, height) pixels of the menu
commands - list of dictionaries specifying the button attributes
padding - (horizontal, vertical) padding between... | 0 | 0 | 0 | 4,922 | 0 | 0 | 0 | 79 | 112 |
4a62c4e3bb93b287b5d15270a7fb934bb56b2711 | 1,938 | py | Python | onmt/bin/release_model.py | IliasPap/transformer-slt | 12913f1b15465509696bd2907c74c54653669f8d | [
"Apache-2.0"
] | 93 | 2020-04-03T01:00:15.000Z | 2022-03-16T09:33:49.000Z | onmt/bin/release_model.py | IliasPap/transformer-slt | 12913f1b15465509696bd2907c74c54653669f8d | [
"Apache-2.0"
] | 10 | 2020-04-21T13:43:23.000Z | 2022-02-02T16:11:25.000Z | onmt/bin/release_model.py | IliasPap/transformer-slt | 12913f1b15465509696bd2907c74c54653669f8d | [
"Apache-2.0"
] | 15 | 2020-04-03T13:41:28.000Z | 2022-03-28T11:01:16.000Z | #!/usr/bin/env python
def get_ctranslate2_model_spec(opt):
"""Creates a CTranslate2 model specification from the model options."""
is_vanilla_transformer = (
opt.encoder_type == "transformer"
and opt.decoder_type == "transformer"
and opt.position_encoding
and opt.enc_layers == ... | 37.269231 | 78 | 0.617647 | #!/usr/bin/env python
import argparse
import torch
def get_ctranslate2_model_spec(opt):
"""Creates a CTranslate2 model specification from the model options."""
is_vanilla_transformer = (
opt.encoder_type == "transformer"
and opt.decoder_type == "transformer"
and opt.position_encoding
... | 0 | 0 | 0 | 0 | 0 | 1,190 | 0 | -15 | 67 |
7eb4dbd3592a4b7a3e08979f7047983b17d9afc1 | 1,424 | py | Python | gans/models/generator.py | kpandey008/comparing-gans | 004134663d5332232a86c0276821ee784eb9e189 | [
"MIT"
] | 2 | 2021-08-25T07:40:37.000Z | 2022-01-09T11:17:50.000Z | gans/models/generator.py | kpandey008/comparing-gans | 004134663d5332232a86c0276821ee784eb9e189 | [
"MIT"
] | null | null | null | gans/models/generator.py | kpandey008/comparing-gans | 004134663d5332232a86c0276821ee784eb9e189 | [
"MIT"
] | 1 | 2021-08-25T07:40:40.000Z | 2021-08-25T07:40:40.000Z | import torch.nn as nn
| 37.473684 | 87 | 0.662219 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Generator(nn.Module):
def __init__(self, code_size):
super(Generator, self).__init__()
self.code_size = code_size
# Define the model here
self.deconv_1 = nn.ConvTranspose2d(code_size, 256, 4, stride=2, bias=... | 0 | 0 | 0 | 1,333 | 0 | 0 | 0 | 1 | 67 |
34a4f4aab0f2e6c5ffda9f05dfd2b103d20b3c61 | 692 | py | Python | liuqi/20180403/h2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | liuqi/20180403/h2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | liuqi/20180403/h2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | """
2.,,
:
100/
1.2
"""
societyman = False
student = True
m = Ticket(societyman)
m1 = m.myprice()
s = Ticket(student)
s1 = s.myprice()
print("{}".format(s1))
print("{}".format(m1))
| 17.74359 | 43 | 0.693642 | """
2.定义一个北京欢乐谷门票类,应用你所定义的类,
计算两个社会青年和一个学生平日比节假日门票能省多少钱
票价是:
除节假日票价100元/天
节假日为平日的1.2倍
学生半价
"""
class Ticket(object):
def __init__(self,species):
self.__species = species
def myprice(self):
if self.__species == True:
vacationprice = 1.2*100*0.5
usualprice = 100*0.5
sprice = vacationprice - ... | 327 | 0 | 0 | 362 | 0 | 0 | 0 | 0 | 23 |
75d3ffb5dc747b1799efae4d880118021f21fbf3 | 2,409 | py | Python | tests/test_pthat.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | 5 | 2021-01-28T13:26:08.000Z | 2022-02-24T08:15:44.000Z | tests/test_pthat.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | null | null | null | tests/test_pthat.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 35.426471 | 103 | 0.724367 | import unittest
from pthat.pthat import PTHat
class TestPthat(unittest.TestCase):
def setUp(self):
self.pthat = PTHat(test_mode=True)
self.pthat.command_type = "I"
self.pthat.command_id = 0
self.pthat.wait_delay = 0
self.pthat.debug = True
def test_get_io_port_status(... | 0 | 0 | 0 | 2,290 | 0 | 0 | 0 | 8 | 45 |
b3c93ff6e21fe264e7a1338ac57af24ddb8a9abc | 7,696 | py | Python | supershowdeport/supershowdeport.py | Car202ui/pythonproyect | 51a5d341be5fa300a041ba0d4e8060584750507a | [
"MIT"
] | null | null | null | supershowdeport/supershowdeport.py | Car202ui/pythonproyect | 51a5d341be5fa300a041ba0d4e8060584750507a | [
"MIT"
] | null | null | null | supershowdeport/supershowdeport.py | Car202ui/pythonproyect | 51a5d341be5fa300a041ba0d4e8060584750507a | [
"MIT"
] | null | null | null | import csv
while True:
print()
print('1) Guardar nuevo producto')
print('2) Consultar Productos')
print('3) Stock Productos')
print('4) Consultar Proveedores')
print('5) Compra a Proveedores')
print('6) Venta al cliente')
print('7) Consultar Transacciones')
print('8) Sa... | 34.053097 | 120 | 0.449974 | import csv
while True:
print()
print('1) Guardar nuevo producto')
print('2) Consultar Productos')
print('3) Stock Productos')
print('4) Consultar Proveedores')
print('5) Compra a Proveedores')
print('6) Venta al cliente')
print('7) Consultar Transacciones')
print('8) Sa... | 22 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
87e979e245b05aa8b4804fadce8a7fea6c5d9342 | 2,497 | py | Python | momos/components/mode.py | codetent/project_momos | 424a46f901941ae0b0641a0c407a1e38ee121e72 | [
"MIT"
] | 2 | 2021-05-12T09:36:08.000Z | 2022-01-10T16:55:52.000Z | momos/components/mode.py | codetent/project_momos | 424a46f901941ae0b0641a0c407a1e38ee121e72 | [
"MIT"
] | null | null | null | momos/components/mode.py | codetent/project_momos | 424a46f901941ae0b0641a0c407a1e38ee121e72 | [
"MIT"
] | null | null | null | from __future__ import annotations
from functools import partial
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Callable
def failure_mode(wrapped: Callable = None, *args, **kwargs) -> UnboundFailureMode:
"""Decorator for creating failure modes inside trigger classes.
"""
if ... | 29.034884 | 114 | 0.637966 | from __future__ import annotations
import inspect
from functools import partial
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Any, Callable, List
class UnboundFailureMode:
"""Failure mode of a trigger not bound to a trigger instance.
"""
def __init__(self, generator: Callable... | 0 | 654 | 0 | 1,299 | 0 | 0 | 0 | 4 | 92 |
2ac61b8cc44ad9d45868e15ea53cc32bd303137b | 521 | py | Python | dictionaries.py | Meesalasai/python- | 344426a66e414212c9f11b6a5e0db80ea6bb2488 | [
"MIT"
] | 1 | 2020-05-22T08:41:45.000Z | 2020-05-22T08:41:45.000Z | dictionaries.py | Meesalasai/python- | 344426a66e414212c9f11b6a5e0db80ea6bb2488 | [
"MIT"
] | null | null | null | dictionaries.py | Meesalasai/python- | 344426a66e414212c9f11b6a5e0db80ea6bb2488 | [
"MIT"
] | null | null | null | mystuff = {"key1":"value1", "key2":"value2"}
print(mystuff['key1'])
mystuff2 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,3]}}
print(mystuff2)
mystuff3 = {"key1":123, "key2":"value2", "key3":{'123':[1,2, 'grabMe']}}
print(mystuff3 ['key3']['123'][2])
mystuff4 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,... | 28.944444 | 72 | 0.602687 | mystuff = {"key1":"value1", "key2":"value2"}
print(mystuff['key1'])
mystuff2 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,3]}}
print(mystuff2)
mystuff3 = {"key1":123, "key2":"value2", "key3":{'123':[1,2, 'grabMe']}}
print(mystuff3 ['key3']['123'][2])
mystuff4 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5ecde4117e77fbf995bc0e68372b19ecfb683464 | 2,507 | py | Python | bites/bite038.py | ChidinmaKO/Chobe-bitesofpy | 2f933e6c8877a37d1ce7ef54ea22169fc67417d3 | [
"MIT"
] | null | null | null | bites/bite038.py | ChidinmaKO/Chobe-bitesofpy | 2f933e6c8877a37d1ce7ef54ea22169fc67417d3 | [
"MIT"
] | null | null | null | bites/bite038.py | ChidinmaKO/Chobe-bitesofpy | 2f933e6c8877a37d1ce7ef54ea22169fc67417d3 | [
"MIT"
] | 1 | 2019-07-16T19:12:52.000Z | 2019-07-16T19:12:52.000Z | # Bite 38. Using ElementTree to parse XML
import xml.etree.ElementTree as ET
# from OMDB
xmlstring = '''<?xml version="1.0" encoding="UTF-8"?>
<root response="True">
<movie title="The Prestige" year="2006" rated="PG-13" released="20 Oct 2006" runtime="130 min" genre="Drama, Mystery, Sci-Fi" director="Christopher No... | 39.793651 | 162 | 0.684085 | # Bite 38. Using ElementTree to parse XML
import xml.etree.ElementTree as ET
# from OMDB
xmlstring = '''<?xml version="1.0" encoding="UTF-8"?>
<root response="True">
<movie title="The Prestige" year="2006" rated="PG-13" released="20 Oct 2006" runtime="130 min" genre="Drama, Mystery, Sci-Fi" director="Christopher No... | 0 | 0 | 0 | 0 | 0 | 388 | 0 | 0 | 69 |
0f858cf036557a920a2671ccdb59f00d04224cf6 | 2,603 | py | Python | perftest.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | perftest.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | perftest.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | """
Simple Flask web site
"""
# import flask
# from flask import render_template
# from flask import request
# from flask import url_for
# from flask import jsonify # For AJAX transactions
# Our own modules
import find
###
# Globals
###
# app = flask.Flask(__name__)
import CONFIG
####
# Word list is global data, ... | 26.835052 | 71 | 0.617749 | """
Simple Flask web site
"""
# import flask
# from flask import render_template
# from flask import request
# from flask import url_for
# from flask import jsonify # For AJAX transactions
import json
import logging
import sys
# Our own modules
from letterbag import LetterBag
import find
###
# Globals
###
# app = ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -18 | 89 |
d1d74d8f010ece80459165ef9cde3334947ca929 | 6,040 | py | Python | src/invisibility_cloak_improved.py | tobybreckon/colour-filtering | 1679db2c075036f68dcc8a75c575c8f362e9ec94 | [
"MIT"
] | 7 | 2022-03-23T23:02:58.000Z | 2022-03-24T21:48:31.000Z | src/invisibility_cloak_improved.py | tobybreckon/chroma-keying | 1679db2c075036f68dcc8a75c575c8f362e9ec94 | [
"MIT"
] | null | null | null | src/invisibility_cloak_improved.py | tobybreckon/chroma-keying | 1679db2c075036f68dcc8a75c575c8f362e9ec94 | [
"MIT"
] | null | null | null | #####################################################################
# Task 3 : run an improved live invisibility cloak demo using:
# (a) a convex hull operation around the foreground
# (b) feathered blenidng for compositing
#####################################################################
imp... | 35.321637 | 78 | 0.564901 | #####################################################################
# Task 3 : run an improved live invisibility cloak demo using:
# (a) a convex hull operation around the foreground
# (b) feathered blenidng for compositing
#####################################################################
imp... | 0 | 0 | 0 | 0 | 0 | 897 | 0 | 0 | 23 |
5d19b8990930629738012399d665a9f5fe291a42 | 59,354 | py | Python | heat/tests/aws/test_instance.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | heat/tests/aws/test_instance.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | heat/tests/aws/test_instance.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 42.762248 | 79 | 0.616926 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 0 | 0 | 0 | 57,010 | 0 | 0 | 0 | 267 | 510 |
2236bb3f5e0889a9a3b0ada9472e34241312f6ac | 575 | py | Python | GRL/1a.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | GRL/1a.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | GRL/1a.py | ToshikiShimizu/AOJ | e87f684b6520189170842e800451063dad1369dd | [
"MIT"
] | null | null | null | import heapq
INF = 10**10
V, E, r = map(int,input().split())
adj = [[] for i in range(V)]
for e in range(E):
s, t, d = map(int,input().split())
adj[s].append((t,d))
dists = [INF for i in range(V)]
dists[r] = 0
pq = [(0, r)]
while(pq):
d, node = heapq.heappop(pq)
if (d > dists[node]):#
contin... | 22.115385 | 50 | 0.523478 | import heapq
INF = 10**10
V, E, r = map(int,input().split())
adj = [[] for i in range(V)]
for e in range(E):
s, t, d = map(int,input().split())
adj[s].append((t,d))
dists = [INF for i in range(V)]
dists[r] = 0
pq = [(0, r)]
while(pq):
d, node = heapq.heappop(pq)
if (d > dists[node]):#探索の対象にする必要があるか確... | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b0f499e5ff370ae1dbccfcebabafb9310055e8b | 1,556 | py | Python | libra/discovery_info.py | MoveOnLibra/libra-core | 3b04fd86d263a22e323cca873c13e6397a560f8b | [
"MIT"
] | 5 | 2020-01-06T08:31:23.000Z | 2020-10-17T19:24:30.000Z | libra/discovery_info.py | MoveOnLibra/libra-core | 3b04fd86d263a22e323cca873c13e6397a560f8b | [
"MIT"
] | 1 | 2020-04-08T10:35:48.000Z | 2020-04-08T10:35:48.000Z | libra/discovery_info.py | MoveOnLibra/libra-core | 3b04fd86d263a22e323cca873c13e6397a560f8b | [
"MIT"
] | 1 | 2020-04-07T11:19:59.000Z | 2020-04-07T11:19:59.000Z | from canoser import BytesT
Multiaddr = BytesT()
| 43.222222 | 84 | 0.705656 | from canoser import Struct, BytesT
from libra.account_address import Address
from libra.crypto.x25519 import X25519_PUBLIC_KEY_LENGTH
Multiaddr = BytesT()
class DiscoveryInfo(Struct):
"""
# A validator's discovery information, which describes how to dial the
# validator's node and full nodes.
... | 0 | 0 | 0 | 1,368 | 0 | 0 | 0 | 63 | 71 |
c7310c19f18e1ac5d1a3d03a5ccbb509d0cc42bc | 867 | py | Python | mozilla_django_oidc_db/migrations/0003_auto_20210719_0803.py | maykinmedia/mozilla-django-oidc-db | f576a45ee062370b1e07358769a841898509d37f | [
"MIT"
] | null | null | null | mozilla_django_oidc_db/migrations/0003_auto_20210719_0803.py | maykinmedia/mozilla-django-oidc-db | f576a45ee062370b1e07358769a841898509d37f | [
"MIT"
] | 21 | 2021-07-05T15:18:37.000Z | 2022-03-30T08:02:17.000Z | mozilla_django_oidc_db/migrations/0003_auto_20210719_0803.py | maykinmedia/mozilla-django-oidc-db | f576a45ee062370b1e07358769a841898509d37f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.24 on 2021-07-19 08:03
| 32.111111 | 257 | 0.618224 | # Generated by Django 2.2.24 on 2021-07-19 08:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
(
"mozilla_django_oidc_db",
"0002_openidconnectconfig_oidc_op_discovery_endpoint",
),
]
operations = [
migrat... | 0 | 0 | 0 | 752 | 0 | 0 | 0 | 19 | 46 |
e07b5265f2534eb4cc1516527d6daef14654de37 | 183,744 | py | Python | userbot/modules/misc.py | Kry9toN/UserBug | e86a1986e817123e002fefa36a2cf51b96cc1e0b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/misc.py | Kry9toN/UserBug | e86a1986e817123e002fefa36a2cf51b96cc1e0b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/misc.py | Kry9toN/UserBug | e86a1986e817123e002fefa36a2cf51b96cc1e0b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-01-12T03:47:26.000Z | 2020-02-26T02:45:33.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
# You can find misc modules, which dont fit in anything xD
""" Userbot module for other small commands. """
import sys
... | 1,080.847059 | 103,581 | 0.958921 | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
# You can find misc modules, which dont fit in anything xD
""" Userbot module for other small commands. """
from rando... | 0 | 4,032 | 0 | 0 | 0 | 0 | 0 | 45 | 338 |
de4a4132a1c16c37a0367e5d6af5cc08778ca625 | 6,613 | py | Python | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney-hardware/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | null | null | null | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney-hardware/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | 4 | 2021-06-08T19:58:45.000Z | 2022-03-08T21:09:20.000Z | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | null | null | null |
PIXEL_MULTIPLIER = 10
IMAGE_PATH = '/Users/colind/Documents/Projects/ZeroOne/ZeroOne/Graphics/Images'
# Handle the window close event
try:
# Create the root Tk object
root = Tk()
root.title("ZeroOne DisplayEmulator")
# Hook the close window event
root.protocol("WM_DELETE_WINDOW", close_windo... | 32.737624 | 126 | 0.594738 | import fnmatch, os, socket
import pickle, timer_cm, dill
import ZO
from threading import *
from tkinter import *
from PIL import ImageTk, Image
PIXEL_MULTIPLIER = 10
IMAGE_PATH = '/Users/colind/Documents/Projects/ZeroOne/ZeroOne/Graphics/Images'
def get_images():
return fnmatch.filter(os.listdir(IMAGE_PATH), '*... | 0 | 0 | 0 | 5,609 | 0 | 105 | 0 | 12 | 201 |
9533e5b7c31d1b94c5bd3b81fff3712f1ab30c15 | 951 | py | Python | setup.py | jonathansick/magphysio | 81c8fb20f48be03ec9e67b0b8be4efbd8dc5a468 | [
"MIT"
] | null | null | null | setup.py | jonathansick/magphysio | 81c8fb20f48be03ec9e67b0b8be4efbd8dc5a468 | [
"MIT"
] | null | null | null | setup.py | jonathansick/magphysio | 81c8fb20f48be03ec9e67b0b8be4efbd8dc5a468 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from setuptools import setup, find_packages
try:
long_description = open(rel_path('README.rst'), 'rt').read()
except IOError:
long_description = ''
setup(
name="magphysio",
version=get_version(),
packages=find_packages(),
# install_requires=['Jinja2']... | 23.775 | 71 | 0.646688 | #!/usr/bin/env python
# encoding: utf-8
import os
import re
from setuptools import setup, find_packages
def rel_path(path):
return os.path.join(os.path.dirname(__file__), path)
def get_version():
with open(rel_path(os.path.join("magphysio", "__init__.py"))) as f:
for line in f:
if line.... | 0 | 0 | 0 | 0 | 0 | 304 | 0 | -24 | 91 |
256be270fc95c46845e5215d3a7eb2bc3d77f87b | 240 | py | Python | learning-python/src/falcon/quotes.py | learning-software-development/packt-publishing-tutorials | 625618d9eff8d108645e1f4035ef1b00869d12af | [
"Unlicense"
] | null | null | null | learning-python/src/falcon/quotes.py | learning-software-development/packt-publishing-tutorials | 625618d9eff8d108645e1f4035ef1b00869d12af | [
"Unlicense"
] | null | null | null | learning-python/src/falcon/quotes.py | learning-software-development/packt-publishing-tutorials | 625618d9eff8d108645e1f4035ef1b00869d12af | [
"Unlicense"
] | null | null | null | quotes = [
"Thousands of candles can be lighted from a single candle, "
"and the life of the candle will not be shortened. "
"Happiness never decreases by being shared.",
"Peace comes from within. Do not seek it without."
]
| 34.285714 | 64 | 0.691667 | quotes = [
"Thousands of candles can be lighted from a single candle, "
"and the life of the candle will not be shortened. "
"Happiness never decreases by being shared.",
"Peace comes from within. Do not seek it without."
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad6cda119fdecb885a27c5e40e8ff99f5ca79286 | 1,208 | py | Python | flybirds/utils/uuid_helper.py | ctripcorp/flybirds | 71f24672f16d93a60c906598330ca5e5ea24742f | [
"MIT"
] | 183 | 2021-12-31T08:45:54.000Z | 2022-03-31T06:01:41.000Z | flybirds/utils/uuid_helper.py | ctripcorp/flybird | 713e1217308b0303cc5bb85d0995579e52c6b42c | [
"MIT"
] | 7 | 2022-01-18T05:13:20.000Z | 2022-03-12T06:45:40.000Z | flybirds/utils/uuid_helper.py | ctripcorp/flybird | 713e1217308b0303cc5bb85d0995579e52c6b42c | [
"MIT"
] | 37 | 2021-12-31T09:23:42.000Z | 2022-03-31T04:54:50.000Z | # -*- coding: utf-8 -*-
"""
uuid helper
"""
import random
import time
import uuid
def create_uuid():
"""
Generate random string
"""
return uuid.uuid4()
def create_short_uuid():
"""
Generate random integer
"""
result = str(random.randint(0, 999999999))
return result
def create_s... | 20.827586 | 57 | 0.620033 | # -*- coding: utf-8 -*-
"""
uuid helper
"""
import os
import random
import time
import uuid
def create_uuid():
"""
Generate random string
"""
return uuid.uuid4()
def create_short_uuid():
"""
Generate random integer
"""
result = str(random.randint(0, 999999999))
return result
de... | 0 | 0 | 0 | 0 | 0 | 641 | 0 | -12 | 91 |
95aae2d8c04ed8df7bddc1cea36233bff6cf5269 | 471 | py | Python | app/main/views.py | KenNyakundi01/newsbrief | 4b46e64057a50c2082b892d5ac87b07d985ba32a | [
"MIT"
] | null | null | null | app/main/views.py | KenNyakundi01/newsbrief | 4b46e64057a50c2082b892d5ac87b07d985ba32a | [
"MIT"
] | null | null | null | app/main/views.py | KenNyakundi01/newsbrief | 4b46e64057a50c2082b892d5ac87b07d985ba32a | [
"MIT"
] | null | null | null | #from requests import get_news, search_news
#Review = review.Review
# Views
#@main.route('/')
#def index():
| 27.705882 | 83 | 0.715499 | from flask import render_template,request,redirect,url_for
from . import main
#from requests import get_news, search_news
from .forms import ReviewForm
from ..models import Review
#Review = review.Review
# Views
#@main.route('/')
#def index():
@main.route('/news/<int:id>')
def news(id):
news = get_news(id)
... | 0 | 200 | 0 | 0 | 0 | 0 | 0 | 48 | 110 |
5ae65e052dc05fada2de0fcd59a531212a73e411 | 102 | py | Python | config.py | fender190/Python-API-Challenges | f35881fa6c86a40c64914e6bbbe92e86f6d33da6 | [
"ADSL"
] | 1 | 2021-03-31T01:43:58.000Z | 2021-03-31T01:43:58.000Z | config.py | Tirhas-source/python-api-challenge | 0c84516f35b9b436a03ac802c0cbf6563b0d6a8c | [
"ADSL"
] | null | null | null | config.py | Tirhas-source/python-api-challenge | 0c84516f35b9b436a03ac802c0cbf6563b0d6a8c | [
"ADSL"
] | null | null | null | g_key = 'AIzaSyCKWaRCRJwLO14DFafu9-U5D_uVD_8g4iY'
weather_api_key = 'da7023607babfcda2533cb107c9718b1' | 51 | 52 | 0.882353 | g_key = 'AIzaSyCKWaRCRJwLO14DFafu9-U5D_uVD_8g4iY'
weather_api_key = 'da7023607babfcda2533cb107c9718b1' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
272fe3140c825af7d89c9e3b98d8c0ce4cc4974a | 17,076 | py | Python | pysnmp-with-texts/HM2-DNS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/HM2-DNS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/HM2-DNS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HM2-DNS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HM2-DNS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:31:23 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 136.608 | 2,240 | 0.802881 | #
# PySNMP MIB module HM2-DNS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HM2-DNS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:31:23 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa40290e02615450092943ecdf984946b08abc58 | 757 | py | Python | pwn/.solves/example04.py | b01lers/bootcamp-training-2020 | 5efa86f45df66541b1e4ca7340c689aeda95b99d | [
"MIT"
] | 9 | 2020-10-07T11:21:30.000Z | 2022-02-04T05:08:46.000Z | pwn/.solves/example04.py | b01lers/bootcamp-training-2020 | 5efa86f45df66541b1e4ca7340c689aeda95b99d | [
"MIT"
] | 1 | 2020-10-04T22:19:53.000Z | 2020-10-04T22:19:53.000Z | pwn/.solves/example04.py | b01lers/bootcamp-training-2020 | 5efa86f45df66541b1e4ca7340c689aeda95b99d | [
"MIT"
] | 5 | 2020-10-02T04:18:58.000Z | 2021-06-11T16:18:26.000Z |
context.log_level = 'debug'
context.terminal = ['tmux', 'splitw', '-h']
binary = ELF('./example04')
libc = ELF('/lib/x86_64-linux-gnu/libc.so.6')
p = process('./example04')
gdb.attach(p)
atol_got = binary.symbols['got.atol']
numbers = binary.symbols['numbers']
offset = (atol_got - numbers) / 8
write(1, 1)
atol_l... | 18.925 | 48 | 0.672391 | from pwn import * # NOQA
context.log_level = 'debug'
context.terminal = ['tmux', 'splitw', '-h']
def write(what, where):
p.sendlineafter('>', str(where))
p.sendlineafter('>', str(what))
def read(where):
p.sendlineafter('>', str(where))
return int(p.recvline())
binary = ELF('./example04')
libc = ... | 0 | 0 | 0 | 0 | 0 | 136 | 0 | -4 | 76 |
66bdc117d6b4a1fbc915ec3c6ca9d71f08dc507e | 876 | py | Python | Taller_estruturas_de_control_secuenciales/Python_Daniel/Ejercicio_13.py | Danielnaki/Algoritmos_y_programacion | f6f5ca4f47d4faa63fe0e8ad5eb788aa04938355 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_Daniel/Ejercicio_13.py | Danielnaki/Algoritmos_y_programacion | f6f5ca4f47d4faa63fe0e8ad5eb788aa04938355 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_Daniel/Ejercicio_13.py | Danielnaki/Algoritmos_y_programacion | f6f5ca4f47d4faa63fe0e8ad5eb788aa04938355 | [
"MIT"
] | null | null | null | """
Entradas
Billetes_50000-->int-->N1
Billetes_20000-->int-->N2
Billetes_10000-->int-->N3
Billetes_5000-->int-->N4
Billetes_2000-->int-->N5
Billetes_1000-->int-->N6
Billetes_500-->int-->N7
Billetes_100-->int-->N8
Salidas
Cantidad_dinero-->float-->c_d
"""
N1=int(input("Ingrese la cantidad de billetes de 50000 "))
N2=in... | 38.086957 | 84 | 0.722603 | """
Entradas
Billetes_50000-->int-->N1
Billetes_20000-->int-->N2
Billetes_10000-->int-->N3
Billetes_5000-->int-->N4
Billetes_2000-->int-->N5
Billetes_1000-->int-->N6
Billetes_500-->int-->N7
Billetes_100-->int-->N8
Salidas
Cantidad_dinero-->float-->c_d
"""
N1=int(input("Ingrese la cantidad de billetes de 50000 "))
N2=in... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0c3d516202dcfc3c9526fb5e5dbeadf01b459908 | 1,975 | py | Python | pymanopt/autodiff/backends/_autograd.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null | pymanopt/autodiff/backends/_autograd.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null | pymanopt/autodiff/backends/_autograd.py | navigator8972/pymanopt | b9f53fa2d187c22ae75f65c71aeeb2bfa8b9c37f | [
"BSD-3-Clause"
] | null | null | null |
try:
import autograd
except ImportError:
autograd = None
| 30.384615 | 78 | 0.669367 | import functools
try:
import autograd
import autograd.numpy as np
except ImportError:
autograd = None
from ...tools import bisect_sequence, unpack_singleton_sequence_return_value
from ._backend import Backend, fail_on_complex_input
class AutogradBackend(Backend):
def __init__(self):
super()... | 0 | 1,498 | 0 | 206 | 0 | 0 | 0 | 87 | 116 |
bf73fb783c3eccfa9593a03b73ba44d0ceaf1c24 | 4,415 | py | Python | toxicity/model_BERT.py | jkchandalia/toxic-comment-classifier | b24ca3a1acab16c367ed9a7c06ce9690f50603b3 | [
"MIT"
] | 1 | 2021-03-13T02:06:31.000Z | 2021-03-13T02:06:31.000Z | toxicity/model_BERT.py | jkchandalia/toxic-comment-classifier | b24ca3a1acab16c367ed9a7c06ce9690f50603b3 | [
"MIT"
] | 8 | 2020-11-13T19:03:58.000Z | 2022-03-12T00:46:30.000Z | toxicity/model_BERT.py | jkchandalia/toximeter | b24ca3a1acab16c367ed9a7c06ce9690f50603b3 | [
"MIT"
] | null | null | null | import numpy as np
from tqdm import tqdm
import transformers
from tensorflow.keras.layers import Dense, Input, Dropout, LSTM
from tensorflow.keras.models import Model
from tensorflow.keras.metrics import AUC
from tokenizers import BertWordPieceTokenizer
#Load BERT tokenizers and transformers
tokenizer = transformers.... | 37.415254 | 122 | 0.725481 | import os
import numpy as np
import tensorflow as tf
from tqdm import tqdm
import transformers
from tensorflow.keras.layers import Dense, Input, Dropout, LSTM
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.models import Model
from tensorflow.keras.callbacks import ModelCheckpoint, EarlyStopping, Ten... | 0 | 0 | 0 | 0 | 0 | 1,375 | 0 | 93 | 180 |
d59b6e5027f469ae4093e4733cf8a755aa7fdaa1 | 3,197 | py | Python | spectrum_etl/config.py | shahcompbio/spectrum_etl | 6150b140783559e1daf33730beabd36d57462cb2 | [
"MIT"
] | null | null | null | spectrum_etl/config.py | shahcompbio/spectrum_etl | 6150b140783559e1daf33730beabd36d57462cb2 | [
"MIT"
] | 7 | 2020-08-26T18:19:59.000Z | 2022-03-01T23:11:33.000Z | spectrum_etl/config.py | shahcompbio/spectrum_etl | 6150b140783559e1daf33730beabd36d57462cb2 | [
"MIT"
] | null | null | null | '''
Created on October 17, 2019
@author: pashaa@mskcc.org
'''
# an instance that reads from the defaul config.yaml file
default_config = Config()
if __name__ == '__main__':
print(default_config.get_redcap_token(instance_name="production"))
| 25.99187 | 103 | 0.571473 | '''
Created on October 17, 2019
@author: pashaa@mskcc.org
'''
import yaml
import sys
class Config():
def __init__(self, config_file="config.yaml"):
self._config_file = config_file
def _get_config(self):
'''
:param config_file: Default config file is config.yaml
:return: co... | 0 | 0 | 0 | 2,900 | 0 | 0 | 0 | -21 | 68 |
0a09134acb7644b7813ef9e11a7843306128bcc8 | 1,537 | py | Python | PyPoll/PyPoll.py | AnggielaRojas/Python | 2450d1da1495e03e0a6635e9a060a7454dc16919 | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | PyPoll/PyPoll.py | AnggielaRojas/Python | 2450d1da1495e03e0a6635e9a060a7454dc16919 | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | PyPoll/PyPoll.py | AnggielaRojas/Python | 2450d1da1495e03e0a6635e9a060a7454dc16919 | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | import os
import csv
PyPoll_csv = os.path.join("..", "Resources", "election_data.csv")
candidates = ['Khan', 'Correy','Li','OTolley']
print('Election Results')
print('-------------------')
with open(PyPoll_csv) as csvfile:
csvreader = csv.reader(csvfile, delimiter=',')
csv_header = next(csvreader)
Khan=... | 30.137255 | 72 | 0.556278 | import os
import csv
PyPoll_csv = os.path.join("..", "Resources", "election_data.csv")
candidates = ['Khan', 'Correy','Li','OTolley']
print('Election Results')
print('-------------------')
with open(PyPoll_csv) as csvfile:
csvreader = csv.reader(csvfile, delimiter=',')
csv_header = next(csvreader)
Khan=... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eaddefe66d35ba40b38041206b5dcab4121bb433 | 19,644 | py | Python | dev/first_sketch/dev_4.py | jpcbertoldo/pymdr | b9896948a82c104bf7bae30ea69255a08bb39f48 | [
"MIT"
] | 1 | 2021-02-26T02:26:29.000Z | 2021-02-26T02:26:29.000Z | dev/first_sketch/dev_4.py | joaopcbertoldo/pymdr | b9896948a82c104bf7bae30ea69255a08bb39f48 | [
"MIT"
] | 2 | 2020-04-02T14:00:37.000Z | 2021-03-31T19:43:11.000Z | dev/first_sketch/dev_4.py | joaopcbertoldo/pymdr | b9896948a82c104bf7bae30ea69255a08bb39f48 | [
"MIT"
] | null | null | null | from collections import namedtuple
import lxml
import lxml.html
from similarity.normalized_levenshtein import NormalizedLevenshtein
normalized_levenshtein = NormalizedLevenshtein()
TAG_NAME_ATTRIB = "___tag_name___"
HIERARCHICAL = "hierarchical"
SEQUENTIAL = "sequential"
DataRegion = namedtuple(
"DataRegion",
... | 35.716364 | 113 | 0.472053 | import os
from collections import defaultdict, namedtuple
from copy import deepcopy
from pprint import pprint
import lxml
import lxml.html
import lxml.etree
from graphviz import Digraph
from similarity.normalized_levenshtein import NormalizedLevenshtein
normalized_levenshtein = NormalizedLevenshtein()
TAG_NAME_ATTRI... | 18 | 328 | 0 | 16,211 | 0 | 2,468 | 0 | 12 | 225 |
69f8e80529aa0db07ef45a64567a44f2d5a48d50 | 766 | py | Python | test/main_test_hilbert.py | Shlyankin/cardio | 9b5d954c21cda85cf8d96dc88bd097cdec27725e | [
"Apache-2.0"
] | null | null | null | test/main_test_hilbert.py | Shlyankin/cardio | 9b5d954c21cda85cf8d96dc88bd097cdec27725e | [
"Apache-2.0"
] | null | null | null | test/main_test_hilbert.py | Shlyankin/cardio | 9b5d954c21cda85cf8d96dc88bd097cdec27725e | [
"Apache-2.0"
] | null | null | null | import os
import cardio.batchflow as bf
import warnings
from cardio import EcgBatch
from my_pipelines.my_pipelines import LoadEcgPipeline
from PanTompkinsAlgorithm import HilbertTransformPipeline
warnings.filterwarnings('ignore')
SIGNALS_PATH = "data\\qt-database-1.0.0" # set path to QT database
SIGNALS_MASK = os.pa... | 33.304348 | 94 | 0.793734 | import os
import cardio.batchflow as bf
import warnings
import numpy as np
from cardio import EcgBatch
from my_tools import calculate_old_metrics
from my_pipelines.my_pipelines import LoadEcgPipeline
from PanTompkinsAlgorithm import HilbertTransformPipeline
warnings.filterwarnings('ignore')
SIGNALS_PATH = "data\\qt-d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 44 |
7fe786feb6c720e61cac72ad734e92d2802571f5 | 2,257 | py | Python | participant_data/GetSubjectList_fromTaskandQC.py | MarieStLaurent/cimaq_memory | d7e65cb5ca767b35b7cf35d0aa3209f58338854d | [
"MIT"
] | 1 | 2020-11-27T16:02:57.000Z | 2020-11-27T16:02:57.000Z | participant_data/GetSubjectList_fromTaskandQC.py | FrancoisNadeau/cimaq_memory | 128e34f67b6f550185b78d76dc78e034cb382c35 | [
"MIT"
] | 10 | 2019-10-22T08:49:00.000Z | 2022-03-12T00:02:05.000Z | participant_data/GetSubjectList_fromTaskandQC.py | FrancoisNadeau/cimaq_memory | 128e34f67b6f550185b78d76dc78e034cb382c35 | [
"MIT"
] | 5 | 2019-08-02T14:56:11.000Z | 2021-09-01T02:57:27.000Z | import sys
if __name__ == '__main__':
sys.exit(main())
| 26.869048 | 85 | 0.583961 | import os
import sys
import argparse
import glob
import pandas as pd
def get_arguments():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="",
epilog="""
Convert behavioural data from cimaq to bids format
Input: Folder
... | 0 | 0 | 0 | 0 | 0 | 2,070 | 0 | -30 | 157 |
9b1c390b4b26e01d7ebf4f29d745abb6076a5ae9 | 3,267 | py | Python | src/hexpy/analysis.py | sullivancolin/hexpy | 37aeb39935c1ac3e8d776a44373bc02b0e753a4e | [
"MIT"
] | 7 | 2017-09-29T01:06:44.000Z | 2018-12-05T17:22:05.000Z | src/hexpy/analysis.py | sullivancolin/hexpy | 37aeb39935c1ac3e8d776a44373bc02b0e753a4e | [
"MIT"
] | 13 | 2018-06-27T14:28:59.000Z | 2020-04-03T01:38:49.000Z | src/hexpy/analysis.py | sullivancolin/hexpy | 37aeb39935c1ac3e8d776a44373bc02b0e753a4e | [
"MIT"
] | 8 | 2017-10-17T16:34:29.000Z | 2020-04-01T07:30:20.000Z | """Module for interacting with analysis API"""
| 29.432432 | 116 | 0.498623 | """Module for interacting with analysis API"""
import inspect
from .base import JSONDict, handle_response, rate_limited
from .models import AnalysisRequest
from .session import HexpySession
class AnalysisAPI:
"""Class for working with Crimson Hexagon Analysis API.
# Example Usage
```python
>>> fro... | 0 | 0 | 0 | 3,051 | 0 | 0 | 0 | 55 | 113 |
0171887959f02ba42779f04c0eec74e185ec5850 | 7,104 | py | Python | rbintegrations/jenkinsci/api.py | reviewboard/rbintegrations | 31b22a97579a736b985eb1614b0b44c1c2e02f6f | [
"MIT"
] | null | null | null | rbintegrations/jenkinsci/api.py | reviewboard/rbintegrations | 31b22a97579a736b985eb1614b0b44c1c2e02f6f | [
"MIT"
] | 1 | 2019-01-18T21:42:57.000Z | 2019-01-18T23:32:53.000Z | rbintegrations/jenkinsci/api.py | reviewboard/rbintegrations | 31b22a97579a736b985eb1614b0b44c1c2e02f6f | [
"MIT"
] | 5 | 2016-12-07T17:18:10.000Z | 2022-02-20T16:31:33.000Z | """Utilities for interacting with the Jenkins CI API."""
from __future__ import unicode_literals
import logging
try:
# Review Board 4.0
from reviewboard.hostingsvcs.service import HostingServiceHTTPRequest
except ImportError:
# Review Board 3.0
from reviewboard.hostingsvcs.service import URLRequest as... | 29.848739 | 78 | 0.539555 | """Utilities for interacting with the Jenkins CI API."""
from __future__ import unicode_literals
import json
import logging
from django.utils import six
from django.utils.six.moves.urllib.error import HTTPError
from django.utils.six.moves.urllib.parse import (quote, urlencode)
from django.utils.six.moves.urllib.requ... | 0 | 0 | 0 | 6,458 | 0 | 0 | 0 | 114 | 135 |
43cca7f338fae783fb9874c9ad1f51a25f53574d | 2,237 | py | Python | examples/biome_analysis.py | mdornseif/NBT | 9169a8234c56a0a3891cb665d2be5f8bfa13cd81 | [
"MIT"
] | null | null | null | examples/biome_analysis.py | mdornseif/NBT | 9169a8234c56a0a3891cb665d2be5f8bfa13cd81 | [
"MIT"
] | null | null | null | examples/biome_analysis.py | mdornseif/NBT | 9169a8234c56a0a3891cb665d2be5f8bfa13cd81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Counter the number of biomes in the world. Works only for Anvil-based world folders.
"""
import os
import sys
# local module
try:
except ImportError:
# nbt not in search path. Let's see if it can be found in the parent folder
extrasearchpath = os.path.realpath(os.path.join(__file__, os.pard... | 24.582418 | 95 | 0.683505 | #!/usr/bin/env python
"""
Counter the number of biomes in the world. Works only for Anvil-based world folders.
"""
import locale
import os
import sys
# local module
try:
import nbt
except ImportError:
# nbt not in search path. Let's see if it can be found in the parent folder
extrasearchpath = os.path.realpath(os.p... | 0 | 0 | 0 | 0 | 0 | 948 | 0 | -2 | 113 |
fa4e49e117b590f0432583929e7fe411f840ebd8 | 1,839 | py | Python | scripts/ex-2/adhoc.py | bahadley/mgc | c7db039b50b5cdb7a94a2a713fd56d7fe6a99e64 | [
"MIT"
] | null | null | null | scripts/ex-2/adhoc.py | bahadley/mgc | c7db039b50b5cdb7a94a2a713fd56d7fe6a99e64 | [
"MIT"
] | null | null | null | scripts/ex-2/adhoc.py | bahadley/mgc | c7db039b50b5cdb7a94a2a713fd56d7fe6a99e64 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, OVSKernelAP
from mininet.cli import CLI
from mininet.link import TCLink
from mininet.log import setLogLevel
def topology():
"Create a network."
net = Mininet(controller=Controller, link=TCLink, accessPoint=OVSKernelAP)
... | 31.169492 | 97 | 0.642197 | #!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, OVSKernelAP
from mininet.cli import CLI
from mininet.link import TCLink
from mininet.log import setLogLevel
def topology():
"Create a network."
net = Mininet(controller=Controller, link=TCLink, accessPoint=OVSKernelAP)
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe88fbcee04e132c34165e6db01db751a49f89ef | 1,820 | py | Python | Chapter-11/application.py | PacktPublishing/AWS-Certified-DevOps-Engineer-Professional-Certification-and-Beyond | ae4a40426ef1a679f409b257d837b76e2aff9cbf | [
"MIT"
] | 16 | 2021-04-19T05:16:59.000Z | 2022-03-28T11:54:51.000Z | Chapter-11/application.py | olaniyi93/AWS-Certified-DevOps-Engineer-Professional-Certification-and-Beyond | ae4a40426ef1a679f409b257d837b76e2aff9cbf | [
"MIT"
] | 3 | 2021-06-22T19:35:50.000Z | 2022-03-14T11:40:41.000Z | Chapter-11/application.py | olaniyi93/AWS-Certified-DevOps-Engineer-Professional-Certification-and-Beyond | ae4a40426ef1a679f409b257d837b76e2aff9cbf | [
"MIT"
] | 20 | 2021-04-11T06:43:40.000Z | 2022-03-27T18:26:49.000Z | from flask import Flask
from flask_bootstrap import Bootstrap
app = Flask (__name__)
Bootstrap(app)
application = app # for beanstalk
questions = [
{
"id": "1",
"question": "What are the maximum read replicas for MySQL, PostGreSQL, and MariaDB RDS?",
"answers": [
"a) 3",
... | 28 | 97 | 0.523077 | import os
from flask import Flask, render_template, request
from flask_bootstrap import Bootstrap
app = Flask (__name__)
Bootstrap(app)
application = app # for beanstalk
questions = [
{
"id": "1",
"question": "What are the maximum read replicas for MySQL, PostGreSQL, and MariaDB RDS?",
"a... | 0 | 409 | 0 | 0 | 0 | 0 | 0 | 15 | 46 |
6f4db6e1161ed84a241c23e72d9ba78cf590a6b6 | 3,230 | py | Python | Graph/shortest_path.py | niranjan09/DataStructures_Algorithms | df2801f7ea48a39a55a6d79fd66ad200a2de0145 | [
"MIT"
] | null | null | null | Graph/shortest_path.py | niranjan09/DataStructures_Algorithms | df2801f7ea48a39a55a6d79fd66ad200a2de0145 | [
"MIT"
] | null | null | null | Graph/shortest_path.py | niranjan09/DataStructures_Algorithms | df2801f7ea48a39a55a6d79fd66ad200a2de0145 | [
"MIT"
] | null | null | null |
#def minHeapify()
if __name__ == '__main__':
graph = {0: [(1, 1), (2, 2), (5, 6)], 1: [(3, 2), (0, 1)], 2: [(4, 5), (5, 3), (0, 2)], 3: [(1, 2)], 4: [(2, 5)], 5: [(0, 6), (2, 3)] }
parallel_graph = {0:[(1, 1), (2, 1), (3, 3)], 1: [(3, 2)], 2:[(3, 2),(4, 2)], 3:[(5, 3)], 4:[(5, 3)], 5:[(3, 3)... | 36.292135 | 139 | 0.54582 | import heapq
import bisect
#def minHeapify()
def dijkstra(graph, start, target):
heap = []
visited = [0]*len(graph)
weights = {}
for node in graph:
weights[node] = 10**10
weights[start] = 0
heapq.heappush(heap, (0, start))
while(not visited[target]):
nextnode = heapq.heappo... | 0 | 0 | 0 | 0 | 0 | 2,669 | 0 | -17 | 121 |
abbd8caba800092ca1d0f90ded966638ae3d4d82 | 708 | py | Python | portfolios/migrations/0008_auto_20210719_2240.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | 1 | 2021-07-19T21:31:38.000Z | 2021-07-19T21:31:38.000Z | portfolios/migrations/0008_auto_20210719_2240.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | null | null | null | portfolios/migrations/0008_auto_20210719_2240.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2021-07-19 19:40
| 28.32 | 129 | 0.637006 | # Generated by Django 2.1 on 2021-07-19 19:40
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portfolios', '0007_auto_20210719_1953'),
]
operations = [
migrations.AlterField(
model_name='profile',
... | 0 | 0 | 0 | 579 | 0 | 0 | 0 | 14 | 68 |
210f952887d95d896a6753ef826cbc44a6edb0cc | 463 | py | Python | forever.py | ecator/fuckcheat | 8b128ba7e86e26be2e7afae8f2c2b040d3face68 | [
"MIT"
] | null | null | null | forever.py | ecator/fuckcheat | 8b128ba7e86e26be2e7afae8f2c2b040d3face68 | [
"MIT"
] | null | null | null | forever.py | ecator/fuckcheat | 8b128ba7e86e26be2e7afae8f2c2b040d3face68 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
main() | 22.047619 | 81 | 0.637149 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import fuckcheat
import time
import random
def main():
pass
while True:
pass
mail=fuckcheat.mkmail(random.randint(10,30))
pw=fuckcheat.mkpw(random.randint(10,15))
if fuckcheat.fuckcheat(mail,pw):
print("%s: %s ok"%(time.strftime("%Y-%m-%d %H:%M:%S", time.loc... | 0 | 0 | 0 | 0 | 0 | 313 | 0 | -23 | 90 |
b9d927985e514e926d6945bdaf1cd62a8730f258 | 243 | py | Python | django_pwn/exceptions.py | AlexLSB/django-pwn | 3ee08bba270c3349033fe593f60939f549268b6c | [
"BSD-3-Clause"
] | null | null | null | django_pwn/exceptions.py | AlexLSB/django-pwn | 3ee08bba270c3349033fe593f60939f549268b6c | [
"BSD-3-Clause"
] | null | null | null | django_pwn/exceptions.py | AlexLSB/django-pwn | 3ee08bba270c3349033fe593f60939f549268b6c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 20.25 | 67 | 0.658436 | # -*- coding: utf-8 -*-
class PWNAPIError(Exception):
"""
Base exceptions raised when PWN API causes errors
"""
class DjangoPWNError(Exception):
"""
Base exceptions raised when django-pwn application errors occur
"""
| 0 | 0 | 0 | 173 | 0 | 0 | 0 | 0 | 45 |
08ab01b8b44b72f26259d02cd021dfacc617c9e5 | 5,323 | py | Python | expes/multiclass/main_multiclass.py | LeoIV/sparse-ho | f0a5792766a7f0c03bba28cddb983621174cb4ea | [
"BSD-3-Clause"
] | 27 | 2020-04-06T13:03:43.000Z | 2022-02-28T11:00:13.000Z | expes/multiclass/main_multiclass.py | LeoIV/sparse-ho | f0a5792766a7f0c03bba28cddb983621174cb4ea | [
"BSD-3-Clause"
] | 120 | 2020-04-05T08:10:14.000Z | 2021-11-30T09:10:28.000Z | expes/multiclass/main_multiclass.py | LeoIV/sparse-ho | f0a5792766a7f0c03bba28cddb983621174cb4ea | [
"BSD-3-Clause"
] | 8 | 2020-04-05T08:06:58.000Z | 2022-01-09T10:04:10.000Z | from joblib import Parallel, delayed
import pandas
from itertools import product
dataset_names = ["rcv1_multiclass"]
# dataset_names = ["mnist", "usps", "sector_scale"]
# dataset_names = ["news20_multiclass"]
# dataset_names = ["sector_scale"]
# dataset_names = ["aloi"]
# dataset_names = ["sector_scale", "aloi"]
# m... | 35.251656 | 79 | 0.695848 | import numpy as np
from joblib import Parallel, delayed
import pandas
from itertools import product
from libsvmdata.datasets import fetch_libsvm
from celer import LogisticRegression
from sparse_ho.models import SparseLogreg
from sparse_ho.ho import grad_search, hyperopt_wrapper
from sparse_ho.implicit_forward import I... | 0 | 0 | 0 | 0 | 0 | 2,305 | 0 | 289 | 244 |
4d5c45899349d6d835398bb6eddb47d4fdea02d1 | 1,472 | py | Python | 0_centerized.py | Changh1228/SSS-model-thesis | b1dc9dcefa43bc577966bc769dfb9cf09da972c5 | [
"BSD-3-Clause"
] | null | null | null | 0_centerized.py | Changh1228/SSS-model-thesis | b1dc9dcefa43bc577966bc769dfb9cf09da972c5 | [
"BSD-3-Clause"
] | null | null | null | 0_centerized.py | Changh1228/SSS-model-thesis | b1dc9dcefa43bc577966bc769dfb9cf09da972c5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from auvlib.data_tools import std_data
import numpy as np
# # Load centered data
# std_pings_centered = std_data.mbes_ping.read_data("Data/std_pings_centered.cereal")
# # Load raw data .all file
# file_path = "/home/chs/Desktop/Sonar/Data/EM2040/low"
# # read all_mbes_ping from .all data
# al... | 31.319149 | 88 | 0.727582 | #!/usr/bin/env python
from auvlib.data_tools import xtf_data, std_data, all_data
from auvlib.bathy_maps import mesh_map
import numpy as np
# # Load centered data
# std_pings_centered = std_data.mbes_ping.read_data("Data/std_pings_centered.cereal")
# # Load raw data .all file
# file_path = "/home/chs/Desktop/Sonar/D... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 22 |
429817712ecb499ee3ffa92f0b96832ee6e9dad9 | 115 | py | Python | textattack/datasets/translation/__init__.py | bouhoula/TextAttack | 10309a32deb9b7daeafa3434b4a3bfea990f442b | [
"MIT"
] | 7 | 2021-10-30T03:44:53.000Z | 2021-11-24T08:18:38.000Z | textattack/datasets/translation/__init__.py | bouhoula/TextAttack | 10309a32deb9b7daeafa3434b4a3bfea990f442b | [
"MIT"
] | null | null | null | textattack/datasets/translation/__init__.py | bouhoula/TextAttack | 10309a32deb9b7daeafa3434b4a3bfea990f442b | [
"MIT"
] | 3 | 2021-03-28T09:02:57.000Z | 2021-12-28T01:17:20.000Z | """
Multi TranslationDataset
=============================
"""
| 14.375 | 49 | 0.591304 | """
Multi TranslationDataset
=============================
"""
from .ted_multi import TedMultiTranslationDataset
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 23 |
90554ba9228325ad26776a788423efa98be61304 | 3,897 | py | Python | code.py | chaitubhure/Object-Detection-and-Tracking | 28c984a4f7fbc50d5cd1b3dbe60b2e9f1aecaabf | [
"MIT"
] | null | null | null | code.py | chaitubhure/Object-Detection-and-Tracking | 28c984a4f7fbc50d5cd1b3dbe60b2e9f1aecaabf | [
"MIT"
] | null | null | null | code.py | chaitubhure/Object-Detection-and-Tracking | 28c984a4f7fbc50d5cd1b3dbe60b2e9f1aecaabf | [
"MIT"
] | null | null | null | '''
ECGR 5101 FINAL PROJECT
12/12/2018
REFERENCES:https://github.com/Mjrova
PROJECT TITLE: EYE MECHANISM FOR INMOOV ROBOT
PROJECT DESCRIPTION:
picam is used for the video and it is being sampled frame by frame. We identify the contour of the object in the frame using
opencv libraries and function... | 28.445255 | 151 | 0.624326 | '''
ECGR 5101 FINAL PROJECT
12/12/2018
REFERENCES:https://github.com/Mjrova
PROJECT TITLE: EYE MECHANISM FOR INMOOV ROBOT
PROJECT DESCRIPTION:
picam is used for the video and it is being sampled frame by frame. We identify the contour of the object in the frame using
opencv libraries and function... | 0 | 0 | 0 | 0 | 0 | 784 | 0 | -18 | 92 |
53183333ca3517d83c23361f5450d09773d78c05 | 1,942 | py | Python | hyperion/keras/callbacks/checkpointers.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 9 | 2019-09-22T05:19:59.000Z | 2022-03-05T18:03:37.000Z | hyperion/keras/callbacks/checkpointers.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | null | null | null | hyperion/keras/callbacks/checkpointers.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 4 | 2019-10-10T06:34:05.000Z | 2022-03-05T18:03:56.000Z |
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
| 41.319149 | 83 | 0.548404 |
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from six.moves import xrange
import warnings
import logging
import keras.backend as K
from keras.callbacks import Callback, ModelCheckpoint
class HypModelCheckpoint(ModelCheckpoint):
def __init__(self, m... | 0 | 0 | 0 | 1,667 | 0 | 0 | 0 | 30 | 135 |
b8e88b8496703c70c37bc86cb767cc547ab9dddf | 212 | py | Python | simple.py | shu1jia1/pysite | 40218d6cbac023d403bcd5f2b319570c2585a455 | [
"Apache-2.0"
] | null | null | null | simple.py | shu1jia1/pysite | 40218d6cbac023d403bcd5f2b319570c2585a455 | [
"Apache-2.0"
] | null | null | null | simple.py | shu1jia1/pysite | 40218d6cbac023d403bcd5f2b319570c2585a455 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
from bottle import run
run(host='0.0.0.0', port=80)
| 26.5 | 56 | 0.622642 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
from bottle import route, run, template
@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)
run(host='0.0.0.0', port=80)
| 0 | 76 | 0 | 0 | 0 | 0 | 0 | 17 | 22 |
a241cdc7643b8c112858bb36fde2f8c65ecec01d | 876 | py | Python | fetch_new.py | zhy0216-collection/another-one | 6e2852709adf3b43420494c3d62fc9afc9e7dc7a | [
"MIT"
] | null | null | null | fetch_new.py | zhy0216-collection/another-one | 6e2852709adf3b43420494c3d62fc9afc9e7dc7a | [
"MIT"
] | null | null | null | fetch_new.py | zhy0216-collection/another-one | 6e2852709adf3b43420494c3d62fc9afc9e7dc7a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import gevent.monkey;gevent.monkey.patch_socket()
from gevent.pool import Pool
from redis import Redis
from rq import Queue
q = Queue(connection=Redis())
# q.enqueue_call(func=OneIssue.create,
# args=(1,[]),
# timeout=30)
# 177 - 432
# url="http://hanhan.qq.com/... | 25.764706 | 80 | 0.63242 | # -*- coding: utf-8 -*-
import gevent.monkey;gevent.monkey.patch_socket()
from gevent.pool import Pool
import codecs
import requests
from redis import Redis
from rq import Queue
from pyquery import PyQuery as pq
from bs4 import BeautifulSoup
from model import OneIssue
q = Queue(connection=Redis())
# q.enqueue_call(f... | 0 | 0 | 0 | 0 | 0 | 331 | 0 | 11 | 134 |
1812784fdc2d814428afd703b8613dce408d692e | 9,692 | py | Python | anchor/visualize.py | recoveringMathmo/anchor | 1f9c9d6d30235b1e77b945e6ef01db5a0e55d53a | [
"BSD-3-Clause"
] | 23 | 2016-10-10T18:07:08.000Z | 2022-01-13T23:30:50.000Z | anchor/visualize.py | recoveringMathmo/anchor | 1f9c9d6d30235b1e77b945e6ef01db5a0e55d53a | [
"BSD-3-Clause"
] | 1 | 2018-11-09T19:14:06.000Z | 2020-04-15T04:30:49.000Z | anchor/visualize.py | recoveringMathmo/anchor | 1f9c9d6d30235b1e77b945e6ef01db5a0e55d53a | [
"BSD-3-Clause"
] | 11 | 2017-06-26T02:11:55.000Z | 2021-11-08T15:49:57.000Z | # -*- coding: utf-8 -*-
"""See log bayes factors which led to modality categorization"""
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from .names import NEAR_ZERO, NEAR_HALF, NEAR_ONE, BIMODAL, NULL_MODEL
darkblue, green, red, purple, yellow, lightblue = sns.color_palette('deep')
MO... | 36.299625 | 79 | 0.597916 | # -*- coding: utf-8 -*-
"""See log bayes factors which led to modality categorization"""
import locale
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from .names import NEAR_ZERO, NEAR_HALF, NEAR_ONE, BIMODAL, \
NULL_MODEL
darkblue, green, r... | 0 | 0 | 0 | 4,116 | 0 | 3,703 | 0 | -7 | 159 |
a2b024e5feb17295e1bd88579b61509374d154a0 | 12,098 | py | Python | data preprocessing.py | Alexuan/EE660_proj | dd07533cadd12699c3c8f7ba64ab2001e36432c0 | [
"BSD-3-Clause"
] | null | null | null | data preprocessing.py | Alexuan/EE660_proj | dd07533cadd12699c3c8f7ba64ab2001e36432c0 | [
"BSD-3-Clause"
] | null | null | null | data preprocessing.py | Alexuan/EE660_proj | dd07533cadd12699c3c8f7ba64ab2001e36432c0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 17 13:04:03 2021
@author: Jionghao Fang
"""
import pandas as pd
import numpy as np
# from imblearn.over_sampling import SMOTE
# from wrapper import SKTSVM
'''read data'''
'''read all-labeled data(vowel-10-1trs)'''
df = pd.read_table("data/SSC_20lab... | 30.550505 | 97 | 0.670276 | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 17 13:04:03 2021
@author: Jionghao Fang
"""
import pandas as pd
import numpy as np
import random
from sklearn.preprocessing import StandardScaler
# from imblearn.over_sampling import SMOTE
from sklearn.decomposition import PCA
from sklearn.metrics import mea... | 354 | 0 | 0 | 0 | 0 | 2,453 | 0 | 224 | 508 |
d58569382febc266eda09475f729d4ba4f34c0d8 | 202 | py | Python | pypapi/__init__.py | firedrakeproject/PyPAPI | e47b276783154f03394fce160e15dac747b5b157 | [
"BSD-3-Clause"
] | 2 | 2016-02-25T17:39:38.000Z | 2018-06-08T08:48:36.000Z | pypapi/__init__.py | firedrakeproject/PyPAPI | e47b276783154f03394fce160e15dac747b5b157 | [
"BSD-3-Clause"
] | null | null | null | pypapi/__init__.py | firedrakeproject/PyPAPI | e47b276783154f03394fce160e15dac747b5b157 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
# Event types
from pypapi.papi import populate_events
populate_events()
del populate_events
| 18.363636 | 66 | 0.79703 | from __future__ import absolute_import
# Event types
from pypapi.papi import * # noqa: flake8 can't deal with Cython
from pypapi.papi import populate_events
populate_events()
del populate_events
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 63 |
2443bb25d5fbded287bec0e19b3f4567ac4ef8ef | 899 | py | Python | pacote-download/pythonProject/exercicios_python_guanabara/ex075-professor.py | oliveirajonathas/python_estudos | 28921672d7e5d0866030c45b077a28998905f752 | [
"MIT"
] | null | null | null | pacote-download/pythonProject/exercicios_python_guanabara/ex075-professor.py | oliveirajonathas/python_estudos | 28921672d7e5d0866030c45b077a28998905f752 | [
"MIT"
] | null | null | null | pacote-download/pythonProject/exercicios_python_guanabara/ex075-professor.py | oliveirajonathas/python_estudos | 28921672d7e5d0866030c45b077a28998905f752 | [
"MIT"
] | null | null | null | """
Desenvolva um programa que leia quatro valores pelo teclado e guarde-os em uma tupla. No final, mostre:
A) Quantas vezes apareceu o valor 9
B) Em que posio foi digitado o primeiro valor 3
C) Quais foram os nmeros pares
"""
num = (int(input('Digite um nmero: ')), int(input('Digite outro nmero: ')),int(input('Digite... | 27.242424 | 115 | 0.629588 | """
Desenvolva um programa que leia quatro valores pelo teclado e guarde-os em uma tupla. No final, mostre:
A) Quantas vezes apareceu o valor 9
B) Em que posição foi digitado o primeiro valor 3
C) Quais foram os números pares
"""
num = (int(input('Digite um número: ')), int(input('Digite outro número: ')),int(input('D... | 38 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
353820a5839929df0a71c1e72b032758394f0ffb | 1,171 | py | Python | toolcraft/gui/asset/__init__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 6 | 2021-04-06T09:27:48.000Z | 2021-12-17T02:13:11.000Z | toolcraft/gui/asset/__init__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 57 | 2021-03-19T07:33:13.000Z | 2022-03-30T18:59:29.000Z | toolcraft/gui/asset/__init__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 2 | 2021-04-08T18:24:36.000Z | 2021-04-08T22:40:50.000Z | import pathlib
from ... import util
from ... import error as e
_ASSET_FOLDER = pathlib.Path(__file__).parent.resolve()
_THEMES_CACHE = {}
| 23.42 | 69 | 0.616567 | import enum
import pathlib
import typing as t
import dearpygui.dearpygui as dpg
from dearpygui_ext import themes
from ... import util
from ... import error as e
_ASSET_FOLDER = pathlib.Path(__file__).parent.resolve()
class Font(enum.Enum):
RobotoRegular = enum.auto()
@property
def file(self) -> pathli... | 0 | 84 | 0 | 795 | 0 | 0 | 0 | 10 | 135 |
71185666acbf6dab8ab35b896b1a891886a62dab | 1,208 | py | Python | techreviewproj/pythonclub/clubapp/migrations/0002_auto_20190512_1523.py | yonny23/techreviewproject | 3a58c08c194eacedaa9b3bf3942149b24f3e2b28 | [
"Apache-2.0"
] | null | null | null | techreviewproj/pythonclub/clubapp/migrations/0002_auto_20190512_1523.py | yonny23/techreviewproject | 3a58c08c194eacedaa9b3bf3942149b24f3e2b28 | [
"Apache-2.0"
] | null | null | null | techreviewproj/pythonclub/clubapp/migrations/0002_auto_20190512_1523.py | yonny23/techreviewproject | 3a58c08c194eacedaa9b3bf3942149b24f3e2b28 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-05-12 22:23
| 30.2 | 115 | 0.504139 | # Generated by Django 2.2 on 2019-05-12 22:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clubapp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Greet',
fields=[
... | 0 | 0 | 0 | 1,090 | 0 | 0 | 0 | 19 | 50 |
4a415eb8c612ace71c4f19722d793d38a25250c5 | 597 | py | Python | app/__init__.py | CharlesDLandau/api_consumer | da598727fef10b4f318446ca884b86cd9b7a1deb | [
"MIT"
] | null | null | null | app/__init__.py | CharlesDLandau/api_consumer | da598727fef10b4f318446ca884b86cd9b7a1deb | [
"MIT"
] | null | null | null | app/__init__.py | CharlesDLandau/api_consumer | da598727fef10b4f318446ca884b86cd9b7a1deb | [
"MIT"
] | 1 | 2018-07-24T02:37:44.000Z | 2018-07-24T02:37:44.000Z | import managers
from flask_redis import FlaskRedis
from flask import Flask
# Instantiate and config flask
flask_app = Flask(__name__)
flask_app.config.update(
CELERY_BROKER_URL=managers.celery_config.CELERY_BROKER_URL,
CELERY_RESULT_BACKEND=managers.celery_config.CELERY_RESULT_BACKEND,
REDIS_URL=managers.c... | 27.136364 | 71 | 0.830821 | import managers
from flask_redis import FlaskRedis
from flask import Flask
# Instantiate and config flask
flask_app = Flask(__name__)
flask_app.config.update(
CELERY_BROKER_URL=managers.celery_config.CELERY_BROKER_URL,
CELERY_RESULT_BACKEND=managers.celery_config.CELERY_RESULT_BACKEND,
REDIS_URL=managers.c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 |
c15e95ec81830ec308a2aa7be977ad69a2c2f09e | 4,178 | py | Python | src/gluonts/mx/component.py | dstefanov46/Reproducibility-Challenge-2021 | 55a0500c2aa6e8b2c117057f4259fbfd4b9b5f53 | [
"Apache-2.0"
] | 20 | 2021-07-22T08:32:36.000Z | 2022-03-11T10:21:25.000Z | src/gluonts/mx/component.py | dstefanov46/Reproducibility-Challenge-2021 | 55a0500c2aa6e8b2c117057f4259fbfd4b9b5f53 | [
"Apache-2.0"
] | 3 | 2021-10-15T18:59:46.000Z | 2022-02-07T16:59:32.000Z | src/gluonts/mx/component.py | dstefanov46/Reproducibility-Challenge-2021 | 55a0500c2aa6e8b2c117057f4259fbfd4b9b5f53 | [
"Apache-2.0"
] | 8 | 2021-08-04T16:12:19.000Z | 2022-01-12T18:28:58.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 31.179104 | 79 | 0.679512 | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 0 | 3,432 | 0 | 0 | 0 | 0 | 0 | 53 | 115 |
8312055d99c0ac5ef21c368afb20ac0a03412bb8 | 4,497 | py | Python | doc/other/ps.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 4 | 2021-10-17T11:17:59.000Z | 2022-02-28T16:58:40.000Z | doc/other/ps.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 17 | 2021-10-05T21:44:06.000Z | 2022-03-31T16:58:40.000Z | doc/other/ps.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 8 | 2021-09-02T18:55:49.000Z | 2022-03-09T21:05:28.000Z | import point
"""
Embarrasingly rudimentary postscript module
The module gives you 72 pitch drawing surface on an 8 1/2 x 11
portrait type paper. It sets the ULC as x=0m y=0
it gives text, line and arrow drawing primitives
It gives a Courier font class with font metrics.
"""
color_mods = {
'red' : " 1... | 22.044118 | 68 | 0.669113 | import point
"""
Embarrasingly rudimentary postscript module
The module gives you 72 pitch drawing surface on an 8 1/2 x 11
portrait type paper. It sets the ULC as x=0m y=0
it gives text, line and arrow drawing primitives
It gives a Courier font class with font metrics.
"""
color_mods = {
'red' : " 1... | 0 | 0 | 0 | 1,013 | 0 | 421 | 0 | 0 | 228 |
d4e31c358fd9414d7d3575c70cdf9ced68e15adc | 5,540 | py | Python | ansible/linkstate/scripts/mlnx/fanout_listener.py | praveen-li/sonic-mgmt | b574317bbd2fe28d447e1169e8d8adf5cfb2f6c1 | [
"Apache-2.0"
] | 3 | 2019-04-11T11:42:33.000Z | 2021-01-28T07:17:17.000Z | ansible/linkstate/scripts/mlnx/fanout_listener.py | barefootnetworks/sonic-mgmt | e6299ed4cc9bc6920b55b7e6e2cad9f1c09967de | [
"Apache-2.0"
] | 7 | 2018-07-26T09:45:36.000Z | 2019-06-19T01:58:07.000Z | ansible/linkstate/scripts/mlnx/fanout_listener.py | barefootnetworks/sonic-mgmt | e6299ed4cc9bc6920b55b7e6e2cad9f1c09967de | [
"Apache-2.0"
] | 5 | 2019-04-23T06:16:02.000Z | 2020-10-12T07:16:43.000Z | import sys
sys.path.append('/usr/lib/python2.7/dist-packages/python_sdk_api/')
sys.path.append('/usr/lib/python2.7/site-packages/python_sdk_api/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/python_sdk_api/')
sys.path.append('/usr/local/lib/python2.7/site-packages/python_sdk_api/')
g_ptf_host = None
g_lo... | 31.299435 | 111 | 0.628339 | import sys
import os
import time
import socket
import pickle
import argparse
import datetime
import signal
sys.path.append('/usr/lib/python2.7/dist-packages/python_sdk_api/')
sys.path.append('/usr/lib/python2.7/site-packages/python_sdk_api/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/python_sdk_api/')
sy... | 0 | 0 | 0 | 4,209 | 0 | 744 | 0 | -59 | 269 |
d7e0d67aaa204e7004cb20c86d3706c61c27d8f5 | 5,975 | py | Python | e2e_etl/music_hub.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | e2e_etl/music_hub.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | e2e_etl/music_hub.py | vanducng/learning-spark | b7e93361b1ae37fbcd718c4d7034b8355b65fd94 | [
"MIT"
] | null | null | null | from datetime import datetime
from pyspark.sql import SparkSession
from pyspark.sql.functions import udf
def create_spark_session():
"""
Create spark session on AWS
"""
spark = SparkSession \
.builder \
.appName("MusicHub") \
.getOrCreate()
return spark
def process_song_dat... | 37.34375 | 134 | 0.588285 | import os
import configparser
from datetime import datetime
from pyspark.sql.types import *
from pyspark.sql import SparkSession
from pyspark.sql.functions import udf
def create_spark_session():
"""
Create spark session on AWS
"""
spark = SparkSession \
.builder \
.appName("MusicHub") \... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 66 |
49dd8216d05248c8f9b54d61ae699e69b7562eb2 | 73 | py | Python | custom_components/smartbroker/const.py | benj-zen/hass-smartbroker | ef1e6e8101b8e0a1019ed2a0e9fb7b8233dfe941 | [
"Apache-2.0"
] | 1 | 2021-05-07T20:21:25.000Z | 2021-05-07T20:21:25.000Z | custom_components/smartbroker/const.py | benj-zen/hass-smartbroker | ef1e6e8101b8e0a1019ed2a0e9fb7b8233dfe941 | [
"Apache-2.0"
] | 1 | 2021-05-20T17:05:26.000Z | 2021-05-21T09:13:03.000Z | custom_components/smartbroker/const.py | benj-zen/hass-smartbroker | ef1e6e8101b8e0a1019ed2a0e9fb7b8233dfe941 | [
"Apache-2.0"
] | null | null | null | """Constants for the Smartbroker integration."""
DOMAIN = "smartbroker"
| 18.25 | 48 | 0.739726 | """Constants for the Smartbroker integration."""
DOMAIN = "smartbroker"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3bfcb292eb1f188c66bd23f9c8abdf80cb19b953 | 4,403 | py | Python | dataset/textrank/biased_textrank_git/src/biases.py | Yifan-G/temp | f83b9a494e224c3039d490c8617bcba9cd5be0df | [
"Apache-2.0"
] | null | null | null | dataset/textrank/biased_textrank_git/src/biases.py | Yifan-G/temp | f83b9a494e224c3039d490c8617bcba9cd5be0df | [
"Apache-2.0"
] | null | null | null | dataset/textrank/biased_textrank_git/src/biases.py | Yifan-G/temp | f83b9a494e224c3039d490c8617bcba9cd5be0df | [
"Apache-2.0"
] | null | null | null | # democratic_bias = '''The Democratic Party's philosophy of modern liberalism advocates social and economic equality, along with the welfare state. It seeks to provide government regulation in the economy to promote the public interest. Environmental protection, support for organized labor, maintenance and expansion of... | 54.358025 | 644 | 0.845787 | # democratic_bias = '''The Democratic Party's philosophy of modern liberalism advocates social and economic equality, along with the welfare state. It seeks to provide government regulation in the economy to promote the public interest. Environmental protection, support for organized labor, maintenance and expansion of... | 20 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51a6873432115905a19e75c71556237516f97276 | 678 | py | Python | app.py | k4t0mono/probable-palm-tree | 03f649d093c6d25c0b40f517ece45435578271dc | [
"BSD-2-Clause"
] | null | null | null | app.py | k4t0mono/probable-palm-tree | 03f649d093c6d25c0b40f517ece45435578271dc | [
"BSD-2-Clause"
] | null | null | null | app.py | k4t0mono/probable-palm-tree | 03f649d093c6d25c0b40f517ece45435578271dc | [
"BSD-2-Clause"
] | null | null | null | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
# Init the app
app = Flask(__name__)
# Config the data base
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DB_URI', 'sqlite://')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['JSON... | 24.214286 | 72 | 0.738938 | import os
from flask import Flask, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
# Init the app
app = Flask(__name__)
# Config the data base
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DB_URI', 'sqlite://')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.con... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 26 |
7f875bae06feff36012e82686fafbd75d9b2bd2c | 6,156 | py | Python | xija/component/experimental.py | jzuhone/xija | 1e423d0c48056cc4ea9e4993d28e34794c1420fa | [
"BSD-3-Clause"
] | 2 | 2016-01-05T19:20:43.000Z | 2021-06-04T08:23:08.000Z | xija/component/experimental.py | jzuhone/xija | 1e423d0c48056cc4ea9e4993d28e34794c1420fa | [
"BSD-3-Clause"
] | 61 | 2015-02-24T02:27:11.000Z | 2022-03-23T13:52:15.000Z | xija/component/experimental.py | jzuhone/xija | 1e423d0c48056cc4ea9e4993d28e34794c1420fa | [
"BSD-3-Clause"
] | 1 | 2016-01-04T21:08:17.000Z | 2016-01-04T21:08:17.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
try:
except ImportError:
pass
| 39.716129 | 78 | 0.573749 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
try:
from Ska.Matplotlib import plot_cxctime
except ImportError:
pass
from .base import ModelComponent
from .heat import PrecomputedHeatPower
from . import tmal
class AcisDpaPower6(PrecomputedHeatPower):
"""Heating from A... | 0 | 2,919 | 0 | 2,911 | 0 | 0 | 0 | 40 | 184 |
94b0687b18d73e31b948219ba1d83c6148c2f2f6 | 21,512 | py | Python | pic/draw.py | Jiyao17/fl-grouping | 37ada217cdf9121c9d7119f311228e87ba4a8e83 | [
"MIT"
] | null | null | null | pic/draw.py | Jiyao17/fl-grouping | 37ada217cdf9121c9d7119f311228e87ba4a8e83 | [
"MIT"
] | null | null | null | pic/draw.py | Jiyao17/fl-grouping | 37ada217cdf9121c9d7119f311228e87ba4a8e83 | [
"MIT"
] | 1 | 2022-01-29T22:31:43.000Z | 2022-01-29T22:31:43.000Z |
if __name__ == '__main__':
# nsf_report()
nsf_grouping_comp()
nsf_selection_comp()
nsf_p_comp()
nsf_gs_comp()
# nsf_gs_cost_comp() | 86.393574 | 1,064 | 0.696634 |
from cProfile import label
import numpy as np
import matplotlib.pyplot as plt
def p1():
x = np.arange(0, 100, 1)
y1 = np.array([0.3956,0.4062,0.4597,0.475,0.5045,0.5223,0.5504,0.5555,0.5616,0.5771,0.5832,0.5762,0.6068,0.6091,0.6,0.6061,0.6237,0.6215,0.6209,0.6397,0.6385,0.6334,0.6353,0.6537,0.6522,0.6561... | 0 | 0 | 0 | 0 | 0 | 21,091 | 0 | 12 | 251 |
4a928845369e4af4eb0e9f9e882eed50653f44f1 | 993 | py | Python | company/migrations/0104_auto_20200706_1029.py | uktrade/directory-api | 45a9024a7ecc2842895201cbb51420ba9e57a168 | [
"MIT"
] | 2 | 2017-06-02T09:09:08.000Z | 2021-01-18T10:26:53.000Z | company/migrations/0104_auto_20200706_1029.py | uktrade/directory-api | 45a9024a7ecc2842895201cbb51420ba9e57a168 | [
"MIT"
] | 629 | 2016-10-10T09:35:52.000Z | 2022-03-25T15:04:04.000Z | company/migrations/0104_auto_20200706_1029.py | uktrade/directory-api | 45a9024a7ecc2842895201cbb51420ba9e57a168 | [
"MIT"
] | 5 | 2017-06-22T10:02:22.000Z | 2022-03-14T17:55:21.000Z | # Generated by Django 2.2.13 on 2020-07-06 10:29
| 31.03125 | 114 | 0.56999 | # Generated by Django 2.2.13 on 2020-07-06 10:29
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '0103_auto_20200212_1629'),
]
operations = [
migrations.AddField(
model_n... | 0 | 0 | 0 | 834 | 0 | 0 | 0 | 41 | 68 |
335ddf4f6c1ceb7765c0e61f8acb069eb7bd13c3 | 497 | py | Python | crossbox/migrations/0007_session_session_template.py | acascarla/crossbox | 89aa3b7db60fc9c1a391cdff38186c8798f94bdd | [
"MIT"
] | null | null | null | crossbox/migrations/0007_session_session_template.py | acascarla/crossbox | 89aa3b7db60fc9c1a391cdff38186c8798f94bdd | [
"MIT"
] | null | null | null | crossbox/migrations/0007_session_session_template.py | acascarla/crossbox | 89aa3b7db60fc9c1a391cdff38186c8798f94bdd | [
"MIT"
] | null | null | null | # Generated by Django 3.1.14 on 2022-01-15 18:42
| 24.85 | 123 | 0.651911 | # Generated by Django 3.1.14 on 2022-01-15 18:42
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('crossbox', '0006_payment_wods'),
]
operations = [
migrations.AddField(
model_name='session',
... | 0 | 0 | 0 | 349 | 0 | 0 | 0 | 30 | 68 |
6176e3e4396dffaa33a4f002aa4fee225fa10407 | 728 | py | Python | Medium/784. Letter Case Permutation/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Medium/784. Letter Case Permutation/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Medium/784. Letter Case Permutation/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 784. Letter Case Permutation
# Runtime: 91 ms, faster than 19.56% of Python3 online submissions for Letter Case Permutation.
# Memory Usage: 15.6 MB, less than 16.05% of Python3 online submissions for Letter Case Permutation.
| 31.652174 | 100 | 0.524725 | # 784. Letter Case Permutation
# Runtime: 91 ms, faster than 19.56% of Python3 online submissions for Letter Case Permutation.
# Memory Usage: 15.6 MB, less than 16.05% of Python3 online submissions for Letter Case Permutation.
class Solution:
# Iteration
def letterCasePermutation(self, s: str) -> list[str]... | 0 | 0 | 0 | 475 | 0 | 0 | 0 | 0 | 23 |
e1a2451019e2d762e9775567e214f94924ed2711 | 449 | py | Python | topics/migrations/0007_auto_20210804_2340.py | danielndhlovu/topicSimple | 8cebac601cec6fb19ed3f39d7bea819fda4a645a | [
"MIT"
] | null | null | null | topics/migrations/0007_auto_20210804_2340.py | danielndhlovu/topicSimple | 8cebac601cec6fb19ed3f39d7bea819fda4a645a | [
"MIT"
] | null | null | null | topics/migrations/0007_auto_20210804_2340.py | danielndhlovu/topicSimple | 8cebac601cec6fb19ed3f39d7bea819fda4a645a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-08-04 21:40
| 22.45 | 74 | 0.639198 | # Generated by Django 3.1.4 on 2021-08-04 21:40
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('topics', '0006_auto_20210804_2333'),
]
operations = [
migrations.AlterField(
model_name='projecttop... | 0 | 0 | 0 | 306 | 0 | 0 | 0 | 26 | 68 |
8fb8f1352a77734b365e3767fbc65276afd72f79 | 4,880 | py | Python | my_chatbot/actions.py | ng22t7a/NLP_rasa | a6233c7c96956b0e99df3f7c45b80e7fcfc7ad4b | [
"MIT"
] | null | null | null | my_chatbot/actions.py | ng22t7a/NLP_rasa | a6233c7c96956b0e99df3f7c45b80e7fcfc7ad4b | [
"MIT"
] | null | null | null | my_chatbot/actions.py | ng22t7a/NLP_rasa | a6233c7c96956b0e99df3f7c45b80e7fcfc7ad4b | [
"MIT"
] | 1 | 2021-05-29T04:54:35.000Z | 2021-05-29T04:54:35.000Z | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/core/actions/#custom-actions/
# This is a simple example for a custom action which utters "Hello World!"
from typing import Any, Text, Dict, List
... | 34.366197 | 78 | 0.575205 | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/core/actions/#custom-actions/
# This is a simple example for a custom action which utters "Hello World!"
from typing import Any, Text, Dict, List
... | 0 | 661 | 0 | 3,330 | 0 | 0 | 0 | 77 | 156 |
989b490a36cda840daa64d7b2e31af0221fed3c2 | 914 | py | Python | primitives_ubc/config_files/config.py | tonyjo/ubc_primitives | bc94a403f176fe28db2a9ac9d1a48cb9db021f90 | [
"Apache-2.0"
] | null | null | null | primitives_ubc/config_files/config.py | tonyjo/ubc_primitives | bc94a403f176fe28db2a9ac9d1a48cb9db021f90 | [
"Apache-2.0"
] | 4 | 2020-07-19T00:45:29.000Z | 2020-12-10T18:25:41.000Z | primitives_ubc/config_files/config.py | tonyjo/ubc_primitives | bc94a403f176fe28db2a9ac9d1a48cb9db021f90 | [
"Apache-2.0"
] | 1 | 2021-04-30T18:13:49.000Z | 2021-04-30T18:13:49.000Z | import os
from d3m import utils
try:
import d3m.__init__ as d3m_info
D3M_API_VERSION = d3m_info.__version__
except Exception:
D3M_API_VERSION = '2019.1.9'
VERSION = "0.2.0"
TAG_NAME = "{git_commit}".format(git_commit=utils.current_git_commit(os.path.dirname(__file__)), )
REPOSITORY = "https://github.com/... | 22.85 | 98 | 0.666302 | import os
from d3m import utils
try:
import d3m.__init__ as d3m_info
D3M_API_VERSION = d3m_info.__version__
except Exception:
D3M_API_VERSION = '2019.1.9'
VERSION = "0.2.0"
TAG_NAME = "{git_commit}".format(git_commit=utils.current_git_commit(os.path.dirname(__file__)), )
REPOSITORY = "https://github.com/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d48006e06fff48e984f82b0966ecd6ceaafb66d | 3,347 | py | Python | packit/cli/packit_base.py | Zlopez/packit | 5856e9591995dc5f0b790726c216329f74659c8c | [
"MIT"
] | 1 | 2019-12-25T13:50:52.000Z | 2019-12-25T13:50:52.000Z | packit/cli/packit_base.py | Zlopez/packit | 5856e9591995dc5f0b790726c216329f74659c8c | [
"MIT"
] | null | null | null | packit/cli/packit_base.py | Zlopez/packit | 5856e9591995dc5f0b790726c216329f74659c8c | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 36.78022 | 80 | 0.766358 | # MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 0 | 1,248 | 0 | 0 | 0 | 0 | 0 | 60 | 112 |
9c666bf80f6a5fc4d8eb85f3480a3c3cda685edc | 4,122 | py | Python | game/entities/camera.py | PythonixCoders/PyWeek29 | 5c7492466481dec40619272a3da7fa4b9a72c1d6 | [
"MIT"
] | 8 | 2020-03-15T14:58:46.000Z | 2020-04-26T13:44:10.000Z | game/entities/camera.py | PythonixCoders/PyWeek29 | 5c7492466481dec40619272a3da7fa4b9a72c1d6 | [
"MIT"
] | null | null | null | game/entities/camera.py | PythonixCoders/PyWeek29 | 5c7492466481dec40619272a3da7fa4b9a72c1d6 | [
"MIT"
] | 4 | 2020-03-23T12:38:55.000Z | 2021-12-25T16:32:54.000Z | #!/usr/bin/env python
| 27.48 | 73 | 0.59049 | #!/usr/bin/env python
from math import pi
from typing import Union
import glm
from glm import dot, cross, vec3, vec2, normalize, rotate, identity, quat
from pygame import Vector3
from game.base.entity import Entity
from game.constants import EPSILON, SCREEN_DIST
class Camera(Entity):
"""
A camera whose posi... | 0 | 443 | 0 | 3,390 | 0 | 0 | 0 | 87 | 179 |
124169020d87176b3e3a6978f562051f538b1c1d | 2,938 | py | Python | library/dns_create.py | codepipe/netapp-ansible | bfde5aa3c2bc44bbd73a8b892c31f0a9f2a41162 | [
"MIT"
] | 17 | 2016-09-30T00:02:31.000Z | 2020-08-02T00:54:57.000Z | library/dns_create.py | EricSherrill/netapp-ansible | bfde5aa3c2bc44bbd73a8b892c31f0a9f2a41162 | [
"MIT"
] | 1 | 2017-06-05T08:40:11.000Z | 2017-06-05T08:40:11.000Z | library/dns_create.py | EricSherrill/netapp-ansible | bfde5aa3c2bc44bbd73a8b892c31f0a9f2a41162 | [
"MIT"
] | 13 | 2016-09-30T16:23:12.000Z | 2020-10-12T06:26:05.000Z | #!/usr/bin/python
try:
NASERVER_AVAILABLE = True
except ImportError:
NASERVER_AVAILABLE = False
if not NASERVER_AVAILABLE:
module.fail_json(msg="The NetApp Manageability SDK library is not installed")
DOCUMENTATTION = '''
---
module: dns_create
version_added: "1.0"
author: "Jeorry Balasabas (@jeorryb)"
s... | 25.111111 | 98 | 0.681416 | #!/usr/bin/python
import sys
import json
from ansible.module_utils import ntap_util
try:
from NaServer import *
NASERVER_AVAILABLE = True
except ImportError:
NASERVER_AVAILABLE = False
if not NASERVER_AVAILABLE:
module.fail_json(msg="The NetApp Manageability SDK library is not installed")
DOCUMENTA... | 0 | 0 | 0 | 0 | 0 | 1,294 | 0 | 21 | 162 |
cafe122a1c170deb27d79fbc879591ff21eb216c | 775 | py | Python | Python/Collections/Counter/Counter.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | 2 | 2020-05-28T07:15:00.000Z | 2020-07-21T08:34:06.000Z | Python/Collections/Counter/Counter.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null | Python/Collections/Counter/Counter.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null | # Enter your code here. Read input from STDIN. Print output to STDOUT
from collections import Counter
if __name__ == '__main__':
X = int( input() )
shoe_size_in_warehouse = list( map(int, input().split() ) )
size_dict = Counter(shoe_size_in_warehouse)
N = int( input() )
total_revenue = 0
... | 21.527778 | 88 | 0.624516 | # Enter your code here. Read input from STDIN. Print output to STDOUT
from collections import Counter
def look_up_and_cashier( size_dict, size, price):
payment = 0
if size_dict[size] != 0:
payment = price
# number in stock decrease by 1, after selling one pair of shoes
size_dict[size... | 0 | 0 | 0 | 0 | 0 | 245 | 0 | 0 | 23 |
fb7be33198003cdbceabe3066fe42cb0dc7f8bbb | 331 | py | Python | spc.py | Ayush2007A/Code-master | fafe4a020adc3f8e78c78f6b8b2b08b5c3005613 | [
"Unlicense"
] | 1 | 2021-02-05T10:29:30.000Z | 2021-02-05T10:29:30.000Z | spc.py | Ayush2007A/Code-master | fafe4a020adc3f8e78c78f6b8b2b08b5c3005613 | [
"Unlicense"
] | null | null | null | spc.py | Ayush2007A/Code-master | fafe4a020adc3f8e78c78f6b8b2b08b5c3005613 | [
"Unlicense"
] | null | null | null | x_y=('planet' , 'range')
'''planet''', '''range'''
print ('(A) corporations spc by Ayush')
print ('Collecting Data.....')
print ('press enter...')
x = input()
print ('process completed')
print ('Type the name of the planet')
y = input()
if y == ('earth'):
print ('!')
if y == ('mars'):
print ('!')
... | 18.388889 | 40 | 0.519637 | x_y=('planet' , 'range')
'''planet''', '''range'''
print ('(A) corporations spc by Ayush')
print ('Collecting Data.....')
print ('press enter...')
x = input()
print ('process completed')
print ('Type the name of the planet')
y = input()
if y == ('earth'):
print ('!')
if y == ('mars'):
print ('!')
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b05e0f40517e3f4f25efe3d3107ea84d4527c82 | 6,047 | py | Python | mmica/solvers.py | pierreablin/mmica | 05a6f77bc7355b9894cefc9e1813a6699407caaf | [
"MIT"
] | 7 | 2019-02-23T13:03:11.000Z | 2022-03-10T06:57:10.000Z | mmica/solvers.py | pierreablin/mmica | 05a6f77bc7355b9894cefc9e1813a6699407caaf | [
"MIT"
] | null | null | null | mmica/solvers.py | pierreablin/mmica | 05a6f77bc7355b9894cefc9e1813a6699407caaf | [
"MIT"
] | 1 | 2022-03-25T22:32:39.000Z | 2022-03-25T22:32:39.000Z | # Authors: Pierre Ablin <pierre.ablin@inria.fr>
#
# License: MIT
import numpy as np
from ._densities import Huber, Sigmoid
def solver_incremental(X, max_iter=100, batch_size=100, W_init=None,
density='huber', maxiter_cg=10, greedy=0):
"""
Incremental algorithm for ICA
Parameters
... | 29.072115 | 79 | 0.524888 | # Authors: Pierre Ablin <pierre.ablin@inria.fr>
#
# License: MIT
import numpy as np
import numba as nb
from numba import njit
from ._utils import cg
from ._densities import Huber, Sigmoid
def solver_incremental(X, max_iter=100, batch_size=100, W_init=None,
density='huber', maxiter_cg=10, greed... | 0 | 1,433 | 0 | 0 | 0 | 447 | 0 | -1 | 205 |
c1b1c9c8d167c9ba199d6073c0f5d7544f9d3060 | 1,758 | py | Python | distribution.py | kyDoleuc04/Character-Distribution | 610aa41d1e75a0ffd691ccb5d997b16458bc2ed9 | [
"MIT"
] | null | null | null | distribution.py | kyDoleuc04/Character-Distribution | 610aa41d1e75a0ffd691ccb5d997b16458bc2ed9 | [
"MIT"
] | null | null | null | distribution.py | kyDoleuc04/Character-Distribution | 610aa41d1e75a0ffd691ccb5d997b16458bc2ed9 | [
"MIT"
] | null | null | null | """
distribution.py
Author: kyDoleuc04
Credit: tutorials, andrew, matt, chris lee, google
Assignment:
Write and submit a Python program (distribution.py) that computes and displays
the distribution of characters in a given sample of text.
Output of your program should look like this:
Please enter a string of text ... | 25.478261 | 116 | 0.667235 | """
distribution.py
Author: kyDoleuc04
Credit: tutorials, andrew, matt, chris lee, google
Assignment:
Write and submit a Python program (distribution.py) that computes and displays
the distribution of characters in a given sample of text.
Output of your program should look like this:
Please enter a string of text ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8 | 22 |
6800edf8be729fbd47336e54a83bae77e97aee5a | 10,181 | py | Python | interval.py | theodox/disempower | 3e8df240a9b63250b6f78e2ec9bd5414d63cea07 | [
"MIT"
] | 1 | 2019-05-20T05:28:32.000Z | 2019-05-20T05:28:32.000Z | interval.py | theodox/disempower | 3e8df240a9b63250b6f78e2ec9bd5414d63cea07 | [
"MIT"
] | 1 | 2019-09-04T04:52:15.000Z | 2019-09-04T04:52:15.000Z | interval.py | theodox/disempower | 3e8df240a9b63250b6f78e2ec9bd5414d63cea07 | [
"MIT"
] | null | null | null | from datetime import datetime
from collections import defaultdict
import logging
logger = logging.getLogger("disempower.interval")
CREDITS = defaultdict(int) # per-user bank
INTERVALS = defaultdict(list) # per-user allowable times
BLACKOUTS = defaultdict(list) # per-user forbidden times
CAPS = dict(... | 25.076355 | 95 | 0.600923 | from datetime import datetime, timedelta
from collections import defaultdict
import itertools
import pickle
import time
import logging
logger = logging.getLogger("disempower.interval")
CREDITS = defaultdict(int) # per-user bank
INTERVALS = defaultdict(list) # per-user allowable times
BLACKOUTS = def... | 0 | 0 | 0 | 0 | 462 | 5,712 | 0 | -12 | 844 |
233609af36a131c35f1f0b1884cdb1100a0e589f | 8,674 | py | Python | lib/utils/face_utils.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 128 | 2019-04-12T17:06:27.000Z | 2022-02-26T10:24:43.000Z | lib/utils/face_utils.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 15 | 2019-06-12T03:55:48.000Z | 2021-03-12T07:09:53.000Z | lib/utils/face_utils.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 24 | 2019-04-12T17:06:30.000Z | 2021-07-12T12:38:20.000Z |
from __future__ import division
import scipy.optimize
import numpy as np
import cv2
# -----------------------------------------------------------------------------------------
def parse_wider_gt(dets_file_name, isEllipse=False):
# --------------------------------------------------------------------------------------... | 34.696 | 94 | 0.504266 |
from __future__ import division
import scipy.optimize
import numpy as np
import cv2
# -----------------------------------------------------------------------------------------
def parse_wider_gt(dets_file_name, isEllipse=False):
# --------------------------------------------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 1,760 | 0 | 0 | 66 |
8fd39b1a1a7609aeb1dea71561b785f5d646dba8 | 8,325 | py | Python | models/sgld.py | shiyuanh/GM_Final_Project | 343b5e54c51885f40507193768377548adbb0ac0 | [
"MIT"
] | null | null | null | models/sgld.py | shiyuanh/GM_Final_Project | 343b5e54c51885f40507193768377548adbb0ac0 | [
"MIT"
] | null | null | null | models/sgld.py | shiyuanh/GM_Final_Project | 343b5e54c51885f40507193768377548adbb0ac0 | [
"MIT"
] | null | null | null |
'''
class SGLD(Optimizer):
"""
SGLD optimiser based on pytorch's SGD.
Note that the weight decay is specified in terms of the gaussian prior sigma.
"""
def __init__(self, params, lr=required, norm_sigma=0, noise_std=1.0, addnoise=True):
weight_decay = 1 / (norm_sigma ** 2)
weigh... | 40.217391 | 129 | 0.532973 | from torch.optim.optimizer import Optimizer, required
import numpy as np
import torch
class SGLD(Optimizer):
"""
Barely modified version of pytorch SGD to implement SGLD
"""
def __init__(self, params,noise_std=1.0, weight_decay = 0.0, lr=required, addnoise=True, noise_type='normal'):
defaults... | 0 | 0 | 0 | 6,636 | 0 | 0 | 0 | 20 | 112 |
c648bd531609351e646d14e14b5dc190e303eea0 | 844 | py | Python | examples/basics/22_go_back.py | sinanislekdemir/payton | 3b24a40e64763262a8db6ee123c45280610ec1cd | [
"BSD-3-Clause"
] | 50 | 2019-07-06T07:21:00.000Z | 2022-01-09T00:56:36.000Z | examples/basics/22_go_back.py | sinanislekdemir/payton | 3b24a40e64763262a8db6ee123c45280610ec1cd | [
"BSD-3-Clause"
] | 15 | 2019-07-06T15:08:22.000Z | 2022-03-29T17:04:13.000Z | examples/basics/22_go_back.py | sinanislekdemir/payton | 3b24a40e64763262a8db6ee123c45280610ec1cd | [
"BSD-3-Clause"
] | 6 | 2019-07-06T07:27:14.000Z | 2022-01-09T00:56:38.000Z | from payton.scene import Scene
from payton.scene.geometry import Cube
from payton.scene.gui import info_box
scene = Scene()
cube = Cube()
cube.track_motion = True
scene.add_object("cube", cube)
scene.create_clock("forward", 0.2, move_forward)
scene.create_clock("back", 0.2, step_back_history)
scene.add_object(
... | 21.641026 | 50 | 0.659953 | from payton.scene import Scene
from payton.scene.geometry import Cube
from payton.scene.gui import info_box
scene = Scene()
def move_forward(period, total):
scene.objects["cube"].forward(1)
if scene.objects["cube"].position[1] > 10:
scene.clocks["forward"].pause()
scene.clocks["back"]._pause ... | 0 | 0 | 0 | 0 | 0 | 353 | 0 | 0 | 46 |
05a69c9a85355a334f36dbf457da461bbf431aa9 | 1,014 | py | Python | Hard/239. Sliding Window Maximum/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Hard/239. Sliding Window Maximum/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Hard/239. Sliding Window Maximum/solution (2).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 239. Sliding Window Maximum
# Runtime: 2552 ms, faster than 8.82% of Python3 online submissions for Sliding Window Maximum.
# Memory Usage: 30.8 MB, less than 14.24% of Python3 online submissions for Sliding Window Maximum.
| 27.405405 | 99 | 0.547337 | # 239. Sliding Window Maximum
# Runtime: 2552 ms, faster than 8.82% of Python3 online submissions for Sliding Window Maximum.
# Memory Usage: 30.8 MB, less than 14.24% of Python3 online submissions for Sliding Window Maximum.
class Solution:
# Deque
def maxSlidingWindow(self, nums: list[int], k: int) -> lis... | 0 | 0 | 0 | 739 | 0 | 0 | 0 | 0 | 46 |
ff784232629e4dbaf04d7498e4880e32cb6de878 | 3,219 | py | Python | exp/test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 20 | 2017-10-16T18:12:51.000Z | 2021-12-23T02:34:20.000Z | exp/test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 1 | 2018-11-10T04:59:48.000Z | 2021-01-21T04:51:31.000Z | exp/test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 5 | 2017-10-17T00:54:42.000Z | 2018-04-08T15:09:40.000Z | from numpy.random import randn
import pycocotools.coco as coco
n = m = 100 # dimensions of our input
input_x = randn(n, m)
#test_coco()
#test_sparse_coder()
#test_word2vec_wiki()
#save_test_words_to_pickle()
#save_ilsvrc_vectors_to_pickle()
# loaded = zl.load('ilsvrc_word2vec')
# print loaded.keys()
| 32.846939 | 108 | 0.639329 | import gensim
import _init_paths
import utils.zl_utils as zl
from numpy.random import randn
from sklearn.decomposition import sparse_encode
import numpy as np
from sklearn.decomposition import SparseCoder
import pycocotools.coco as coco
import random
import zl_config as C
n = m = 100 # dimensions of our input
input_x =... | 0 | 0 | 0 | 0 | 0 | 2,569 | 0 | 34 | 314 |
3cc9535a3b79be29ef6e83cb1785e722e919128c | 497 | py | Python | cmdb/migrations/0009_fittingpower_vendor.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | cmdb/migrations/0009_fittingpower_vendor.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | cmdb/migrations/0009_fittingpower_vendor.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2019-06-13 16:24
from __future__ import unicode_literals
| 23.666667 | 91 | 0.631791 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2019-06-13 16:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cmdb', '0008_fittinggpu_temperature'),
]
operations = [
migrations.AddField... | 0 | 0 | 0 | 318 | 0 | 0 | 0 | 19 | 46 |
688242b33599eacf36942da2c7de2df7604f8941 | 16,109 | py | Python | source/locationHelper.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/locationHelper.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/locationHelper.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | #locationHelper.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2017-2018 NV Access Limited, Babbage B.V.
"""Classes and helper functions for working with rectangles and coordinates."""
from ctypes.wintypes im... | 37.814554 | 139 | 0.723198 | #locationHelper.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2017-2018 NV Access Limited, Babbage B.V.
"""Classes and helper functions for working with rectangles and coordinates."""
from collections impor... | 0 | 3,759 | 0 | 11,474 | 0 | 0 | 0 | 25 | 181 |
60883b85001d81e1be103d0b8a94cb0048281bc1 | 2,880 | py | Python | test/match_maker_test.py | tarehart/AutoLeague2 | 826ba7d9410b8e4c99bbd0434c31e00527aaf2a4 | [
"MIT"
] | null | null | null | test/match_maker_test.py | tarehart/AutoLeague2 | 826ba7d9410b8e4c99bbd0434c31e00527aaf2a4 | [
"MIT"
] | null | null | null | test/match_maker_test.py | tarehart/AutoLeague2 | 826ba7d9410b8e4c99bbd0434c31e00527aaf2a4 | [
"MIT"
] | null | null | null | import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent / 'autoleague'))
RESOURCES_FOLDER = Path(__file__).parent / 'resources'
NUM_ITERATIONS = 100
if __name__ == '__main__':
unittest.main()
| 41.142857 | 142 | 0.710069 | import sys
import unittest
import numpy
from pathlib import Path
from typing import Tuple, List
import trueskill
sys.path.insert(0, str(Path(__file__).parent.parent / 'autoleague'))
from bots import BotID
from leaguesettings import LeagueSettings
from match_maker import MatchMaker, TicketSystem
from ranking_system i... | 0 | 0 | 0 | 2,098 | 0 | 266 | 0 | 62 | 202 |
b8e644295d124485439cf37d46f5ee9bb31ef55e | 1,638 | py | Python | stock_csv_0421.py | Jianyang-Hu/numpypractice | f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9 | [
"Apache-2.0"
] | null | null | null | stock_csv_0421.py | Jianyang-Hu/numpypractice | f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9 | [
"Apache-2.0"
] | null | null | null | stock_csv_0421.py | Jianyang-Hu/numpypractice | f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @version : Python3.6
# @Time : 2017/4/21 15:56
# @Author : Jianyang-Hu
# @contact : jianyang1993@163.com
# @File : stock_csv_0421.py
# @Software: PyCharm
#usecols=(4,5)0
c,v = loadtxt("stocks.csv",delimiter=",",usecols=(4,5),unpack=True)
#
vwap = average(c,weights=v)
print("VWAP=",vwap... | 22.75 | 101 | 0.672161 | # -*- coding: utf-8 -*-
# @version : Python3.6
# @Time : 2017/4/21 15:56
# @Author : Jianyang-Hu
# @contact : jianyang1993@163.com
# @File : stock_csv_0421.py
# @Software: PyCharm
import numpy
from numpy import *
from datetime import datetime
#usecols=(4,5)计数从0开始
c,v = loadtxt("stocks.csv",delimiter=",",usecols... | 180 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 66 |
977b9d00bfba39094d09ab409fac9fa880bf13f6 | 393 | py | Python | python3/bytes/bytes1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/bytes/bytes1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python3/bytes/bytes1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
print(("str = %s" % str(str)))
print(("str = %s" % str(dir(str))))
str1 = "bytes"
print(("str1 = %s" % str1))
str2 = str1.encode()
print(("str2 = %s" % str2))
str3 = str2.decode()
print(("str3 = %s" % str3))
if str1 == str3:
print("coverted ok")
else:
print("FAIL did not covert ok")
... | 19.65 | 36 | 0.549618 | #!/usr/bin/env python3
print(("str = %s" % str(str)))
print(("str = %s" % str(dir(str))))
str1 = "bytes"
print(("str1 = %s" % str1))
str2 = str1.encode()
print(("str2 = %s" % str2))
str3 = str2.decode()
print(("str3 = %s" % str3))
if str1 == str3:
print("coverted ok")
else:
print("FAIL did not covert ok")
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
78fb559394186da001fea006fccd2a052c0c0e78 | 251 | py | Python | SmallTools/ExcelToJson/readTest.py | FontaineGuo/Fontaine_Scripts_Tools | 5210bd77cc315200b02701372ee76766aa6ee275 | [
"MIT"
] | null | null | null | SmallTools/ExcelToJson/readTest.py | FontaineGuo/Fontaine_Scripts_Tools | 5210bd77cc315200b02701372ee76766aa6ee275 | [
"MIT"
] | null | null | null | SmallTools/ExcelToJson/readTest.py | FontaineGuo/Fontaine_Scripts_Tools | 5210bd77cc315200b02701372ee76766aa6ee275 | [
"MIT"
] | null | null | null | import json
# read from string
json_data = open('./test/test.json').read()
data = json.loads(json_data)
print(data['1']['damage'])
# read from file
json_data_1 = open('./test/test.json')
data2 = json.load(json_data_1)
print(data2['1']['nameArr'])
| 17.928571 | 43 | 0.685259 | import json
# read from string
json_data = open('./test/test.json').read()
data = json.loads(json_data)
print(data['1']['damage'])
# read from file
json_data_1 = open('./test/test.json')
data2 = json.load(json_data_1)
print(data2['1']['nameArr'])
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c4d67b584eaa0fd13ec37d0f62731d11a1583168 | 1,602 | py | Python | tools/clang_format_merge_driver/install_git_hook.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | tools/clang_format_merge_driver/install_git_hook.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | tools/clang_format_merge_driver/install_git_hook.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | #!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Hook to install the git config for using the clang-format merge driver."""
import sys
_VERSION = 1
if __name__ == '__main__':
... | 28.105263 | 77 | 0.686017 | #!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Hook to install the git config for using the clang-format merge driver."""
import os
import subprocess
import sys
_VERSION = 1
de... | 0 | 0 | 0 | 0 | 0 | 1,190 | 0 | -16 | 91 |
2bc427b461582e474f5bb0ea754ed506bc3b2728 | 2,561 | py | Python | sindy_bvp/bvp_solver/equations.py | sheadan/SINDy-BVP | ac5b2bb4854bb311e4f6f26b180dde87cc10c13d | [
"MIT"
] | 8 | 2020-05-19T23:56:39.000Z | 2022-03-04T19:22:56.000Z | sindy_bvp/bvp_solver/equations.py | sheadan/SINDy-BVP | ac5b2bb4854bb311e4f6f26b180dde87cc10c13d | [
"MIT"
] | null | null | null | sindy_bvp/bvp_solver/equations.py | sheadan/SINDy-BVP | ac5b2bb4854bb311e4f6f26b180dde87cc10c13d | [
"MIT"
] | 3 | 2020-08-07T17:57:02.000Z | 2021-03-19T23:44:44.000Z | """Equation definitions for SINDy-BVP."""
# Python Package Imports
from typing import List
# Third party imports
import numpy as np
def sturm_liouville_function(x, y, p, p_x, q, f, alpha=0, nonlinear_exp=2):
"""Second order Sturm-Liouville Function defining y'' for Lu=f.
This form is used because it is exp... | 27.537634 | 79 | 0.596642 | """Equation definitions for SINDy-BVP."""
# Python Package Imports
from typing import List
# Third party imports
import numpy as np
def sturm_liouville_function(x, y, p, p_x, q, f, alpha=0, nonlinear_exp=2):
"""Second order Sturm-Liouville Function defining y'' for Lu=f.
This form is used because it is exp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c1bd1b3bf9cdb4377497cfa4fb9465dbe91943b9 | 11,240 | py | Python | get_tutor.py | jianantian/entity_recognizer | bcd02c4f46ec290a7710f7cefef66e17dc97a020 | [
"MIT"
] | null | null | null | get_tutor.py | jianantian/entity_recognizer | bcd02c4f46ec290a7710f7cefef66e17dc97a020 | [
"MIT"
] | 2 | 2018-07-02T06:18:32.000Z | 2020-07-08T03:15:53.000Z | get_tutor.py | jianantian/entity_recognizer | bcd02c4f46ec290a7710f7cefef66e17dc97a020 | [
"MIT"
] | null | null | null | import json
import math
import os
import re
def modify_for_re(word):
"""()\, """
to_be_removed = ['(', ')', '+', '*', '^', '.', '?', '$', '|']
for signal in to_be_removed:
word = word.replace(signal, '\\' + signal)
return word
def get_ordinary_word(ord_path):
""""""
... | 39.027778 | 154 | 0.564947 | import json
import math
import os
import re
import string
from pprint import pprint
from functools import reduce
def list_add(a, b):
return a+b
def modify_for_re(word):
"""在字符串中的(及)前面加上\, 方便转换成正则表达式"""
to_be_removed = ['(', ')', '+', '*', '^', '.', '?', '$', '|']
for signal in to_be_... | 1,650 | 0 | 0 | 0 | 0 | 3,284 | 0 | 3 | 246 |
fdd9c816c78914e7d0a173b282a5af744d0c5817 | 349 | py | Python | 28_gui_tkinter/02_form.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 2 | 2016-07-06T08:47:01.000Z | 2019-12-15T05:09:24.000Z | 28_gui_tkinter/02_form.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 143 | 2016-10-14T07:33:55.000Z | 2018-11-06T19:13:52.000Z | 28_gui_tkinter/02_form.py | maornesimi/python-course-examples | f2e606f142a9d331075db73fd451c4418dba45ed | [
"MIT"
] | 43 | 2016-10-13T15:49:47.000Z | 2019-09-10T09:14:52.000Z | """
Label - Name
TextEntry
Labl - Email
TextEntry
Button - Submit
"""
import Tkinter as tk
root = tk.Tk()
tk.Label(root, text="Name:", anchor="w").pack(fill="x")
tk.Entry(root).pack(fill="x")
tk.Label(root,text="Email:", anchor="w").pack(fill="x")
tk.Entry(root).pack(fill="x")
tk.Button(root,text="Submit").pack... | 13.423077 | 55 | 0.65043 | """
Label - Name
TextEntry
Labl - Email
TextEntry
Button - Submit
"""
import Tkinter as tk
root = tk.Tk()
tk.Label(root, text="Name:", anchor="w").pack(fill="x")
tk.Entry(root).pack(fill="x")
tk.Label(root,text="Email:", anchor="w").pack(fill="x")
tk.Entry(root).pack(fill="x")
tk.Button(root,text="Submit").pack... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ebbc86ba1da0868b4f741a8ceb55f672fdc48e7b | 15,035 | py | Python | datasets/vcoco_eval.py | cjw2021/QAHOI | 7eb19c508f853992ebce5bf7770c886eb2427e86 | [
"Apache-2.0"
] | 29 | 2021-12-17T06:10:35.000Z | 2022-03-23T02:47:04.000Z | datasets/vcoco_eval.py | cjw2021/QAHOI | 7eb19c508f853992ebce5bf7770c886eb2427e86 | [
"Apache-2.0"
] | 10 | 2021-12-21T12:14:06.000Z | 2022-03-30T03:26:28.000Z | datasets/vcoco_eval.py | cjw2021/QAHOI | 7eb19c508f853992ebce5bf7770c886eb2427e86 | [
"Apache-2.0"
] | 5 | 2021-12-17T01:51:42.000Z | 2022-02-08T01:24:22.000Z | # ------------------------------------------------------------------------
# QAHOI
# Copyright (c) 2021 Junwen Chen. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------
# Copyright (c) Hitachi, Ltd. Al... | 47.882166 | 130 | 0.5287 | # ------------------------------------------------------------------------
# QAHOI
# Copyright (c) 2021 Junwen Chen. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------
# Copyright (c) Hitachi, Ltd. Al... | 0 | 0 | 0 | 14,468 | 0 | 0 | 0 | 11 | 67 |
a2a77f49a66e4effa552a03df51873e8f4f4291f | 1,918 | py | Python | cptac/pancan/__init__.py | PayneLab/cptac | 531ec27a618270a2405bf876443fa58d0362b3c2 | [
"Apache-2.0"
] | 53 | 2019-05-30T02:05:04.000Z | 2022-03-16T00:38:58.000Z | cptac/pancan/__init__.py | PayneLab/cptac | 531ec27a618270a2405bf876443fa58d0362b3c2 | [
"Apache-2.0"
] | 20 | 2020-02-16T23:50:43.000Z | 2021-09-26T10:07:59.000Z | cptac/pancan/__init__.py | PayneLab/cptac | 531ec27a618270a2405bf876443fa58d0362b3c2 | [
"Apache-2.0"
] | 17 | 2019-09-27T20:55:09.000Z | 2021-10-19T07:18:06.000Z | # Copyright 2018 Samuel Payne sam_payne@byu.edu
# 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 ... | 30.935484 | 114 | 0.729927 | # Copyright 2018 Samuel Payne sam_payne@byu.edu
# 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 ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 246 | 465 |
a587e6cc43c656047d6b61e76ff589661cd26196 | 4,318 | py | Python | xm_scraper.py | jasantosm/powerco_scraper_historical | 4aad8a4fdb50ff052391f2ef14b2bbb0662dea71 | [
"MIT"
] | null | null | null | xm_scraper.py | jasantosm/powerco_scraper_historical | 4aad8a4fdb50ff052391f2ef14b2bbb0662dea71 | [
"MIT"
] | null | null | null | xm_scraper.py | jasantosm/powerco_scraper_historical | 4aad8a4fdb50ff052391f2ef14b2bbb0662dea71 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
selenium_scraper()
| 36.285714 | 147 | 0.539833 | import pandas as pd
import time
from bs4 import BeautifulSoup
from IPython.display import display_html
from selenium import webdriver
from mysql_service import insert_day
def selenium_scraper():
url = 'http://ido.xm.com.co/ido/SitePages/ido.aspx'
sleep_time = 3
options = webdriver.ChromeOptions()
op... | 4 | 0 | 0 | 0 | 0 | 4,068 | 0 | 39 | 156 |
bfc383eb72f7badf8cf084a5edfd4aab97792ee7 | 11,845 | py | Python | pyspectools/parsers.py | aowen-uwmad/PySpecTools | 3fd0b68352910df1e653370797a8edd46d92fa1c | [
"MIT"
] | 22 | 2018-03-14T10:44:17.000Z | 2022-01-10T15:02:37.000Z | pyspectools/parsers.py | aowen-uwmad/PySpecTools | 3fd0b68352910df1e653370797a8edd46d92fa1c | [
"MIT"
] | 21 | 2019-07-27T01:43:50.000Z | 2021-11-15T14:57:15.000Z | pyspectools/parsers.py | aowen-uwmad/PySpecTools | 3fd0b68352910df1e653370797a8edd46d92fa1c | [
"MIT"
] | 3 | 2020-08-03T16:22:00.000Z | 2021-11-01T15:31:55.000Z | import os
import struct
from glob import glob
import pandas as pd
import numpy as np
from pyspectools import ftmw_analysis as fa
def parse_spectrum(filename, threshold=20.0):
""" Function to read in a blackchirp or QtFTM spectrum from file """
dataframe = pd.read_csv(
filename, delimiter="\t", names... | 32.811634 | 110 | 0.529506 | import os
import struct
from glob import glob
import pandas as pd
import numpy as np
from pyspectools import ftmw_analysis as fa
def parse_spectrum(filename, threshold=20.0):
""" Function to read in a blackchirp or QtFTM spectrum from file """
dataframe = pd.read_csv(
filename, delimiter="\t", names... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81514642a6cee548a76da2c49b83ed84280a5b7b | 777 | py | Python | backend/migrations/0006_auto_20210811_2310.py | saad4software/MMSS-Backend | fddb2ff94eab905df321dd0ce574b7ae787f067d | [
"Apache-2.0"
] | null | null | null | backend/migrations/0006_auto_20210811_2310.py | saad4software/MMSS-Backend | fddb2ff94eab905df321dd0ce574b7ae787f067d | [
"Apache-2.0"
] | null | null | null | backend/migrations/0006_auto_20210811_2310.py | saad4software/MMSS-Backend | fddb2ff94eab905df321dd0ce574b7ae787f067d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2 on 2021-08-11 20:10
| 26.793103 | 100 | 0.592021 | # Generated by Django 3.2 on 2021-08-11 20:10
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0005_auto_20210811_2231'),
]
operations = [
migrations.AlterField(
model_name='subscription',
... | 0 | 0 | 0 | 649 | 0 | 0 | 0 | 13 | 68 |