repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
boatpand/coronadailyth | 12,481,174,965,010 | a59fdeea72fd77391fe4f3ef2dc922d4eaa515f5 | d6a9c305401e8c2b62b980fbdb7ef71fbd490303 | /app.py | f8fffaef8e47b4cc3d2ba2056919e51cea5e5357 | [] | no_license | https://github.com/boatpand/coronadailyth | a2628f061973d806279d816f05d5af704d5d20d8 | ff0288188fb2587fa2403b32b01dd7641368dbb5 | refs/heads/main | 2023-06-05T20:15:51.485621 | 2021-06-21T06:52:48 | 2021-06-21T06:52:48 | 378,802,845 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, request, abort
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage,
)
import requests
import random
import datetime
import schedule
app = Flask(__name__... | UTF-8 | Python | false | false | 4,050 | py | 4 | app.py | 1 | 0.644287 | 0.586572 | 0 | 80 | 41.4625 | 351 |
WoefulWolf/NieR2Blender_2.8 | 10,204,842,339,625 | 22951ed6361e18779f399eb0b2a41f5801e184a7 | d0fb36f4ecf10c5de1ad23d09af93cac50bf2521 | /dat_unpacker.py | b9a4ecb137ce370815a298573085c944cff900fe | [] | no_license | https://github.com/WoefulWolf/NieR2Blender_2.8 | 474777266425945d174641f25e2cd319f17d5718 | 8f3d6360baa287ad4ed7d0d486c5cb06723e1e94 | refs/heads/master | 2020-07-18T22:05:50.184706 | 2020-06-19T09:19:50 | 2020-06-19T09:19:50 | 206,321,535 | 9 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | #encoding = utf-8
import os
import sys
import struct
from .util import to_int
def little_endian_to_float(bs):
return struct.unpack("<f", bs)[0]
def little_endian_to_int(bs):
return int.from_bytes(bs, byteorder='little')
def create_dir(dirpath):
if not os.path.exists(dirpath):
os.makedirs(dirpath)
def rea... | UTF-8 | Python | false | false | 6,225 | py | 8 | dat_unpacker.py | 6 | 0.704739 | 0.693173 | 0.000161 | 216 | 27.819444 | 136 |
matelukas/workshop | 19,662,360,298,825 | 5377cbb0d581815cd87e3d203f30a2667ff9a3af | ff485c0282ae061fb897b4e8da6d8bc71cadd9c5 | /curtin/maas/curtin/url_helper.py | f3a541833c3a0c6b241ca712647e10ad63f08013 | [] | no_license | https://github.com/matelukas/workshop | 8fbc55bbf108c668380f78b36522e98189af79aa | e50ce0e3cc3f6278526de8e056d94b0e85d9fc40 | refs/heads/master | 2018-02-15T02:22:29.980107 | 2016-10-25T08:34:13 | 2016-10-25T08:34:13 | 67,415,537 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from email.utils import parsedate
import json
import os
import socket
import sys
import time
import uuid
from functools import partial
try:
from urllib import request as _u_re # pylint: disable=no-name-in-module
from urllib import error as _u_e # pylint: disable=no-name-in-module
from urllib.parse imp... | UTF-8 | Python | false | false | 10,482 | py | 199 | url_helper.py | 71 | 0.587674 | 0.584526 | 0 | 315 | 32.27619 | 78 |
nyoshimizu/HTSymm | 661,424,998,541 | a5945e34a3a1cbaa04fa905e7bdf80d452ef891c | 9eb1271890591a13d207c59e5b991a29ff5b8780 | /analyze/delaydefpaths.py | 75f532115a495fcc6353b74d8105e0e18b570e5b | [] | no_license | https://github.com/nyoshimizu/HTSymm | 956203b6071a89e4929cb4f5b049b29bdfc98fda | ec66ef1fb88fb90af9cfc91bfb70ec421b54ce6e | refs/heads/master | 2021-01-21T04:53:53.697143 | 2016-07-22T23:14:19 | 2016-07-22T23:14:19 | 50,880,255 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This function determines the delay defining paths for a circuit. It requires a
db.VerilogDB to determine the delay-defining paths and net path delay for a
circuit given a certain input.
"""
from random import (
seed,
randrange
)
class rand_inputs:
"""
A generator for creating random inputs for al... | UTF-8 | Python | false | false | 1,332 | py | 11 | delaydefpaths.py | 11 | 0.662913 | 0.660661 | 0 | 48 | 26.729167 | 78 |
Firefly8/ATC | 6,287,832,143,303 | 6342f44d3d308256ec99b49e719e4b66a0dc258f | 4b2d225b7a686f61cc51054f00f47af47a42e9f1 | /verification/testing/unit_tests/dp/connection_established_delete_test.py | 40194886f64c62cbddcf5c7094394e7d9d6aa9c8 | [] | no_license | https://github.com/Firefly8/ATC | e18deb1e6d31be1fa6e881dc858c0b61de6fa39a | 35872e9e3cb08688cfdde63053ccf1f43d7f0d36 | refs/heads/master | 2021-09-07T08:45:25.026285 | 2018-02-20T14:59:36 | 2018-02-20T14:59:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import sys
import os
import inspect
my_currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
my_parentdir = os.path.dirname(my_currentdir)
my_grandparentdir = os.path.dirname(my_parentdir)
sys.path.append(my_grandparentdir)
sys.path.append(my_parentdir)
#from tes... | UTF-8 | Python | false | false | 4,377 | py | 189 | connection_established_delete_test.py | 107 | 0.661869 | 0.642678 | 0 | 137 | 30.948905 | 111 |
mcoavoux/test | 18,107,582,132,628 | 292adec912fbb70a01e2ea3b17ac35b69df1ce3b | cdc27a38daee4f73d4c4830f9e20306aedc46676 | /utils/conll2text.py | 42e4fe115da0ec38f17dc6bf364eb371b0b5f21b | [] | no_license | https://github.com/mcoavoux/test | 50e2f084c933c907678287bbb63acdcb4472f968 | 9582b5efa547e2a877e19f191ba64edee1eee469 | refs/heads/master | 2021-04-27T00:27:16.772614 | 2019-10-03T11:33:39 | 2019-10-03T11:33:39 | 123,818,277 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
ID,FORM,LEMMA,CPOS,FPOS,MORPH,HEAD,DEPREL,PHEAD,PDEPREL=range(10)
def read_conll(filename) :
with open(filename) as f :
sentences = [[line.split("\t") for line in sen.split("\n") if line and line[0] != "#"] for sen in f.read().split("\n\n") if sen.strip()]
for i in range(len(sentences)):
sent... | UTF-8 | Python | false | false | 1,173 | py | 24 | conll2text.py | 19 | 0.587383 | 0.583973 | 0 | 39 | 29.025641 | 144 |
quidditymaster/thimbles | 1,065,151,908,260 | 1059efd9d104d97461fb97eea7c566058b82b4c1 | f3faf9d29bba85320dedd5cd2b452b0a1efe3c55 | /thimblesgui/__init__.py | 476455ec1c1649db5ea94506ae84076bfb15aaba | [
"MIT"
] | permissive | https://github.com/quidditymaster/thimbles | 2f764e35aeaa76aa2136e24fe24d171630a1f277 | b122654a012f0eb4f043d1ee757f884707c97615 | refs/heads/master | 2021-01-11T23:26:33.694235 | 2017-05-14T14:32:36 | 2017-05-14T14:32:36 | 78,581,998 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import os
import matplotlib as mpl
try:
from PyQt4 import QtGui
from PyQt4 import QtCore
mpl.use("Qt4Agg")
which_qt = "PyQt4"
except ImportError:
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from PyQt5 import QtCore
mpl.use("Qt5Agg")
which_qt = "PyQt5"
#mpl.rcParams['backe... | UTF-8 | Python | false | false | 856 | py | 147 | __init__.py | 139 | 0.745327 | 0.733645 | 0 | 33 | 24.909091 | 67 |
MakerSpaceLeiden/AccesSystem | 18,064,632,472,273 | 7c767343429467a49e203a96b96addba35db19cf | b38c5eb548636af44b4c82fc2b57e3103114f2e0 | /Master/checkdb.py | c073b61546dce1f8d35ae2a184e786c0389a5631 | [
"LicenseRef-scancode-other-permissive",
"MIT",
"NTP",
"LicenseRef-scancode-rsa-1990",
"LicenseRef-scancode-rsa-md4",
"Beerware",
"RSA-MD",
"HPND-sell-variant",
"Spencer-94",
"LicenseRef-scancode-zeusbench",
"metamail",
"Apache-2.0"
] | permissive | https://github.com/MakerSpaceLeiden/AccesSystem | e652a343c86ac904de8a1a08adc13bbc3ee6de7d | 5e39572f51fafca71750660fcf5f737670f17d54 | refs/heads/master | 2023-05-27T01:44:57.893580 | 2023-05-16T11:27:48 | 2023-05-16T11:27:48 | 54,308,309 | 4 | 4 | Apache-2.0 | false | 2022-02-21T22:37:34 | 2016-03-20T08:46:08 | 2021-12-16T21:13:13 | 2022-02-21T22:37:33 | 18,697 | 4 | 6 | 1 | C++ | false | false | import mysql.connector
SQL ="""select active, members_tag.owner_id, first_name,last_name,email,members_tag.id from acl_entitlement
inner join acl_machine on acl_machine.node_machine_name = %s and acl_machine.requires_permit_id = acl_entitlement.permit_id
inner join members_tag on memb... | UTF-8 | Python | false | false | 1,495 | py | 172 | checkdb.py | 127 | 0.672241 | 0.657525 | 0 | 23 | 63.956522 | 136 |
the-tale/the-tale | 17,145,509,483,099 | 408c3adf4e8002fcc56d34ae4564e98713f4c5f4 | 747febe786dd6b7fd6c63cfe73dbe3023354daa8 | /src/the_tale/the_tale/news/meta_relations.py | 1989a2e42fbf9d6557a990b001a7bb87b13b89e9 | [
"BSD-3-Clause"
] | permissive | https://github.com/the-tale/the-tale | 4e4b8d91dc873a5fb935fe58e9721a877baa6d3f | e8450bd2332344da805b1851e728da5a3e5bf0ef | refs/heads/develop | 2023-08-01T13:53:46.835667 | 2022-12-25T18:04:56 | 2022-12-25T18:04:56 | 1,949,167 | 98 | 52 | BSD-3-Clause | false | 2023-02-15T18:57:33 | 2011-06-24T18:49:48 | 2023-02-06T14:06:56 | 2023-02-15T18:57:29 | 43,549 | 275 | 56 | 329 | Python | false | false |
import smart_imports
smart_imports.all()
class News(meta_relations_objects.MetaType):
__slots__ = ('caption', )
TYPE = 12
TYPE_CAPTION = 'Новость'
def __init__(self, caption, **kwargs):
super(News, self).__init__(**kwargs)
self.caption = caption
@property
def url(self):
... | UTF-8 | Python | false | false | 1,066 | py | 1,898 | meta_relations.py | 1,502 | 0.623229 | 0.621341 | 0 | 39 | 26.128205 | 84 |
thenetcircle/dino | 18,459,769,456,106 | f03ca08c6a6b5ac4da8d9532bd1db796585490d1 | 2b7180b739df298195e35a71e20a4251f83b4813 | /test/validation/test_request_message_integration.py | 3973358dedc9617740ff03b75685e7a6488c19dd | [
"Apache-2.0"
] | permissive | https://github.com/thenetcircle/dino | 625f752046502a04ab9ec42b0a8c437d7123bcbb | f1f68954191f64cdec4b3914caf154300ccbf519 | refs/heads/master | 2023-08-10T09:59:07.064141 | 2023-08-03T07:56:19 | 2023-08-03T07:56:19 | 69,937,941 | 153 | 21 | Apache-2.0 | false | 2023-02-15T22:53:29 | 2016-10-04T05:40:09 | 2023-02-11T21:32:00 | 2023-02-15T22:53:27 | 66,421 | 141 | 6 | 11 | Python | false | false | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | UTF-8 | Python | false | false | 3,532 | py | 261 | test_request_message_integration.py | 217 | 0.660532 | 0.657135 | 0 | 89 | 38.685393 | 86 |
caspar/PhysicsLab | 7,387,343,787,960 | b67f48a679e78f7b58db5cc0dce24d1ae949f6a9 | 5fec9c2b93f62355727d1dd38145fa25fcd026a1 | /21_Midterm/blackbody.py | 049f3e789737f6f10d9e801f2d0db4a49de90dd3 | [
"MIT"
] | permissive | https://github.com/caspar/PhysicsLab | 14a43a6e3e000d850dee18daae56a72f762766a7 | 1b4d45d9e915a84ecb80a39498850463bbc2d3be | refs/heads/master | 2021-01-10T13:29:15.332493 | 2016-05-09T00:22:28 | 2016-05-09T00:22:28 | 43,075,107 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import numpy as np
import matplotlib.pyplot as plt
# constants
h = 6.62607004e-34
hbar = h/(2*math.pi)
k_B = 1.38064852e-23
T = 293 # room temperature
c = 299792458
# range of values
wavelength = np.arange(0, 5e-5, 1e-7)
# spectral radiance
S = (8*math.pi*hbar*c /(wavelength**5)) / (math.e**(h*... | UTF-8 | Python | false | false | 500 | py | 102 | blackbody.py | 18 | 0.676 | 0.59 | 0 | 24 | 19.833333 | 78 |
jalondono/holbertonschool-machine_learning | 14,285,061,244,037 | b36d1e8d7b8e2d59e5d7e341b63544eb809c0970 | 17ef57d9f955dd7f85207ac4b5692751b651be3b | /supervised_learning/0x00-binary_classification/5-neuron.py | 12fb785ec0310c82d2076f9980655a1b2821c778 | [] | no_license | https://github.com/jalondono/holbertonschool-machine_learning | 4a51698c371856523f1a06062b5c608d32cb81fb | f83a60babb1d2a510a4a0e0f58aa3880fd9f93a7 | refs/heads/master | 2023-01-21T16:05:55.003248 | 2020-11-23T21:34:56 | 2020-11-23T21:34:56 | 255,702,357 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
""" Neuron """
import numpy as np
def sigmoid(Z):
"""Activation function of sigmoid neurone"""
sigma = (1.0 / (1.0 + np.exp(-Z)))
return sigma
class Neuron:
"""Neuron Class"""
def __init__(self, nx):
"""
constructor method
nx is the number of input... | UTF-8 | Python | false | false | 3,111 | py | 222 | 5-neuron.py | 188 | 0.542002 | 0.531703 | 0 | 105 | 28.590476 | 72 |
Miguelflj/Prog1 | 4,793,183,521,084 | c10fb30035acca1a40cd54481e0deccefbb66804 | 4c29ce2483165a702cf8f78435b0581ac5290f02 | /CodesURI/ex1164.py | 1d7420e5f82734ea1c9e1182fdb03237db405a2d | [] | no_license | https://github.com/Miguelflj/Prog1 | eb2955f84e59f82482b722b4cccaac3bb9fa29d9 | 26bf67dd15a2e29d88831a9b22847ea70c823d21 | refs/heads/master | 2020-05-09T12:31:15.475454 | 2019-04-13T04:09:59 | 2019-04-13T04:09:59 | 181,114,023 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
def main():
i = 0
n = int(input())
while(i < n):
j = 1
soma = 0
teste = int(input())
while( j < teste):
if( (teste%j) == 0):
soma = soma + j
j += 1
if(teste == soma):
print str(teste) + " eh perfeito"
else:
print str(teste) + " nao eh perfeito"
i += 1
main() | UTF-8 | Python | false | false | 301 | py | 167 | ex1164.py | 163 | 0.48505 | 0.465116 | 0 | 23 | 12 | 40 |
stevenjj/nstrf_2017 | 8,950,711,878,645 | c9671d8c5434cb9087ce0a66e1b565ca70d69e71 | b2a56075ece16a8a558a47ea65b7a80d66cfb283 | /val_logic_manager/src/button_gui/GUI_val_logic.py | 740049ece1bd6be7a3a9b19b19a111818f116b92 | [] | no_license | https://github.com/stevenjj/nstrf_2017 | 5b7a329d0b9c8d988bba9097cfcd2cb33b3e8f3d | f05057c9e7272e76b432a9c1a2401ad6b2881647 | refs/heads/master | 2020-04-05T14:12:23.089866 | 2017-09-07T00:20:27 | 2017-09-07T00:20:27 | 94,827,917 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# Val simple GUI
# Based on Andrea Thomaz's lab's class code in UT Austin
# Modified for personal use.
# stevenjj@utexas.edu
#from GUI_params import *
# GUI Command list
GUI_CMD_TOPIC = 'val_logic_manager/operator_command'
INVALID_CMD = "invalid_cmd"
GO_HOME, GO_HOME_GUI_STRING = "go_hom... | UTF-8 | Python | false | false | 5,136 | py | 75 | GUI_val_logic.py | 37 | 0.622079 | 0.617601 | 0 | 158 | 31.5 | 106 |
niel99/all2 | 5,214,090,320,482 | 9857cfd2abd936c8a83f3fba1dbb42967527b0b0 | 5c1beb1bcea9c355e70642db901d42e828c46e6a | /MUFFINS3.py | cd058ebe4251066f0ddc255815afb819f6fcd07a | [] | no_license | https://github.com/niel99/all2 | 744302f54a80bacc885d6d65d2101a486fc8e9b5 | 8104715203de47087f7632ac3855fd7966ef2be2 | refs/heads/master | 2020-12-02T06:28:37.525192 | 2017-07-11T02:27:20 | 2017-07-11T02:27:20 | 96,841,071 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def leftover(n):
if n%2==0:
l=n/2+1
else:
l=(n+1)/2
l=int(l)
print(l,"\n")
t=int(input())
while t>0:
n=int(input())
leftover(n)
t=t-1
| UTF-8 | Python | false | false | 178 | py | 56 | MUFFINS3.py | 44 | 0.438202 | 0.393258 | 0 | 12 | 13.833333 | 18 |
emmett-framework/rest | 6,588,479,845,652 | 0772c91318d18115feb5c6f176ca663cd3e316a8 | 6d24838061f45704bf612c92e99255c247ffec22 | /emmett_rest/openapi/generation.py | c98e1bdf340661efdb307d1d7da96cd934c84f2c | [
"BSD-3-Clause"
] | permissive | https://github.com/emmett-framework/rest | a9dbaad0259b9c26b315a81a66a74337a5cab819 | d2c7220889e2031e2aa7212d89de8a5e7184d6ba | refs/heads/master | 2023-05-01T16:42:34.349006 | 2023-04-21T08:02:43 | 2023-04-21T08:02:43 | 234,587,909 | 10 | 1 | BSD-3-Clause | false | 2022-04-11T10:12:12 | 2020-01-17T16:21:43 | 2022-02-14T09:26:17 | 2022-04-11T10:12:12 | 302 | 4 | 1 | 0 | Python | false | false | # -*- coding: utf-8 -*-
"""
emmett_rest.openapi.generation
------------------------------
Provides OpenAPI generation functions
:copyright: 2017 Giovanni Barillari
:license: BSD-3-Clause
"""
import datetime
import decimal
import re
from collections import defaultdict
from enum import Enum
from t... | UTF-8 | Python | false | false | 35,890 | py | 30 | generation.py | 24 | 0.487991 | 0.485288 | 0 | 968 | 36.076446 | 87 |
SHUwangwei/leetcode | 10,728,828,338,484 | 6be6d8f020f93921bc8c6ede8814666d0d1efd5b | 42af135232387090b629d12150bf67c537bc9e3d | /1023.py | e38b00db107f7b21e6bfa7512bbd99dbc042d0f5 | [] | no_license | https://github.com/SHUwangwei/leetcode | 19205b024f7ad329427d714f5248186a203734a2 | bd93367081a752aa8cf3689944921f4392df1974 | refs/heads/master | 2022-02-27T11:10:05.606379 | 2022-02-18T01:50:37 | 2022-02-18T01:50:37 | 158,354,279 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def camelMatch2(self, queries, pattern):
import re
newpattern = '^([a-z\s]*?)'
for p in pattern:
newpattern += p+'([a-z\s]*?)'
newpattern += '$'
res = []
for query in queries:
match = re.search(newpattern, query)
if ... | UTF-8 | Python | false | false | 976 | py | 50 | 1023.py | 50 | 0.405738 | 0.402664 | 0 | 38 | 24.710526 | 50 |
henryoliver/algo-expert-solutions | 4,621,384,825,121 | a94b4667df66301ae74d38059d3191ab966c29ae | 2e26cd20d96764bfe4e3dd29ece1a96cc2461bb8 | /Arrays/smallest-difference.py | 0345114b0c00db71470723b2efb19e2a05a3b247 | [
"MIT"
] | permissive | https://github.com/henryoliver/algo-expert-solutions | 35ac4df09b83d5fef31c1695fc8404a274312ca9 | c45623861d97862fa62e2461a56d3946adde7e22 | refs/heads/master | 2022-08-28T15:18:55.903334 | 2020-05-26T12:27:34 | 2020-05-26T12:27:34 | 266,343,724 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Smallest Difference
# def smallestDifference(arrayOne=[], arrayTwo=[]):
# '''
# Solution 1 - Brute force (aka: Naive approach)
#
# O(n^2) time | O(1) space
#
# arrayOne: a list of integers
# arrayTwo: a list of integers
# return: a list of two integers
# '''
# closestPair = []
# c... | UTF-8 | Python | false | false | 2,945 | py | 18 | smallest-difference.py | 17 | 0.596318 | 0.559836 | 0 | 88 | 32.318182 | 110 |
puter/trucking | 12,635,793,833,836 | 04d35f41990d319f914f45fa0c470be95156ff10 | 6e9b22da8cd32ab0795eadad8a80ab615a121fe7 | /service/migrations/0002_auto_20160925_1706.py | 06b5263b9e3536479db08efb82954e1dfe7ea173 | [] | no_license | https://github.com/puter/trucking | 0e7fc0dc2a2044106dd614870d692519b4210201 | bcaac15df645147cb4f80c8eab25b70829435d37 | refs/heads/master | 2019-08-09T16:30:26.635336 | 2017-04-30T17:27:19 | 2017-04-30T17:27:19 | 67,470,285 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('service', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Entry',
fi... | UTF-8 | Python | false | false | 1,633 | py | 47 | 0002_auto_20160925_1706.py | 28 | 0.511329 | 0.505818 | 0 | 54 | 29.240741 | 114 |
nikostuoc/Novartis2020 | 5,523,327,980,388 | 76757eff40f3cfbc3bd4300eda936d8cbf663847 | dc507bcfa20dc9f50440a92997ea346a7e573018 | /pre-datathon/models/ci_metric_optimizer_cb.py | bfd1434968554efe854d35ebfd308c566068d9a3 | [
"MIT"
] | permissive | https://github.com/nikostuoc/Novartis2020 | bd81d008909f7e3610555e7a5c9d80c3953e99b3 | 390f34efa6bbc1e168f4e58d2d335c7cfa7d865e | refs/heads/main | 2023-03-18T11:32:25.640206 | 2020-11-30T14:16:49 | 2020-11-30T14:16:49 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
####################
#
# This doesn't work. Catboost works with "batches", or on the fly,
# and we need the full vector to compute gradient.
#
#
####################
import pandas as pd
import numpy as np
from catboost import CatBoostRegressor
from sklearn.model_selection import train_test_split
from tools.simple_me... | UTF-8 | Python | false | false | 3,566 | py | 67 | ci_metric_optimizer_cb.py | 41 | 0.57908 | 0.500841 | 0 | 133 | 25.804511 | 82 |
KtechB/machina | 15,066,745,296,801 | 70bf06b6b988d122593620d69e9e323494d68a87 | 6937a62ed792ce161231b84591ff791a51b70dfe | /machina/__init__.py | e23cee99fb42497b40b287fc9f435f559ebfa8f7 | [
"MIT"
] | permissive | https://github.com/KtechB/machina | 75bfb3ed48675649afef81f01f498c1af3d880f6 | 24eca9cc9b89a0e0b9e026282f17c7b9fe2869ab | refs/heads/master | 2020-09-22T08:24:40.454344 | 2019-12-05T06:54:05 | 2019-12-05T06:54:05 | 225,120,598 | 1 | 0 | MIT | true | 2019-12-01T07:06:16 | 2019-12-01T07:06:16 | 2019-11-21T08:34:52 | 2019-11-16T12:38:22 | 7,185 | 0 | 0 | 0 | null | false | false | import pkg_resources
__version__ = pkg_resources.get_distribution('machina-rl').version
from machina import algos # NOQA
from machina import envs # NOQA
from machina import models # NOQA
from machina import noise # NOQA
from machina import optims # NOQA
from machina import pds # NOQA
from machina import pols ... | UTF-8 | Python | false | false | 468 | py | 140 | __init__.py | 89 | 0.760684 | 0.760684 | 0 | 17 | 26.529412 | 66 |
mekhami/studychess | 9,302,899,206,881 | 202c89ef9be25d479e1e8b45358df4022588955f | 92871972affa492c17987f5615c1f919d1b7434d | /studychess/core/models.py | 3ac9271cc32217a8931ddb40d3ffa0b1df7b7a08 | [] | no_license | https://github.com/mekhami/studychess | 2f9c0416e09b157a1fda844e17409eda7fdb4374 | 47e31578312e4109c5c4987550344e6747ee8cad | refs/heads/master | 2020-04-06T04:14:57.015166 | 2017-04-16T01:57:51 | 2017-04-16T01:57:51 | 82,981,850 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
from django.db import models
from channels import Group
from channels.binding.websockets import WebsocketBinding
import logging
logger = logging.getLogger(__name__)
class Post(models.Model):
SITE_CHOICES = (
('Lichess', 'Lichess'),
('Chess.com', 'Chess.com'),
)
name = models... | UTF-8 | Python | false | false | 1,568 | py | 14 | models.py | 5 | 0.577806 | 0.574617 | 0 | 62 | 24.290323 | 69 |
chrisrioux2/CLEBlog | 4,844,723,148,358 | b13763b83c2d4b33dfcedab5e26b45a3d4f6eac6 | 17a816ff2c033a9e75ad8ad94f5750b1d6d82ca6 | /venv/lib/python2.7/ntpath.py | 20a224db13d3436fb3dde212aadc9c9b5afabf6f | [] | no_license | https://github.com/chrisrioux2/CLEBlog | 43669bbe72c6a766f6886a33e5d76297523027d6 | 594436f1a84ec21c56fd474683a9c9dc5a07cee2 | refs/heads/master | 2015-08-17T10:08:20.997914 | 2014-11-27T22:59:19 | 2014-11-27T22:59:19 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /Users/Shuffleberries/anaconda/lib/python2.7/ntpath.py | UTF-8 | Python | false | false | 54 | py | 23 | ntpath.py | 22 | 0.851852 | 0.814815 | 0 | 1 | 54 | 54 |
hkingravi/KMVis | 1,563,368,139,223 | d15521d56675d226d88047426b936cc968935683 | f91caf318a6c6849a37dac1df01f7383201cf304 | /examples/kernel_example.py | de584b4b5c1ae8e30d92cf9c9165e3fc07dc7876 | [] | no_license | https://github.com/hkingravi/KMVis | 3b713dd42079b60f4876fabaab1124628097f435 | 40106c924d1e216c4720a9f6df6468e89f271f5e | refs/heads/master | 2021-01-22T10:14:58.414301 | 2014-07-08T02:40:42 | 2014-07-08T02:40:42 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # this script tests KernelType and kernel
# numpy stuff
import numpy as np
from scipy.io import savemat
# matplotlib stuff
from matplotlib import rc
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# add class directory to path
import sys
sys.path.insert(0, '../src/core')
sys.path.insert(0, '.... | UTF-8 | Python | false | false | 3,536 | py | 38 | kernel_example.py | 37 | 0.667138 | 0.626697 | 0 | 149 | 22.738255 | 98 |
Jefersonnnn/URIOnlineJudge | 15,831,249,490,076 | 4650a4629caa1e89d09ed85343ea4853a4248c72 | 23f97feaf08623c4bcca0dd9051903b47465e2fd | /desafios/triangulos.py | 4f6490edd158ae51c6eb665558774c85bdcca9fd | [] | no_license | https://github.com/Jefersonnnn/URIOnlineJudge | ff1f2d1467fa52b1e49561ec53b6b69b2899707e | 166e85e9298e479ce5064e2b435414534acaa22e | refs/heads/master | 2023-04-01T05:39:06.639041 | 2023-03-11T00:48:18 | 2023-03-11T00:48:18 | 352,818,135 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Complete a função verificaTriangulo, que recebe 3 valores inteiros como parâmetro,
considerando que esses valores representam os 3 lados de um triângulo. Como resultado,
o método deve informar se os valores realmente correspondem a um triângulo,
e se o triângulo é equilátero, isósceles ou escaleno.
A saída deve s... | UTF-8 | Python | false | false | 2,274 | py | 19 | triangulos.py | 18 | 0.67576 | 0.668157 | 0 | 63 | 34.492063 | 113 |
ssebadduka/cuniculture_app | 14,156,212,221,328 | 295521e0f3d4ab8e566dff07e83d8213864eb066 | bd48b3c60328f9c37fdcce5adcf7ee84218a40be | /cuniculture_app/views/farm_views.py | 94a15614708dce7d1ad6fc6a0965053eabfb353d | [] | no_license | https://github.com/ssebadduka/cuniculture_app | 95384f6dc128cca1883e674155100acd6a851aec | 00d806acf8e30fdd0dec9097021d81e66ee7d4d5 | refs/heads/master | 2023-02-25T19:23:05.178697 | 2021-02-01T07:46:05 | 2021-02-01T07:46:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.http import HttpResponseRedirect
from django.shortcuts import render, redirect, reverse
from django.contrib import messages
from cuniculture_app.forms.farm_forms import FarmForm
from cuniculture_app.selectors.farms_selectors import get_farms, get_farm
def manage_farms(request):
farms = get_f... | UTF-8 | Python | false | false | 1,635 | py | 19 | farm_views.py | 19 | 0.634251 | 0.634251 | 0 | 53 | 28.849057 | 73 |
spdx/tools-python | 7,232,724,945,603 | 559285e4360eb0d09742c9eab873bd74d21d3068 | bfc42c114f652012b6cfd14e7cccf52cb6b9ac7e | /src/spdx_tools/spdx3/writer/console/annotation_writer.py | 3261a69bd29902db7789e58949beecae6f92e0e2 | [
"Apache-2.0",
"GPL-2.0-only"
] | permissive | https://github.com/spdx/tools-python | 05a952501af2ac608678cb1737f7c661f6091fa2 | 777bd274dd06cb24342738df7da5ab285d652350 | refs/heads/main | 2023-08-31T09:39:52.930063 | 2023-08-24T06:39:48 | 2023-08-24T10:22:33 | 32,761,058 | 147 | 136 | Apache-2.0 | false | 2023-09-14T15:50:59 | 2015-03-23T21:54:39 | 2023-09-08T16:55:58 | 2023-09-14T15:50:57 | 3,593 | 138 | 141 | 57 | Python | false | false | # SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
from beartype.typing import TextIO
from spdx_tools.spdx3.model import Annotation
from spdx_tools.spdx3.writer.console.console import write_value
from spdx_tools.spdx3.writer.console.element_writer import write_element_properties
... | UTF-8 | Python | false | false | 628 | py | 378 | annotation_writer.py | 354 | 0.780255 | 0.765924 | 0 | 16 | 38.25 | 83 |
martyone/btts | 17,755,394,831,262 | b6680418096b1255c6654add6026fa9233898eb6 | db42ec397e3e06a199b0842f295ddc4ebb0f4483 | /lib/python/btts/voicecall.py | ff3f130caeb5c52f4854b392e4312fff991e3353 | [] | no_license | https://github.com/martyone/btts | 4c53a0f273dd19a00adbc14816978743f846e74e | 9b39cf1e157554e6a14bfedf1ab82edc3fc3f12b | refs/heads/master | 2021-01-16T00:04:59.717605 | 2014-05-02T10:16:44 | 2014-05-05T06:13:45 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# BTTS - BlueTooth Test Suite
#
# Copyright (C) 2014 Jolla Ltd.
# Contact: Martin Kampas <martin.kampas@jollamobile.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2.
#
# This p... | UTF-8 | Python | false | false | 1,927 | py | 110 | voicecall.py | 32 | 0.607161 | 0.604567 | 0 | 60 | 31.116667 | 74 |
deepakskosanam/montys-codes | 19,327,352,863,732 | e9aa6c2b7620ea3ad3fe7ada49c8f18927265a2f | fbcc62632fed3dcbd00498cba2a4247b4455a111 | /tutorials/tutorial_5.py | d263e624516bf416d4b29621ab4a8c6564e87cde | [] | no_license | https://github.com/deepakskosanam/montys-codes | 38d0ed05c24c5c3f4fe9badf46e26cea1918682e | b22fa451c33e6b798f6482ab5702cb23479700b5 | refs/heads/master | 2020-05-01T07:04:48.035081 | 2019-04-07T08:23:13 | 2019-04-07T08:23:13 | 177,344,461 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # PYTHON TUTORIALS 5
""" DATA STRUCTURES """
# More on Lists: Methods
"""
list.append(x) # Equals a[len(a):] = [x]
list.extend(x) # Equals a[len(a):] = iterable
list.insert(i.x)
# a.insert(0,x) inserts at the front of List
# a.insert(len(a),x) inserts at end of list. Equals a.append(x)
list.remove(x) # Removes... | UTF-8 | Python | false | false | 1,733 | py | 3 | tutorial_5.py | 3 | 0.678015 | 0.675707 | 0 | 52 | 32.326923 | 83 |
ThonyPrice/MLcourse | 9,706,626,109,755 | 5730d550d4950e1b387ef65d339676532e2b1afe | d713b6aba783a9c9cfbcfa4dc07674e6fa5992c3 | /ML_2/main.py | a1b13f662f146ae394b6d87b2aa933e72228b0a2 | [] | no_license | https://github.com/ThonyPrice/MLcourse | bf264511af30d3d8421673cdb487f28a3b0ac136 | 6d258690e47326b6c3e8ebda45aead3ce4a3c4a4 | refs/heads/master | 2020-03-28T06:03:10.848496 | 2018-09-07T10:54:18 | 2018-09-07T10:54:18 | 147,811,267 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from cvxopt.solvers import qp
from cvxopt.base import matrix
import numpy, pylab, random, math
def main():
data = generateData()
pMatrix = pMatrixCreator(data)
q,h = qhVectorCreator(len(data))
gMatrix = gMatrixCreator(len(data))
#print(pMatrix[0][0])
r = qp(matrix(pMatrix), matrix(q), matrix(... | UTF-8 | Python | false | false | 3,180 | py | 6 | main.py | 2 | 0.568868 | 0.533019 | 0 | 133 | 22.909774 | 101 |
bvillasen/simulation_analysis | 18,202,071,406,064 | 3f578dc7639b4f895514961105fcaeee856dbd2b | d768f07ed90c0274e2d9d935eaf5ecfe734a1f56 | /lya_statistics/compute_los_tau.py | 01d2d2cc7a7d751edefaeb7583a78f7d5f5cfe09 | [] | no_license | https://github.com/bvillasen/simulation_analysis | cfd0b5de865d2fb5992d828b2824079e6798774b | 645f0c397172ed30a713368942eec9ca68a9761a | refs/heads/master | 2023-06-02T19:06:39.851760 | 2021-06-25T18:40:58 | 2021-06-25T18:40:58 | 298,894,454 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os, sys
import numpy as np
import h5py as h5
root_dir = os.path.dirname(os.getcwd()) + '/'
subDirectories = [x[0] for x in os.walk(root_dir)]
sys.path.extend(subDirectories)
from flux_power_spectrum import get_skewer_flux_power_spectrum
from load_skewers import load_skewers_multiple_axis
from spectra_functions i... | UTF-8 | Python | false | false | 4,237 | py | 178 | compute_los_tau.py | 159 | 0.668633 | 0.650224 | 0 | 140 | 29.242857 | 155 |
dpmanoj/Online-IPL-Ticket-Booking | 18,580,028,559,316 | a90fdb8d64073deb0d4f3f62cff83b24cf2d81ca | 6fef90be96ea4fe51076bb63d1b23d1b06192113 | /booking/migrations/0003_auto_20200430_1355.py | 752a0703f87c9a29d3a0f61c1acb4624e3a6d723 | [] | no_license | https://github.com/dpmanoj/Online-IPL-Ticket-Booking | 911df573fc957bce3384645fad8b4623784213d5 | c449a4155a69bc9850eb72244c7764a6a55b63d6 | refs/heads/main | 2022-12-29T17:55:14.102764 | 2020-10-21T01:56:05 | 2020-10-21T01:56:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.0.4 on 2020-04-30 08:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('booking', '0002_booking_tickets_match_date'),
]
operations = [
migrations.AlterField(
model_name='booking_tickets',
... | UTF-8 | Python | false | false | 414 | py | 43 | 0003_auto_20200430_1355.py | 33 | 0.599034 | 0.533816 | 0 | 18 | 22 | 57 |
ellmetha/django-precise-bbcode | 11,544,872,105,873 | 58c1d50482bd4ceff2380654a146d6c7476adab9 | 408f985c954ad6f0f3926e02dc18c31336bac194 | /precise_bbcode/core/utils.py | 8388589936970347e3e3e1dbc97d1e1a7f325542 | [
"BSD-3-Clause"
] | permissive | https://github.com/ellmetha/django-precise-bbcode | 176258d9436cc29002d59f29d4964a3bdd05721e | 24306622fc8ebd91c8c79543c18050de0b32f1f1 | refs/heads/main | 2023-08-28T13:35:07.027756 | 2023-07-27T01:07:15 | 2023-07-27T01:07:15 | 13,904,807 | 36 | 16 | BSD-3-Clause | false | 2023-08-19T18:44:47 | 2013-10-27T16:45:03 | 2023-04-23T16:43:21 | 2023-08-19T18:44:46 | 715 | 31 | 10 | 17 | Python | false | false | from functools import reduce
def replace(data, replacements):
"""
Performs several string substitutions on the initial ``data`` string using
a list of 2-tuples (old, new) defining substitutions and returns the resulting
string.
"""
return reduce(lambda a, kv: a.replace(*kv), replacements, data... | UTF-8 | Python | false | false | 322 | py | 63 | utils.py | 43 | 0.708075 | 0.704969 | 0 | 10 | 31.2 | 82 |
webmania-ma/webmania_projects | 6,725,918,815,559 | f070f5d3d61c0ae01d73cba1b8fa3a70e08b10ce | b2be278feb189924735880f5f539da1b2204510a | /avad_repos/avad_addons_v10/avad_ice_ip/models/company.py | df89dee39806e4f9a1a6628952dd461b768b4c79 | [] | no_license | https://github.com/webmania-ma/webmania_projects | b836c097506acada4600ce365aba41d8d24aac9c | 07dc8eb41c2900188e539282cc092491e760d201 | refs/heads/main | 2022-05-21T17:36:38.718358 | 2022-03-27T14:55:49 | 2022-03-27T14:55:49 | 277,064,743 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding: utf-8
from odoo import models, api, fields, _
from odoo.exceptions import Warning
import odoo.addons.decimal_precision as dp
class ResCompany(models.Model):
_inherit = 'res.company'
_description = 'Company'
ice = fields.Char(string='ICE', size=15,)
identifiant_tp = fields.Char(string=u'... | UTF-8 | Python | false | false | 347 | py | 72 | company.py | 33 | 0.708934 | 0.694524 | 0 | 14 | 23.785714 | 68 |
dantordj/SemanticClustering | 1,279,900,292,915 | b07800358c04b9c0f50f5dd616dd064e1e8e7df8 | f8d601f7e3988d49d27c58fe423f1a189e832857 | /create_csv.py | 6bff1380baf6f4311d66b6c75f94626d68c75012 | [] | no_license | https://github.com/dantordj/SemanticClustering | 53cb55370ed775ab6afcd5595a6aa352a798772e | fd9148057052ebd424f251a59f21689aafa966d6 | refs/heads/master | 2020-03-31T16:49:08.612478 | 2018-10-19T16:33:50 | 2018-10-19T16:33:50 | 152,393,288 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import os
import string
from nltk.corpus import stopwords
import re
punct = string.punctuation.replace('-', '')
def clean(text):
clean_text = text.replace('"', '\"')
clean_text = clean_text.replace("``", "")
clean_text = clean_text.replace("/.", "")
clean_text = clean_text.replace(... | UTF-8 | Python | false | false | 2,681 | py | 10 | create_csv.py | 9 | 0.538232 | 0.533756 | 0 | 87 | 29.770115 | 63 |
aserg24/course_work | 8,615,704,417,034 | a7fd23d839dc899007479e331b6e3c2c8f0dc059 | 101f6c22f052ef417c339a226bbf4c36c5b0ba4d | /spb_today.py | b8a23a9f9b0445399232e8fbee7bde8193a73b82 | [] | no_license | https://github.com/aserg24/course_work | 3a527e46e04698c716c423e22f533f971df01c2c | d65c14da986d038a929970b0769a6a4ed7d821e2 | refs/heads/master | 2021-01-20T16:00:31.300730 | 2017-05-10T01:54:15 | 2017-05-10T01:54:15 | 90,809,101 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime as dt
import vk
from tqdm import tqdm
from sqlalchemy import func, create_engine
from sqlalchemy import Column, Integer, Text, DateTime
from sqlalchemy.schema import Index
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import decl... | UTF-8 | Python | false | false | 2,559 | py | 3 | spb_today.py | 2 | 0.599062 | 0.591247 | 0 | 84 | 29.464286 | 78 |
AlexLan73/NW_052 | 11,458,972,750,799 | 0979d33727d2c348776ec0de8e4088ef2dcf1328 | dda92c918e183c376fee172c88d9eb2d8b1c386f | /NW_052/main.py | 7d19413edcbd2d13479ffbea7d29467d904be155 | [] | no_license | https://github.com/AlexLan73/NW_052 | dbcf8a49582bcd591488d197a763f39695865bdc | a38fe65083e882861b3ff333fa6661bce9c6bf07 | refs/heads/master | 2020-12-14T10:10:19.260278 | 2020-01-18T08:37:08 | 2020-01-18T08:37:08 | 234,705,414 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ParsingDan as pdan
import NWModel as nwm
def _form_dan(dan, category, param):
maxWordsCount, xLen, step, type_dan, type_dan0 = param[0], param[1], param[2], param[3], param[4]
par= pdan.ParsingDan(dan, category) # стандартный
xtrain, xtest= par.sprlit_train_test()
if type_da... | UTF-8 | Python | false | false | 2,607 | py | 14 | main.py | 3 | 0.670424 | 0.630298 | 0 | 48 | 45.208333 | 142 |
nakamotohideyoshi/job-pitch | 10,995,116,316,203 | 941f8ba7d1f298bda62ebfd7d0615833833c0a0f | 452901ad0d4129228468ffe1c1a933ccd9481d25 | /web/src/mjp/migrations/0011_auto_20150618_2043.py | 643829126bcea013261de3d3abf53545994fec88 | [] | no_license | https://github.com/nakamotohideyoshi/job-pitch | d409e49403346e4162f967a5d1bcf5edbb453063 | 5ed7ab4cf74b504d68190c678ca5d17fe4e92c19 | refs/heads/master | 2022-05-19T00:16:10.521704 | 2018-12-17T18:02:30 | 2018-12-17T18:02:30 | 224,891,428 | 0 | 0 | null | false | 2022-04-09T04:28:59 | 2019-11-29T16:45:31 | 2019-12-06T09:22:33 | 2022-04-09T04:28:58 | 187,127 | 0 | 0 | 20 | Java | false | false | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('mjp', '0010_message_created'),
]
operations = [
migrations.CreateModel(
name='Pitch',
fields=[
... | UTF-8 | Python | false | false | 965 | py | 582 | 0011_auto_20150618_2043.py | 501 | 0.546114 | 0.534715 | 0 | 31 | 30.129032 | 114 |
Vikrant3/finance_peer_demo_vikrant | 764,504,189,036 | 36b7d3d7527233122c72b17ce0dbb78380427edf | 58702cc964bf1f612a1b2a1b75802e1dd3facff0 | /scripts_to_save.py | 751daa953e0f7cfbe105258a3979849641d5fd25 | [] | no_license | https://github.com/Vikrant3/finance_peer_demo_vikrant | 689420a3d23cbd610692180cb566cb3b4805840d | 24b25d7324944d3c7a599f3f56e0644c54e59103 | refs/heads/main | 2023-07-12T17:58:13.531051 | 2021-08-21T13:39:20 | 2021-08-21T13:39:20 | 398,563,290 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from demo_app.models import FinancePeerUserData
from demo_app.fp_data import data
list_to_save = []
def save_finace_peer_data():
for d in data:
fpd = FinancePeerUserData(user_id=d['userId'], item_id=d['id'], title=d['title'], body=d['body'])
list_to_save.append(fpd)
FinancePeerUserData.objects... | UTF-8 | Python | false | false | 363 | py | 6 | scripts_to_save.py | 4 | 0.69146 | 0.683196 | 0 | 10 | 35.3 | 105 |
yangchun222001/algorithm_python | 8,031,588,887,184 | a66f50e06ecbaa0b6c788eb3e01d54e886b868c5 | 52beb782b5233620816c11da742837c4812679f4 | /construct_binary_tree_from_inorder_and_postorder_traversal.py | 77bdcf6058f290ff3b454fd7416263efa6c7eb8c | [] | no_license | https://github.com/yangchun222001/algorithm_python | bce51c2caf82da03a77e7fd85fce7c4e872b8303 | 8637653c937df9b7ce52d10b712c4d31858a8f5c | refs/heads/master | 2021-01-18T18:54:55.581204 | 2017-04-01T02:42:42 | 2017-04-01T02:42:42 | 86,876,577 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Given inorder and postorder traversal of a tree, construct the binary tree.
Notice
You may assume that duplicates do not exist in the tree.
Example
Given inorder [1,2,3] and postorder [1,3,2], return a tree:
2
/ \
1 3
'''
#Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self... | UTF-8 | Python | false | false | 1,276 | py | 45 | construct_binary_tree_from_inorder_and_postorder_traversal.py | 44 | 0.619906 | 0.610502 | 0 | 52 | 23.557692 | 76 |
cagostino/cloudyMCMC | 1,271,310,328,491 | 02efa31eed799fe6bc0b64c0f6a4fcb4047cb317 | 7513dc9de3b2b792b7a6ce86ecc2059114496ac1 | /mcmc_tests.py | 9e9368fcc0ab4d1878df7baf8fde525d96d690b4 | [] | no_license | https://github.com/cagostino/cloudyMCMC | 501798ba667dca3cbaa9f0110b268c0371b08d5f | 522fe922552d1dc247f3973632994c117331d321 | refs/heads/master | 2020-10-01T23:35:02.822718 | 2019-12-12T16:26:55 | 2019-12-12T16:26:55 | 227,647,723 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from MCMC import MCMC
from scipy.stats import sem
import pyCloudy as pc
from PCloudy import PCloudy
plt.rc('font',family='serif')
plt.rc('text',usetex=True)
def poly(x, pars):
return np.sum(np.array([ pars[i]*x**(len(pars)-1- i) for i in range(len(pars))]), axis=0)... | UTF-8 | Python | false | false | 7,813 | py | 4 | mcmc_tests.py | 3 | 0.580187 | 0.530782 | 0 | 230 | 32.973913 | 121 |
dagomankle/IGN-Project | 14,800,457,352,254 | b239b6904280035ecc9e60e47326a4696c41c6ed | 69711058c42bd9de890a62d7c7f9e644257f22a6 | /ViejoBaul/Partitioner.py | c92fd25d742efe738b26e5a0507b2c8d5be5605c | [] | no_license | https://github.com/dagomankle/IGN-Project | e0ca67d2b1db6d463c71dfa7ad492fc98104eae0 | 43de1f09a90b5b9481494c314f2c821a11ef1607 | refs/heads/master | 2020-03-12T17:47:47.222669 | 2019-06-22T12:16:41 | 2019-06-22T12:16:41 | 130,744,866 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from obspy.core import read
from obspy.core import UTCDateTime
from obspy.signal.trigger import plot_trigger# importaciones obligatiores menos read dependiendo
from obspy.clients.arclink import Client# para generar la coneccion con la base de datos
thr_on = 1.1
thr_off = 0.99
tiempoSismo = 360
tiempoAntes = tiempoSis... | UTF-8 | Python | false | false | 1,320 | py | 33 | Partitioner.py | 19 | 0.756061 | 0.698485 | 0 | 33 | 39.030303 | 150 |
skar2/Disease-Information-Website | 5,076,651,356,365 | 4a0928eb96a80492299917e120362e5ea22c2715 | d13f42768adf17da68938aee295793bf43748948 | /DIPROJECT/home/migrations/0013_info_img.py | da48654b3f88dc88b6a26bf37f1b3aa6cdac7aa9 | [] | no_license | https://github.com/skar2/Disease-Information-Website | da2ebaa7029256e3f2ff39bb016156e499c8416d | 42badbf05ddee3c12665d31589eae0650e2db020 | refs/heads/master | 2023-06-20T12:28:38.104712 | 2021-07-20T13:20:42 | 2021-07-20T13:20:42 | 328,928,013 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.4 on 2020-12-24 10:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0012_auto_20201223_1949'),
]
operations = [
migrations.AddField(
model_name='info',
name='img',
... | UTF-8 | Python | false | false | 388 | py | 28 | 0013_info_img.py | 17 | 0.569588 | 0.489691 | 0 | 18 | 20.555556 | 62 |
Blackbird-io/mechanics-prod | 11,235,634,493,401 | bbc46e946324d0ba306dfb75a9bd335aef54d962 | fbbd431467b46cf2ce8003e14a6c6190bea5ba82 | /data_structures/portal/__init__.py | 1de785a7e2aed52f3b820935cb7f94512b2867b9 | [] | no_license | https://github.com/Blackbird-io/mechanics-prod | 187412dae4314e33990b2c5e83c019aafd8a1594 | a5fa9b603c76928751e17cf9b6be3ea795107000 | refs/heads/master | 2023-03-03T17:49:55.032442 | 2017-09-22T19:54:59 | 2017-09-22T19:54:59 | 337,511,595 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # PROPRIETARY AND CONFIDENTIAL
# Property of Blackbird Logical Applications, LLC
# Copyright Blackbird Logical Applications, LLC 2016
# NOT TO BE CIRCULATED OR REPRODUCED WITHOUT PRIOR WRITTEN APPROVAL
# Blackbird Environment
# Module: DataStructures.Analysis.__init__
"""
Package that contains objects that Bla... | UTF-8 | Python | false | false | 736 | py | 127 | __init__.py | 123 | 0.47962 | 0.474185 | 0 | 30 | 22.533333 | 80 |
shalevy1/json2tree | 16,286,516,025,814 | dbb6971b3e0910b14d1506fc7d5f03012441d21d | 165c0958cbe9c127357082a7c0ea192b4ec4610a | /json2tree/html.py | 89fa994419adc74764f64946e1671f3fd774daf1 | [
"MIT"
] | permissive | https://github.com/shalevy1/json2tree | 58be5d47571ef317bce4d628fa77fb89ef7a7c39 | ff7fa54bc06de4b341a8a885dc30cb6a713359a1 | refs/heads/main | 2023-03-11T02:49:27.196591 | 2021-02-26T04:34:40 | 2021-02-26T04:34:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | head = """
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@300&family=Oswald&display=swap"
rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@1,300&display=swap"
re... | UTF-8 | Python | false | false | 5,736 | py | 5 | html.py | 2 | 0.526674 | 0.523187 | 0 | 139 | 40.273381 | 112 |
kpan2034/Computer-Vision-Object-Tracking | 5,308,579,599,699 | f9b6eb124c02dbe428dcb9bf1a7d4ea7693afd7b | bedf8b841d4f7049d0841e883f9074878bffc472 | /particle_filter.py | 82e5f59a717cc90a91fbedecca0813d6948e231a | [] | no_license | https://github.com/kpan2034/Computer-Vision-Object-Tracking | 9493ed6f60559556bcc2b9ae883fa120d5921746 | 4c1c37ce2baa33896f3b22dc0d403ad2967b001f | refs/heads/master | 2022-11-07T04:06:33.037183 | 2020-06-25T11:04:31 | 2020-06-25T11:04:31 | 273,983,774 | 0 | 0 | null | true | 2020-06-21T21:07:10 | 2020-06-21T21:07:09 | 2020-06-21T21:03:24 | 2020-06-21T21:03:22 | 51,008 | 0 | 0 | 0 | null | false | false | import cv2
import numpy as np
from numpy.random import randn
from numpy.random import uniform
import scipy.stats
from filterpy.monte_carlo import systematic_resample
from filterpy.monte_carlo import residual_resample
from filterpy.monte_carlo import stratified_resample
from filterpy.monte_carlo import multino... | UTF-8 | Python | false | false | 4,758 | py | 16 | particle_filter.py | 9 | 0.599622 | 0.573981 | 0 | 148 | 30.148649 | 105 |
EsmeraldaQuintana/MOSTregi | 6,932,077,263,117 | c39b791097ba6195a3ba84fb42c1d8c7bc9f3fe3 | eece1023344ee4a2f857892290080a96472367f2 | /MOSTregi/events/migrations/0081_auto_20180312_1011.py | c6a8d9a2dabb118ba7359694d76abb6205d2e356 | [] | no_license | https://github.com/EsmeraldaQuintana/MOSTregi | 6d883a9695625af92d963c9fd350c86eaf4a794d | e9d0a5f4da17465791d4021f562dd270838c4201 | refs/heads/master | 2022-12-10T05:56:07.289295 | 2018-04-13T12:21:16 | 2018-04-13T12:21:16 | 129,149,016 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.2 on 2018-03-12 14:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0080_auto_20180311_2212'),
]
operations = [
migrations.AlterField(
model_name='bookingrequest',
name='date... | UTF-8 | Python | false | false | 415 | py | 71 | 0081_auto_20180312_1011.py | 49 | 0.604819 | 0.53012 | 0 | 18 | 22.055556 | 66 |
Mistchenko/fastapi_template | 3,332,894,665,554 | 77981077de8ac16e69c771a44c64c6bcba6f5b87 | b4ef13e1bdedba0ae342d30a017b2555861225c9 | /src/ccxx/fastapi/main.py | fc61700257ae7af036070e557edfc3994b7873d5 | [] | no_license | https://github.com/Mistchenko/fastapi_template | f76126e4d2f20cc0d708ade953a50723ec27c0f6 | c458b03e13600c48b9a6c044bbf8db6bfdbf190f | refs/heads/main | 2023-01-03T04:55:16.903630 | 2020-10-20T09:11:53 | 2020-10-20T09:11:53 | 305,618,622 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
ccxx.fastapi.main — стартовый модуль сервиса.
"""
import logging
from fastapi import FastAPI
from logger.middleware import LoggerMiddleware
app = FastAPI()
app.add_middleware(LoggerMiddleware)
logger = logging.getLogger(__name__)
@app.get("/")
async def hello():
"""
Получить приветственное сообщение.
... | UTF-8 | Python | false | false | 509 | py | 8 | main.py | 5 | 0.698238 | 0.698238 | 0 | 21 | 20.619048 | 46 |
SaschaFroelich/Boltzmann-Machine | 2,534,030,740,898 | 6702b1fdbd5881a75c66ddec48fcc28626b0cea7 | 36793a44316de9ce8f4ea1d46de4081dd9ddd276 | /boltzmann_distribution.py | 5c76e9bcb88c9b7d01dc827cebd5d6ebc1a8d515 | [] | no_license | https://github.com/SaschaFroelich/Boltzmann-Machine | a69d3f5199c1bc0b47cf4971bd2b0bf7e418e280 | 19974ace70e692bac093d62fd8062d55ddc9b491 | refs/heads/master | 2021-07-12T09:24:47.072670 | 2021-04-12T08:50:39 | 2021-04-12T08:50:39 | 243,605,384 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 27 20:09:17 2020
@author: sascha
"""
# Distance from actual Boltzmann Distro
import numpy as np
import matplotlib.pyplot as plt
import random
from tqdm import tqdm
import operator as op
from functools import reduce
import BM
#%%
no_iterations ... | UTF-8 | Python | false | false | 1,139 | py | 10 | boltzmann_distribution.py | 7 | 0.721686 | 0.692713 | 0 | 46 | 23.782609 | 126 |
danieliong/SWMF_QU | 17,961,553,254,710 | addb77856d5f76d4d3c2918b8237e07018899f36 | be310d06b94715b881d9befd33e32014effc4d9a | /JuliaFiles/2021_02_26_RunExploration/Scripts/formatMetrics.py | fc7260bfcc3e30427ded3c1f5cd6a2736919edaf | [] | no_license | https://github.com/danieliong/SWMF_QU | 063c7d4050843680b60a722310666e168dae3f56 | 6468896c11c8b2cb9b4ee5900d8d4cd62bf9df4d | refs/heads/master | 2023-05-19T03:26:54.933003 | 2022-11-22T03:34:53 | 2022-11-22T03:34:53 | 342,301,340 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import pandas as pd
import numpy as np
relvar = pd.read_csv("output/relvar_96runs.csv")
relvar["model"] = np.concatenate([["AWSoM"]*8, ["AWSoMR"]*8])
relvar.set_index(["model","mapCR"], inplace=True)
relvar_tbl = relvar.to_latex()
with open("output/relvar_tbl.tex", "w") as f:
f.write(relvar... | UTF-8 | Python | false | false | 574 | py | 37 | formatMetrics.py | 3 | 0.662021 | 0.648084 | 0 | 20 | 27.7 | 61 |
payor-ma/spvs-calc | 1,992,864,841,423 | acfaa129fb7615d0d442fba2ac36bc30679d6c61 | b0c2d91de6065075be5e5fe3761b6014598311f2 | /_sanitsation.py | 7fbc6abb8a10176499e6858d3b7c554fa7b9169e | [
"MIT"
] | permissive | https://github.com/payor-ma/spvs-calc | efc85fadab21cc91da97352c64922bcf20a3e5e2 | bee0ea14f45e0dad1e893b3ceced1ba734784956 | refs/heads/main | 2023-04-17T20:34:58.159452 | 2021-05-06T13:58:49 | 2021-05-06T13:58:49 | 364,893,548 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import sys
from _constants import *
def checkSexDigit(sexStrDigit):
try:
if sexStrDigit == "" or sexStrDigit == " ":
sexStrDigit = "0"
sexDigit = int(sexStrDigit)
if sexDigit > 59:
raise ValueError("Digit above 59.")
if sexDigit < 0:
... | UTF-8 | Python | false | false | 470 | py | 7 | _sanitsation.py | 6 | 0.597872 | 0.582979 | 0 | 18 | 25.166667 | 55 |
all-of-us/raw-data-repository | 15,204,184,263,476 | f0e2c8c81114666d49dd469fa010644c57018eba | af43615e07f2bfaa908d6d96b4c90f98ce3ad47b | /rdr_service/resource/schemas/genomics.py | 346a01b2f8a63c6adf058d1fd1fb4f72ca60d6d8 | [
"BSD-3-Clause"
] | permissive | https://github.com/all-of-us/raw-data-repository | 11aa25385543f5f8ef706663b79ce181775c1c9a | 461ae46aeda21d54de8a91aa5ef677676d5db541 | refs/heads/devel | 2023-09-01T06:47:25.710651 | 2023-09-01T01:18:56 | 2023-09-01T01:18:56 | 66,000,771 | 46 | 22 | BSD-3-Clause | false | 2023-09-14T21:06:38 | 2016-08-18T13:47:08 | 2023-04-02T23:54:37 | 2023-09-14T21:06:36 | 28,609 | 39 | 16 | 2 | Python | false | false | #
# This file is subject to the terms and conditions defined in the
# file 'LICENSE', which is part of this source code package.
#
from marshmallow import validate
from rdr_service.resource import Schema, fields
from rdr_service.resource.constants import SchemaID
from rdr_service.genomic_enums import GenomicSetStatus... | UTF-8 | Python | false | false | 20,904 | py | 1,666 | genomics.py | 1,436 | 0.706994 | 0.67853 | 0 | 460 | 44.445652 | 115 |
celiomarcio/semanticethon | 15,290,083,585,165 | ddfbe7a1c39f85bba98b0e61f1a0913a292b8acb | 2f320584dc524bea1c0c7378f84c2f83cc044f43 | /app/mimetype.py | a6ae4a8c2e1144c926136eba961d68c22b154524 | [
"Apache-2.0"
] | permissive | https://github.com/celiomarcio/semanticethon | a9847b24c67ae3deaca82724bee4e4d988c21d40 | 2bade7ff7288ed8ccf838662bdeb0342e32c8150 | refs/heads/main | 2023-07-06T19:55:56.543139 | 2021-08-11T14:23:33 | 2021-08-11T14:23:33 | 394,400,818 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | JSON = 'application/json'
mimetype_map = {
'xml': 'application/rdf+xml',
'json-ld': JSON,
'n3': 'text/n3',
'turtle': 'application/x-turtle',
# None: 'text/xml'
}
def correct_format(output_format):
if output_format is None:
corrected_output_format = 'xml'
else:
corrected_outp... | UTF-8 | Python | false | false | 381 | py | 13 | mimetype.py | 6 | 0.627297 | 0.622047 | 0 | 17 | 21.470588 | 47 |
ysk0951/PythonTestcrawling | 5,686,536,713,019 | d73f6c757808e779269cce46e458441ef69efd77 | 614881f4dede6fb350ab58c299ce0b94fa51f319 | /python0909/Test03.py | 81fcb6f2f5c0435cb901ff898280ca4fb281a114 | [] | no_license | https://github.com/ysk0951/PythonTestcrawling | 3398008eec78919c3bd1b1075c5cae97790c96d5 | ae651d0447a522b672e22e090e5fafae1cde4c48 | refs/heads/master | 2022-12-29T14:47:01.831632 | 2020-10-03T09:13:53 | 2020-10-03T09:13:53 | 293,973,512 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
#입력함수 : input()
콘솔을 통해 사용자로 부터 입력을 받는 함수
모두 문자열로 받아옴
#형변환
문자 >> 정수/실수
int(값)/float(값)
정수,실수 >> 문자
str(값)
'''
#age = input("나이을 입력하세요.")
#age = int(age)
#print(age+10)
#문자열 str
#"문자열" '문자열' """여러문자열""" '''여러문자열'''
print("""hello
python
hahahah""")
#문자열 연산
a = "pyton"
b = "더하기"
c =... | UTF-8 | Python | false | false | 944 | py | 60 | Test03.py | 58 | 0.560109 | 0.519126 | 0 | 51 | 13.352941 | 45 |
ZaycheS/cpplitedocs | 8,392,366,120,387 | d9a1198ab1f9e6ae89b5e2ef7b16c1b2b0023c26 | e0215c0434151e4f7ab72f045a283f8b84badf83 | /method_pars.py | 272e513fb4a04a7f2a289cc4ff4886e44090fda3 | [] | no_license | https://github.com/ZaycheS/cpplitedocs | b0da406d681c810f411607695d01e070c1b55362 | 798f843aac2c3e90d9d4fcf37638045e565eaefd | refs/heads/master | 2020-08-03T21:06:37.105188 | 2019-11-25T20:55:40 | 2019-11-25T20:55:40 | 211,885,912 | 0 | 0 | null | false | 2019-11-30T16:22:52 | 2019-09-30T14:58:37 | 2019-11-25T20:56:02 | 2019-11-30T16:21:46 | 22 | 0 | 0 | 1 | Python | false | false | from util import *
from typename import TypeName
def method_str_handler(string, method_desc):
init_str = string.strip().split()
for i in range(len(init_str)):
if init_str[i] in keywords_list:
method_desc.add_keyword(init_str[i])
else:
break
else:
return
... | UTF-8 | Python | false | false | 2,031 | py | 14 | method_pars.py | 14 | 0.536681 | 0.529296 | 0 | 66 | 29.772727 | 69 |
justperson94/Programming_exercise | 11,656,541,274,357 | 1cdbd8611d5d5a383ebd4ccdf5abae3fe32b8a0a | 1386891e2ba711acaa3a75464110840520397511 | /separate_two_file_types.py | e024a788266e03331b22902be2a0267dc6cb4120 | [] | no_license | https://github.com/justperson94/Programming_exercise | 87f9fe581e6b9220808bc7c2bc7361339c02e8ad | f31a6f3858488a2e8aa2f665de18b70819f6e35b | refs/heads/master | 2023-06-29T13:36:38.935414 | 2019-11-15T12:28:03 | 2019-11-15T12:28:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
from shutil import copy
dataset_path = './images/'
output_root = './images_output/'
img_output_path = './images_output/images/'
label_output_path = './images_output/annotations/'
make_list = []
file_list = []
if not os.path.exists(img_output_path):
os.makedirs(img_output_path)
if not os.path.exists(la... | UTF-8 | Python | false | false | 1,061 | py | 22 | separate_two_file_types.py | 19 | 0.584354 | 0.578699 | 0 | 36 | 28.472222 | 78 |
nixonbali/whid | 15,195,594,333,058 | e4fc055c5cd64c55d6dc93a45dab5ee0729f7c94 | 94612c5215723240e689398aa3518afb532e8ca3 | /whid | 89af8d6232f19fa089e6bfe429d6ba063e43ce75 | [] | no_license | https://github.com/nixonbali/whid | 03640ff282d335fb4546bbe32435f921495ad72a | 25fd01003ecbadcff50d5ce8603891b59e14c6b6 | refs/heads/master | 2022-12-22T21:34:46.251143 | 2020-10-08T16:14:46 | 2020-10-08T16:14:46 | 256,850,226 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/local/bin/python3
import sys
from db.models import Things, Events, Notes
from datetime import datetime, timedelta
"""
v0 run w/: $ python3 -m cli.main [args]
"""
"""
args:
event [thing_name] [starttime] [endtime=None] [place=None] [duration=None]
-> triggers newEvent
-> asks for Note
-> if yes
- -> opens note... | UTF-8 | Python | false | false | 2,752 | 7 | whid | 4 | 0.66061 | 0.655523 | 0 | 96 | 27.666667 | 163 | |
dkalashnik/stacklight-pytest | 8,048,768,728,448 | 49e8fcff1920dadb61557ef54c71a16de7fc60a2 | 4a1efb78203489dcdaecc5ba3fffe8887828bc17 | /stacklight_tests/tests/test_functional.py | 09424fbaab8b6a09ac038b28041373384d225437 | [] | no_license | https://github.com/dkalashnik/stacklight-pytest | bb2bef9f45961985a96657ddccf815086d5b437d | b76fcc55927ec9a5c03bfe8c643ddbb8b1e6c90d | refs/heads/master | 2021-01-13T12:37:06.297963 | 2018-03-28T22:01:11 | 2018-03-29T04:03:45 | 72,528,472 | 1 | 7 | null | false | 2018-04-03T13:06:27 | 2016-11-01T11:03:20 | 2018-03-29T04:03:48 | 2018-03-29T04:03:46 | 364 | 1 | 8 | 9 | Python | false | null | import logging
import time
import pytest
import yaml
from stacklight_tests.clients import influxdb_grafana_api_legacy_v2
from stacklight_tests.tests import base_test
from stacklight_tests import utils
logger = logging.getLogger(__name__)
def wait_for_resource_status(resource_client, resource,
... | UTF-8 | Python | false | false | 27,401 | py | 48 | test_functional.py | 43 | 0.589905 | 0.583701 | 0 | 650 | 41.155385 | 83 |
anasmoin18/music | 5,875,515,307,731 | 8601ac90091ebb8c6299db3d0c781f58a65d6aad | 93b2c916b13aba99efebd73fc067d54363659dd5 | /gaana/migrations/0001_initial.py | 0e8ad8ca8bcdac2d9f648de12f49b268f7b91239 | [] | no_license | https://github.com/anasmoin18/music | 2750ac0d0bfb0202cc342504005c6fc8ce031234 | 9766091839c9d5b0558282ea0099a2fd85b2f212 | refs/heads/master | 2021-05-04T10:55:42.496739 | 2016-02-28T08:24:13 | 2016-02-28T08:24:13 | 51,897,686 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-16 08:41
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | UTF-8 | Python | false | false | 1,995 | py | 9 | 0001_initial.py | 7 | 0.551378 | 0.532832 | 0 | 52 | 37.365385 | 114 |
ayankelevich/boto3Samples | 12,996,571,060,732 | a76fe3b211d6bd4f40caf0cab9590301efa7a605 | de7e81a332a04969ce3f324cae9a5d54abebd81c | /connection/exceptions.py | 313c0c316983ca8e8d4b9290c0af2a6216eb5fe1 | [] | no_license | https://github.com/ayankelevich/boto3Samples | 35e96de981be27449fcce3219d42e65341cf8667 | 5cd7972e4e470af41152d21c69c27498cb1498ad | refs/heads/master | 2020-12-04T17:25:45.263714 | 2020-03-21T20:54:52 | 2020-03-21T20:54:52 | 231,851,659 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import botocore # not needed if you references exceptions as boto3.exception.botocore.exception
# import boto3333 # test to get exception name
try:
import boto3
except ModuleNotFoundError as e: # Python exception, not boto3
print("how do I know the name of the exception? (see comment bel... | UTF-8 | Python | false | false | 1,305 | py | 10 | exceptions.py | 10 | 0.711877 | 0.700383 | 0 | 39 | 32.461538 | 116 |
TimothyBarus/python-backend-template | 2,911,987,865,576 | 04cbdea1c68d93402687e36828e49b794272539c | 2c80642754e96fd76b34eed736e4adab1b606772 | /alvinchow_backend_protobuf/alvinchow_backend_pb2_grpc.py | 4df51f327822a8a6c8f8c2ee89592bf1452a9431 | [
"MIT"
] | permissive | https://github.com/TimothyBarus/python-backend-template | 50966a9e95f43e40e0947f31019eac9bd4b3e96a | 46c07d733d68bc8682afd8510a17bc2aa360c606 | refs/heads/master | 2023-05-10T07:00:53.360920 | 2021-02-01T20:59:02 | 2021-02-01T20:59:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from alvinchow_backend_protobuf import common_pb2 as alvinchow__backend__protobuf_dot_common__pb2
from alvinchow_backend_protobuf import foo_pb2 as alvinchow__ba... | UTF-8 | Python | false | false | 4,449 | py | 129 | alvinchow_backend_pb2_grpc.py | 97 | 0.656102 | 0.652057 | 0 | 101 | 43.049505 | 118 |
KaiHe-better/CQARE | 10,376,640,998,205 | 8eac7bc68e113a08796e5a2ebcfa46619738b851 | e1136a9c73c2b987c1814ea6445214817de27ebf | /FSL/fewshot_re_kit/sentence_encoder/cnn_encoder.py | a77697f7b139031fdaeb593d15945311706351b8 | [] | no_license | https://github.com/KaiHe-better/CQARE | acf1e7fa3e0199fbee44701189ad1208fcc591cd | 380807a6d34f0140d10d0f17c8b8f0a8dfb7cbc3 | refs/heads/main | 2023-08-19T13:33:59.902558 | 2022-11-16T03:22:36 | 2022-11-16T03:22:36 | 411,121,781 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import torch.nn as nn
import numpy as np
from .. import network
class CNNSentenceEncoder(nn.Module):
def __init__(self, word_vec_mat, word2id, max_length, word_embedding_dim=50,
pos_embedding_dim=5, hidden_size=230):
nn.Module.__init__(self)
self.hidden_size = hidden_... | UTF-8 | Python | false | false | 2,598 | py | 34 | cnn_encoder.py | 30 | 0.572748 | 0.557352 | 0 | 74 | 34.108108 | 91 |
KartinJulia/walkipon_backend | 7,387,343,788,694 | 23a2ab2a01ba3de946d1b976acb89b2f45ff806d | df3eef46f80603dabdc3c22f98a68eaa426bf9d7 | /test/test_personal_user_query_coupon_message_by_location.py | e402d7553d388706c40dc6723cf6ff4eab77eea2 | [] | no_license | https://github.com/KartinJulia/walkipon_backend | 02937a6890f805542f49e959854ef4e2765828be | 4d92a752dad21a68b95ea2217a24999510dd9441 | refs/heads/master | 2020-12-27T20:57:39.980856 | 2020-02-03T22:13:25 | 2020-02-03T22:13:25 | 238,051,487 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import requests
from requests import Request
import ast
import logging
try:
import http.client as http_client
except ImportError:
import httplib as http_client
http_client.HTTPConnection.debuglevel = 1
# You must initialize logging, otherwise you'll not see debug output.
logging.basicConfig()
logg... | UTF-8 | Python | false | false | 1,723 | py | 70 | test_personal_user_query_coupon_message_by_location.py | 66 | 0.78816 | 0.713871 | 0 | 44 | 38.181818 | 768 |
bingli8802/leetcode | 12,747,462,975,378 | 17c6035fff17469ebd9c3828d295be7c932a2758 | 4e02d5b0b1b0739553fd40bbbdfb0d02c9830350 | /0077_Combinations.py | 0d371da85136f82a064d5d1912c2e037bd2337aa | [] | no_license | https://github.com/bingli8802/leetcode | b039ab6af62f0c8992463393f561caafd21056e6 | a509b383a42f54313970168d9faa11f088f18708 | refs/heads/master | 2023-03-29T03:11:45.801090 | 2021-03-23T22:55:16 | 2021-03-23T22:55:16 | 279,321,659 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
# 典型的回溯算法 东哥模版
def combine(self, n, k):
"""
:type n: int
:type k: int
:rtype: List[List[int]]
"""
res = []
if not k or not n:
return
def backTrack(m, tmp):
if len(tmp) == k:
res.append... | UTF-8 | Python | false | false | 493 | py | 319 | 0077_Combinations.py | 319 | 0.403397 | 0.397028 | 0 | 19 | 23.789474 | 39 |
walter-bd/scikit-decide | 12,841,952,263,939 | 1d40efe65b249e67bd8b86ba9ad6a305ab6a315e | 2d14aa082e33f3c9d2344ea6811a5b18ec906607 | /examples/discrete_optimization/rcpsp_multiskill_parser_example.py | 74a36b3e789e0601be6e79fdb2616ffdff450a61 | [
"MIT"
] | permissive | https://github.com/walter-bd/scikit-decide | 4c0b54b7b2abdf396121cd256d1f931f0539d1bf | d4c5ae70cbe8b4c943eafa8439348291ed07dec1 | refs/heads/master | 2023-07-30T14:14:28.886267 | 2021-08-30T14:16:30 | 2021-09-03T06:46:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Copyright (c) AIRBUS and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Utilities functions to parse Multiskill-RCPSP data files used in other examples scripts.
from __future__ import annotations
import os
path_to_data =... | UTF-8 | Python | false | false | 808 | py | 280 | rcpsp_multiskill_parser_example.py | 242 | 0.688119 | 0.675743 | 0 | 23 | 33.956522 | 98 |
BonneelP/pyleecan | 6,219,112,695,546 | f6c6f51e044bb766962fd2e8d09ff3c6ee4f4a1f | 645a531f5470c4b5dcde2167361621da4a10737f | /Tests/Methods/Slot/test_VentilationCirc.py | df74b2d5e6fc9e8313a8e52b00471f145d173c7b | [
"Apache-2.0"
] | permissive | https://github.com/BonneelP/pyleecan | f231940c35ac07861f031ec5386e39b60065a6c6 | 29e6b4358420754993af1a43048aa12d1538774e | refs/heads/master | 2023-01-05T07:55:58.152343 | 2020-11-06T12:21:33 | 2020-11-06T12:21:33 | 255,649,502 | 2 | 0 | NOASSERTION | true | 2020-04-14T15:35:02 | 2020-04-14T15:35:02 | 2020-04-14T14:24:40 | 2020-04-14T14:24:31 | 11,372 | 0 | 0 | 0 | null | false | false | # -*- coding: utf-8 -*-
from os.path import join
import pytest
from pyleecan.Classes.VentilationCirc import VentilationCirc
from pyleecan.Methods.Slot.VentilationCirc.build_geometry import (
CircleBuildGeometryError,
)
"""unittest for VentilationCirc"""
@pytest.mark.METHODS
class Test_VentilationCirc(object):... | UTF-8 | Python | false | false | 1,149 | py | 236 | test_VentilationCirc.py | 187 | 0.678851 | 0.664056 | 0 | 37 | 30.054054 | 76 |
ramiab/dev | 19,069,654,800,070 | ea333be9f043ecb4ebbcd884e6111ed65f759646 | 6c8eed277d9cdeb83a88bb993bbf3315f8af55f9 | /py/djcode/mysite/pocs_linked_list/linked_list.py | 8d6094b6b73fc8ffaad53196ad69af92c0950894 | [] | no_license | https://github.com/ramiab/dev | 7a7ad00b2ebf7572d2e4fbc4090362bb29b8b825 | 8b53039017c3338ecf12c1b5241df811054e0db2 | refs/heads/master | 2020-12-24T13:17:48.263752 | 2014-02-12T21:24:09 | 2014-02-12T21:24:09 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from apt_pkg import init
__author__ = 'rami'
class Node(object):
def __init__( self, data, next ):
self.data = data
self.next = next
def add_before(self, value):
new_node = Node(value, self)
return new_node
def __repr__(self):
return '%s--%s' % self.data, self.ne... | UTF-8 | Python | false | false | 997 | py | 13 | linked_list.py | 12 | 0.538616 | 0.538616 | 0 | 46 | 20.586957 | 60 |
CloudBoltSoftware/cloudbolt-forge | 8,160,437,909,158 | f04156e3be3be346ed560b9466c9a02e4e91b2cc | b6d8049568e8068422bc4ac2b957972dc1ee0ab7 | /blueprints/openstack/create_instance_from_volume.py | cd90cd63d4572ed383442f57c81cbc9f09f722b5 | [
"Apache-2.0"
] | permissive | https://github.com/CloudBoltSoftware/cloudbolt-forge | a6dffd52bd074ad48a61527502fcddf8113508ff | a5584a84841be49bea69df506a91d18cb3f215d8 | refs/heads/master | 2023-08-11T08:08:07.730807 | 2023-08-10T11:40:07 | 2023-08-10T11:40:07 | 39,207,603 | 37 | 44 | Apache-2.0 | false | 2023-09-14T20:06:44 | 2015-07-16T16:18:02 | 2023-09-11T19:08:50 | 2023-09-14T20:06:43 | 12,102 | 36 | 32 | 16 | Python | false | false | import openstack
from openstack import connection
from infrastructure.models import CustomField, Environment
from utilities.models import ConnectionInfo
from resourcehandlers.openstack.models import OpenStackHandler
from infrastructure.models import CustomField
from common.methods import set_progress
CONN = Connectio... | UTF-8 | Python | false | false | 4,805 | py | 656 | create_instance_from_volume.py | 475 | 0.64204 | 0.640791 | 0 | 150 | 31.033333 | 104 |
JMine97/ProblemSolvingByPy | 3,891,240,391,538 | 4029858f0b3e173b049c9d2ca4f2b158991a5fca | 8757819881b8f0a8d3f1198f86e1dbbf797d5bb9 | /week9/gyuri/10868번_최솟값.py | 6aedcf3f762a1ddc1ae88f11bc216e6907e8f14d | [] | no_license | https://github.com/JMine97/ProblemSolvingByPy | 122799a68910e38d57397f119816b235cc1c498b | 8a35dc11e523af9cc75cfd67f0136cf03e06f7cf | refs/heads/main | 2023-06-19T04:24:21.127921 | 2021-07-16T12:09:46 | 2021-07-16T12:09:46 | 387,479,666 | 1 | 0 | null | true | 2021-07-19T13:47:03 | 2021-07-19T13:47:02 | 2021-07-16T12:09:48 | 2021-07-16T12:09:46 | 378 | 0 | 0 | 0 | null | false | false | #10868번_최솟값.py
'''
N개의 정수,
(a, b)쌍이 M개
(1, 3) -> 1번, 2번, 3번 정수 중에서 최솟값
'''
import sys
from math import *
input = sys.stdin.readline
INF = int(1e9)
# 최소값이 최상단 루트 노드에 있는 tree 생성
def init(node, s, e):
if s == e:
tree[node] = num_list[s]
return tree[node]
mid = (s+e) // 2
tree[node] = min(init(... | UTF-8 | Python | false | false | 1,273 | py | 248 | 10868번_최솟값.py | 247 | 0.538462 | 0.502262 | 0 | 51 | 20.666667 | 90 |
edoardottt/py-problems-solutions | 17,755,394,826,652 | 0fd6be67a10375469c5ee7f440a407a159765156 | a3798727d0af116d32ecbc80cc56e46a759d065a | /BackTracking/k_subset_generator.py | c435fb5ba62eb5752bf82c6dd706bd589b2f0efe | [] | no_license | https://github.com/edoardottt/py-problems-solutions | 39ae7e9ccb223fcc938c32e6fcad3e479f669df1 | 5f92341035b5a8dcd18508df30c732180b5c2f72 | refs/heads/master | 2023-03-03T09:53:53.931559 | 2023-02-27T07:17:10 | 2023-02-27T07:17:10 | 192,494,101 | 28 | 8 | null | false | 2019-07-15T19:00:55 | 2019-06-18T08:02:13 | 2019-07-15T09:35:39 | 2019-07-15T19:00:55 | 27 | 4 | 0 | 0 | Python | false | false | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 18 10:08:31 2019
@author: edoardottt
"""
# k-SUBSET GENERATOR
S = [0, 1, 2, 3, 4]
def ksott(n, i, k, x):
if i == n:
print(S)
if x >= k - n + i + 1:
S[i] = 0
ksott(n, i + 1, k, x)
if x < k:
S[i] = 1
... | UTF-8 | Python | false | false | 370 | py | 28 | k_subset_generator.py | 27 | 0.389189 | 0.313514 | 0 | 23 | 14.086957 | 35 |
phaustin/pythonlibs | 5,995,774,367,941 | 92436d911e69252f9a4163dc6acb7061e497a7ed | 1d61057dab56fddd1edba78ce10b3a5f96c18c60 | /diskinventory/readlist.py | 088ea5f5b45d707354966226b2d2cc3d44897b70 | [] | no_license | https://github.com/phaustin/pythonlibs | f4f1f450d3e9bb8ebac5ffdb834d3750d80ee38e | 35ed2675a734c9c63da15faf5386dc46c52c87c6 | refs/heads/master | 2022-04-29T00:45:34.428514 | 2022-03-06T17:16:30 | 2022-03-06T17:16:30 | 96,244,588 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
#on osx
#/usr/local/Cellar/coreutils/8.22/libexec/gnubin/ls
require an ls_list ext file generated by, for example
ls -R -l -Q --time-style=full-iso --time=status /home/phil/* > listing.txt (file size in bytes)
example
python readls.py ls_list.txt --db_file ls_list.db (default)
"""
import re,os
import dateu... | UTF-8 | Python | false | false | 3,923 | py | 144 | readlist.py | 101 | 0.52154 | 0.50548 | 0 | 100 | 35.87 | 124 |
erchauhannitin/prod-reports | 18,743,237,312,332 | 6c96e894d8d868a81f6c3abe03814b943029cd64 | 831dad75f7048f3db1171ed5f52b11589e4db09f | /readobject.py | 60606f01e655943b80644eb3dd0e2fc9c0b80ee1 | [] | no_license | https://github.com/erchauhannitin/prod-reports | dc82239b246365d3d70bf203ddeb7d8628b327a2 | 1dae8d57253f7a1573b50a9875f8b1afc38dfdb4 | refs/heads/master | 2022-10-14T13:02:26.536313 | 2020-06-13T17:44:04 | 2020-06-13T17:44:04 | 272,039,188 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Entry(object):
def __init__(self, NAME, ID, ROLES, STATUS):
super(Entry, self).__init__()
self.NAME = NAME
self.ID = ID
self.ROLES = ROLES
self.STATUS = STATUS
self.entries = []
def __str__(self):
return self.ID + " " + self.ROLES + " " + self.STATU... | UTF-8 | Python | false | false | 788 | py | 4 | readobject.py | 2 | 0.588832 | 0.585025 | 0 | 31 | 24.419355 | 61 |
gokudomatic/cobiv | 16,509,854,294,594 | 87a7c3973d02fec6e520761411f2618e79fea2cc | 854f9c1101772b30baa3999fa5461b62e75f1754 | /cobiv/modules/hud_components/progresshud/__init__.py | a5cf8025fc6cfda5d28c4a0fb8476a7418c4530b | [
"MIT"
] | permissive | https://github.com/gokudomatic/cobiv | fd27aa46be8389909827eee5fcb838142c3511d6 | c095eda704fab319fccc04d43d8099f1e8327734 | refs/heads/master | 2020-04-05T10:14:35.361695 | 2018-04-11T16:46:04 | 2018-04-11T16:46:04 | 81,542,555 | 4 | 1 | null | false | 2017-10-01T20:18:38 | 2017-02-10T08:10:10 | 2017-02-10T10:55:33 | 2017-10-01T20:18:38 | 11,529 | 0 | 0 | 3 | Python | null | null | __all__ = ["ProgressHud"]
| UTF-8 | Python | false | false | 26 | py | 91 | __init__.py | 79 | 0.538462 | 0.538462 | 0 | 1 | 25 | 25 |
wych/blog-deploy | 249,108,110,538 | 5189d1ed1e09e34123b4132bbe0d29cec706efd3 | 2d5a762ca32162e399e9dd0845e1d4c993e1cc7b | /main.py | 54257a19879d16528aa6b163b06f2acfd1e0799d | [
"MIT"
] | permissive | https://github.com/wych/blog-deploy | e83f7c26b0679f17cf5b9c987af6a52981be0570 | 17d2e16040437fea881162f1f31d035401fdf626 | refs/heads/master | 2021-07-10T20:32:39.520645 | 2020-02-12T17:01:01 | 2020-02-12T17:01:01 | 240,032,195 | 0 | 0 | MIT | false | 2021-03-20T02:51:58 | 2020-02-12T14:24:45 | 2020-02-12T17:01:33 | 2021-03-20T02:51:58 | 6 | 0 | 0 | 1 | Python | false | false | from flask import Flask, request
import hashlib
import hmac
import secrets
import os
import threading
from utils import *
app = Flask(__name__)
config_path = os.environ['DEPLOY_CONFIG'] if os.environ.get('DEPLOY_CONFIG') else 'config.toml'
conf = Config.parse(config_path)
repo = Repo(conf)
builder = Builder(conf)
bui... | UTF-8 | Python | false | false | 1,077 | py | 5 | main.py | 2 | 0.675952 | 0.660167 | 0 | 40 | 25.95 | 123 |
kalselini/python_assignment_offwell.py | 11,123,965,337,229 | 1e044bdb9c01a97bbe783ef6dcc5c2027d0c2e0e | 44276081fbfd3778495d587d60e45a7911bd1ca5 | /crimes_listed.py | d5bf722597768b9108d6243ccf64c9e9042cb296 | [] | no_license | https://github.com/kalselini/python_assignment_offwell.py | b35147acdf0162b447d98e9a95b74e5de8bb84db | 784d187cba32e790255343251760d5b8a281b115 | refs/heads/master | 2020-04-28T11:35:30.410799 | 2019-03-19T14:21:18 | 2019-03-19T14:21:18 | 175,247,491 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import file_finder
import geodist
import csv
def crimes_listed( latlngB, chosen_date ):
path = file_finder.find(chosen_date)
file = open(path,'rt')
with file as f:
csv_obj = csv.reader(f)
for line in csv_obj:
try:
lngA = line[4]
latA =... | UTF-8 | Python | false | false | 766 | py | 5 | crimes_listed.py | 3 | 0.468668 | 0.425587 | 0 | 33 | 21.757576 | 67 |
lasofivec/slmp | 8,684,423,879,964 | db0ab96ac006ab1f6a37294e9c682958a06b088e | 7688465c3d00dd74c0410871c559f8e2d8e141c4 | /slmp/charac_feet.py | fbfbbab438df60115ce66cae51b647f46571322b | [
"MIT"
] | permissive | https://github.com/lasofivec/slmp | fbeabe5dbd1448c67c9006407abd616c2d9954a3 | bda10f550aa61e7194bc200b66ed08dd3074e91f | refs/heads/master | 2021-06-28T02:08:42.961569 | 2020-12-22T17:02:35 | 2020-12-22T17:02:35 | 201,268,648 | 2 | 0 | null | false | 2020-12-22T17:02:11 | 2019-08-08T13:51:03 | 2020-12-22T15:44:41 | 2020-12-22T17:02:10 | 716 | 2 | 0 | 0 | Python | false | false | """
Module to compute characteristics' origin both in physical
and logical domain.
"""
from globals_variables import *
from geometry import geo
from geometry import npatchs
from geometry import jac
from geometry import X_mat, Y_mat
import connectivity as conn
def get_pat_char(eta1, eta2, advec, dt):
"""
Comp... | UTF-8 | Python | false | false | 19,916 | py | 34 | charac_feet.py | 24 | 0.534746 | 0.506327 | 0 | 529 | 36.648393 | 81 |
dzp2095/grabClass | 601,295,462,239 | 20ee9f2edf11bc47510c7429b7206c8b5d1da0c2 | 46c330e8697c308cb6b38d096ba38bc2960127b9 | /urlThread/LoginThread.py | cfbc96c92c006d0f8ba1c769432392a4bd107426 | [] | no_license | https://github.com/dzp2095/grabClass | 5a082259de56a3c61d1377a73aa836e44bd4e8c4 | a67da4c441f2f40571b720f44c520ad650799aec | refs/heads/master | 2021-05-12T17:34:37.195557 | 2018-07-05T03:47:59 | 2018-07-05T03:47:59 | 117,049,233 | 13 | 6 | null | false | 2018-01-12T06:20:49 | 2018-01-11T04:17:42 | 2018-01-12T06:01:10 | 2018-01-12T06:20:49 | 55 | 3 | 1 | 0 | Python | false | null | # -*- coding:utf-8 -*-
import urllib
from pyquery import PyQuery
from PyQt5 import QtCore
#登录工作线程
class LoginThread(QtCore.QThread):
#工作完成后将用户信息发回界面线程中
finishSignal = QtCore.pyqtSignal(dict)
def __init__(self,opener,userNumber,password,parent=None):
super(LoginThread,self).__init__(parent)
s... | UTF-8 | Python | false | false | 1,903 | py | 13 | LoginThread.py | 10 | 0.529513 | 0.511748 | 0 | 48 | 35.375 | 66 |
aleross/MITx | 12,713,103,215,041 | 3d3001d70a4da282c4ce04ff8afbc78e4e03f1be | 3bf1a7ef874003a804d8326d4f27aceed5f9c488 | /6.86x/Unit 3/mnist/part2-mnist/nnet_fc.py | c9c4944be586a70ec7c15b3004bdcf6412af12aa | [] | no_license | https://github.com/aleross/MITx | fe34b4a84a6d67f7310e15e6b07658256cfc8665 | e26b53b6652b61aee0bd5ee5453344d0e0e1afe7 | refs/heads/master | 2020-05-22T11:11:55.058001 | 2019-07-30T17:29:53 | 2019-07-30T17:29:53 | 186,317,311 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
import _pickle as cPickle, gzip
import numpy as np
from tqdm import tqdm
import torch
import torch.autograd as autograd
import torch.nn.functional as F
import torch.nn as nn
import sys
sys.path.append("..")
import utils
from utils import *
from train_utils import batchify_data, run_epoch, train_... | UTF-8 | Python | false | false | 3,307 | py | 26 | nnet_fc.py | 11 | 0.582099 | 0.545207 | 0 | 100 | 32.07 | 111 |
mtoqeerpk/geodat | 14,903,536,554,774 | ea701b632c440e7dd09fb380eb1601c216fd0111 | e7e84591e073a856a05fae8e915151ce587e8126 | /geodat/math.py | c7460198b6d92bf5d40d6baba7e5131782c88b6c | [
"MIT"
] | permissive | https://github.com/mtoqeerpk/geodat | 50c54255521b2ea651df55658fbf07f7c74ee657 | 5f6923b58249e99ded4caa62bf838f310f590d9a | refs/heads/master | 2020-07-25T15:07:01.237296 | 2016-03-01T17:46:30 | 2016-03-01T17:46:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy
from . import keepdims
def integrate(data, axes=None, iax=None, **kwargs):
''' Integrate data along a selected set of axes
Dimension is maintained using keepdims.sum
data - numpy.ndarray
axes - a list of axes
iax - a list of integers that select which axes are integrated along
'''
... | UTF-8 | Python | false | false | 4,536 | py | 47 | math.py | 28 | 0.533069 | 0.507716 | 0 | 118 | 37.440678 | 74 |
LB-Yu/tinyflow | 5,188,320,519,395 | d9ce75801ae7478d117ed39d5df743993d4def5c | 5c4bca1f2678c19bef7c19452511066758b85043 | /tests/mnist_dlsys.py | b758ad75146fd8ce7d8b3fd72cb292a25312cead | [
"MIT"
] | permissive | https://github.com/LB-Yu/tinyflow | ad3083fc5e2999e1786130d7c6eb440318d105d1 | 772669a983f18d78b48fd9108d0fcbc942487247 | refs/heads/master | 2023-05-25T17:38:21.428289 | 2023-05-03T03:52:04 | 2023-05-03T03:52:04 | 260,410,127 | 55 | 15 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tinyflow import autodiff as ad
from tinyflow import ndarray, gpu_op
import numpy as np
import argparse
import six.moves.cPickle as pickle
import gzip
import os
def load_mnist_data(dataset):
""" Load the dataset
Code adapted from http://deeplearning.net/tutorial/code/logistic_sgd.py
:type dataset: s... | UTF-8 | Python | false | false | 12,709 | py | 9 | mnist_dlsys.py | 5 | 0.574317 | 0.548588 | 0 | 336 | 36.824405 | 84 |
k-harada/AtCoder | 13,185,549,639,394 | 44482682b28d6945d16a049a5187a3a4c602a552 | d24a6e0be809ae3af8bc8daa6dacfc1789d38a84 | /AGC/AGC043/A.py | 8c85f28c12c358f60c60b337e675202157b4ef00 | [] | no_license | https://github.com/k-harada/AtCoder | 5d8004ce41c5fc6ad6ef90480ef847eaddeea179 | 02b0a6c92a05c6858b87cb22623ce877c1039f8f | refs/heads/master | 2023-08-21T18:55:53.644331 | 2023-08-05T14:21:25 | 2023-08-05T14:21:25 | 184,904,794 | 9 | 0 | null | false | 2023-05-22T16:29:18 | 2019-05-04T14:24:18 | 2022-11-05T03:53:20 | 2023-05-22T16:29:17 | 548 | 9 | 0 | 1 | Python | false | false | from collections import deque
def solve(h, w, s_list):
# cost_map
cost = [[1000] * w for _ in range(h)]
cost[0][0] = 0
# find how many flip
queue = deque([(0, 0)])
while len(queue) > 0:
i, j = queue.popleft()
if i < h - 1:
if s_list[i][j] != s_list[i + 1][j]:
... | UTF-8 | Python | false | false | 1,356 | py | 1,154 | A.py | 1,152 | 0.388643 | 0.361357 | 0 | 51 | 25.588235 | 80 |
RazvanKokovics/Planes | 4,561,255,289,033 | 0ce24a47a8c22988b91a3b95f9f670155556ac1a | 4d4c45a2d7788ef1fa32f79f690ddc3302bd5887 | /domain/plane.py | 6350c454461e2e2b153f144778a2a16229d17e11 | [] | no_license | https://github.com/RazvanKokovics/Planes | 326c38c46b408028f19c33a68854dd5ed5dd295b | dbfe16fad6d50ed656bc093117b43f9ff5437e11 | refs/heads/master | 2022-03-30T07:49:16.913896 | 2020-01-09T17:02:54 | 2020-01-09T17:02:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from imports.gameHandlers import GameHandlers
class Plane():
#the plane class which represents a plane object
def __init__(self, cabinPosition, orientation):
#cabinPosition = str, a combination of a letter (A -> H) and a digit (1-> 8)
#orientation = str, it could be one of the follo... | UTF-8 | Python | false | false | 1,167 | py | 12 | plane.py | 11 | 0.582691 | 0.577549 | 0 | 32 | 34.53125 | 92 |
lgarrison/kvsstcp | 7,430,293,429,309 | 3cb2f7f8e5819308985d5745c91a4d592a49d0a9 | 266ae62162796227fcb97b7e4fb789de53df37e0 | /kvsstcp.py | 72cdcb7f9c3b6eb9745ca6c956852659b700e548 | [
"Apache-2.0"
] | permissive | https://github.com/lgarrison/kvsstcp | 55ab87e5f885e5709f3068dc833a0f6a697bf482 | a329d76efcd24028acfea4b60e08d0bbbbb85c17 | refs/heads/master | 2021-05-20T03:47:26.929675 | 2020-09-08T18:44:50 | 2020-09-08T18:44:50 | 252,172,058 | 0 | 0 | Apache-2.0 | true | 2020-04-01T12:42:51 | 2020-04-01T12:42:50 | 2019-11-15T10:03:14 | 2018-07-13T17:49:45 | 116 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python
from collections import defaultdict as DD
try:
from cPickle import dumps as PDS
except ImportError:
from pickle import dumps as PDS
from functools import partial
import errno
import gc
import logging
import os
import resource
import select
import socket
import sys
import threading
try:
... | UTF-8 | Python | false | false | 22,260 | py | 30 | kvsstcp.py | 9 | 0.558086 | 0.553324 | 0 | 634 | 34.11041 | 255 |
caodg/docklet | 7,481,833,071,893 | c063b21ae00c2a6251074e933033b474da28e954 | c0153c0c2a171b3cb4dff2a01e033f031ce0bce5 | /src/tools.py | b3c62d2369a75f3b174f81a89e05c10d3f9ce284 | [
"BSD-2-Clause"
] | permissive | https://github.com/caodg/docklet | a58d3ca45d54812b5a952f0ed1fdff3c0754e719 | 84e511acef9d7deff75370ede189a48ab1e9c4dd | refs/heads/master | 2021-01-13T04:59:02.122962 | 2017-06-06T12:39:45 | 2017-06-06T12:39:45 | 55,135,843 | 3 | 0 | null | true | 2016-03-31T09:00:59 | 2016-03-31T09:00:59 | 2016-03-31T09:00:49 | 2016-03-31T08:15:54 | 987 | 0 | 0 | 0 | null | null | null | #!/usr/bin/python3
import os, random
#from log import logger
def loadenv(configpath):
configfile = open(configpath)
#logger.info ("load environment from %s" % configpath)
for line in configfile:
line = line.strip()
if line == '':
continue
keyvalue = line.split("=")
... | UTF-8 | Python | false | false | 646 | py | 115 | tools.py | 68 | 0.577399 | 0.540248 | 0 | 23 | 27.086957 | 82 |
munenelewis/somo | 2,731,599,219,377 | 31e9a353664595c85abda845d34793c3313185fe | 547cda72a9a7bde7cff3ef208261ceb1c13645ca | /somoApp/models.py | ea162fcf19488a322bf6c0eeb14838507400d22b | [] | no_license | https://github.com/munenelewis/somo | 6e61de99ed3012b553be5197236a598110c69af2 | 2b26c3135e8ccae3845caf2e000e167c1ecd085a | refs/heads/master | 2020-03-08T17:40:49.005471 | 2018-04-05T23:21:08 | 2018-04-05T23:21:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
# Create your models here.
class Classes(models.Model):
Classes = models.IntegerField()
block = models.CharField(max_length=255)
class Comments(models.Model):
body = models.CharField(max_length=255)
expectations = models.CharField(max_length=255)
class fees(model... | UTF-8 | Python | false | false | 1,503 | py | 9 | models.py | 8 | 0.634065 | 0.618097 | 0 | 68 | 18.955882 | 52 |
k550495/SoChange | 15,272,903,739,022 | ab2e215a714f59e40ebbc24726cc11ffe278ab55 | a62db41456ce40947deb373b4e97d25ec98d356b | /sochange/expensify/urls.py | 60e2d1400492937ab3f8d70f322da17331e38364 | [] | no_license | https://github.com/k550495/SoChange | 86fa746a9ef69f40c85035af7d7e72d052fc8201 | 852d7545442f0b93fba17f22ac1e3f2bc89735eb | refs/heads/master | 2021-01-13T03:17:35.789014 | 2010-05-12T05:02:21 | 2010-05-12T05:02:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
urlpatterns = patterns('expensify.views',
)
| UTF-8 | Python | false | false | 145 | py | 53 | urls.py | 26 | 0.793103 | 0.793103 | 0 | 6 | 23.166667 | 58 |
waittim/draw_yolo_box | 8,564,164,797,203 | 8e3e99cc00cc62bbf0335d95aaec97895a2a45cf | ce43ea964d9af55a8ecb4b12faa5a9789d2dcd07 | /get_origin_image.py | 8b895e4b9e7d44bfec213a1ea74e00f2f002497d | [
"MIT"
] | permissive | https://github.com/waittim/draw_yolo_box | 017b0c23666a213ec99be481bce5f23c6c91fbb5 | 015556c219ffb795f02dfd8547ec94ee8baa8652 | refs/heads/main | 2023-03-13T16:00:21.625607 | 2022-11-26T04:55:47 | 2022-11-26T04:55:47 | 321,011,431 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding:utf-8
import cv2
import os
import piexif
#全局变量进行路径配置
raw_images_folder = './raw_images/' #检查图片存放文件夹raw_images路径
save_images_folder = './save_image/' #保存图片文件夹save_image路径
name_list_path = './name_list.txt' #里面有检测图片名称得txt文件路径
wrong_folder = './wrong/' #错判图片文件夹wrong路径
#函数:将wrong文件夹内的对应原文件保存到save_image
def... | UTF-8 | Python | false | false | 2,055 | py | 14 | get_origin_image.py | 2 | 0.679951 | 0.675659 | 0 | 53 | 29.773585 | 88 |
Gracker/TTDeDroid | 13,357,348,320,869 | dee7a1729b7373f84b982f8809bab73f6f0867fd | 23b1a3c48098c3e9974aef874adae47c63a0f7c3 | /libs/enjarify/enjarify/jvm/genmathops.py | e76f68fb25ce31b9f0b7861228072ffce9273050 | [
"Apache-2.0"
] | permissive | https://github.com/Gracker/TTDeDroid | dcee2404226673ccfdebc12074b75bd609afc93b | 913876bebdba727bb9bd203983e281b3e036ca3b | refs/heads/master | 2023-04-08T11:01:06.799698 | 2023-03-19T13:06:08 | 2023-03-19T13:06:08 | 271,542,788 | 1 | 1 | Apache-2.0 | true | 2020-06-11T12:39:39 | 2020-06-11T12:39:39 | 2020-06-08T11:56:16 | 2020-05-16T07:08:40 | 121,801 | 0 | 0 | 0 | null | false | false | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | UTF-8 | Python | false | false | 2,867 | py | 35 | genmathops.py | 31 | 0.667248 | 0.648413 | 0 | 65 | 43.107692 | 174 |
ukaserge/ocr | 4,535,485,506,087 | 74998461273980ea28d88d1d1efbd52b82e22237 | 2e48ae5dac46c9fd063bcd9312ac618f3e4ba466 | /Machine learnig OCR/svm.py | 659b3ec217025bcdb88cb798075040baf532840e | [] | no_license | https://github.com/ukaserge/ocr | 39ca88eb8130f2c77936394216f2edbb774144d9 | 0e80d0a09580e99c418f0073f23bba27eeb82f06 | refs/heads/master | 2023-03-16T18:19:41.743069 | 2020-03-24T23:07:54 | 2020-03-24T23:07:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn import svm
from sklearn.model_selection import cross_val_score
# lien documentation : https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html
# charger les données
data = pd.read_csv('caract.csv')
... | UTF-8 | Python | false | false | 840 | py | 11 | svm.py | 6 | 0.682635 | 0.664671 | 0 | 26 | 31.115385 | 93 |
somethingx02/AutoHasher | 8,478,265,446,870 | dcc67555c97adb350f87f35535a46c95b2c93bec | 3979029b46dd20b19a8bf2ef4ed4125abf95a630 | /FeatureHashingSenti/src/models/biLSTMAttention.py | 413b3faa8243b1ab1eca266f6b2fa2f5aee756a1 | [] | no_license | https://github.com/somethingx02/AutoHasher | 95ba62f04ec4924ef6fb6aff56ae985090bc2d48 | 1fd48cb2bf8929a90828b23cecfb4901f84b06a6 | refs/heads/master | 2020-03-21T21:06:07.306584 | 2018-07-01T19:44:09 | 2018-07-01T19:44:09 | 139,046,111 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf8 -*-
import torch
import torch.nn #torch.nn and torch two different module from torch
import torch.nn.functional
import torch.autograd
from allennlp.modules.elmo import Elmo
from models.attention import Attention
# when debugging, should change to another absolute path import from attention import... | UTF-8 | Python | false | false | 7,886 | py | 13 | biLSTMAttention.py | 5 | 0.611971 | 0.582171 | 0 | 170 | 45.394118 | 224 |
xcsliu/pycharm_obj | 16,896,401,384,412 | 7e8bd429f707ab98445d59d3edbc20a787ccc721 | 2930d5ae25d81cff5d503f66de451b68b0891a90 | /poi/source/baidu_poi_source.py | c955a25aed6980746becd34a8a48fb2515e5640f | [] | no_license | https://github.com/xcsliu/pycharm_obj | 77957b8e4ef03af3e8fcd56b877c389751c4ab20 | f6da3bf20155d2f7152af98f5ab4e5ab02e858c1 | refs/heads/master | 2021-01-01T06:15:57.948509 | 2017-09-13T17:56:17 | 2017-09-13T17:56:17 | 97,396,933 | 1 | 0 | null | false | 2017-07-30T11:27:19 | 2017-07-16T16:45:39 | 2017-07-16T16:45:39 | 2017-07-30T11:27:19 | 19 | 0 | 0 | 0 | null | null | null | # total poi
def get_poi_with_lat_lng_radius(lat, lng, radius=1):
pass
# each kind
def get_traffic_station_with_lat_lng_radius():
pass
def get_restaurant_with_lat_lng_radius():
pass
def get_education_source_with_lat_lng_radius():
pass
def get_hospital_with_lat_lng_radius():
pass
def get_park_wit... | UTF-8 | Python | false | false | 479 | py | 38 | baidu_poi_source.py | 37 | 0.680585 | 0.678497 | 0 | 26 | 17.384615 | 52 |
Vivekagent47/HackerRank | 730,144,445,966 | 11a0a0e32b07f3c7b3c00a8fc76f74a9293eaf63 | 9ae51674c1a89799ef74c2f0067b258c33e45954 | /Python/33.py | 1603c31698fe9c62853efd58cc3fd272a776a200 | [] | no_license | https://github.com/Vivekagent47/HackerRank | f26de95e8eb8d5d3cc2627071f1c7031b097cf8a | 6c66dcb82b65bf60177ad1b1ef1910582db6a29b | refs/heads/master | 2023-07-10T12:31:32.284603 | 2021-08-23T15:37:03 | 2021-08-23T15:37:03 | 258,414,783 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import defaultdict
d, n = defaultdict(list), list(map(int, input().split()))
for i in range(n[0]):
d[input()].append(i + 1)
for i in range(n[1]):
print(' '.join(map(str, d[input()])) or -1)
# Takes very long time to execute
# n, m = map(int, input().split())
# listA = list()
# listB = lis... | UTF-8 | Python | false | false | 644 | py | 83 | 33.py | 72 | 0.540373 | 0.52795 | 0 | 30 | 20.433333 | 57 |
Bennyelg/magic_reader | 3,659,312,178,600 | 0f1b23d3ce0745614ead8fa9d18d35d259bb250d | bdb2781b5c150c32e96696af535aa56b9861eb0d | /magic_reader/readers/CsvReader.py | 6912199cba71a506a556c99180b6b2504820fa1c | [] | no_license | https://github.com/Bennyelg/magic_reader | ac65d49601668314979eac54d41df619a6240399 | cd2687c2e263d244c2b8570cf5b2aee37075756f | refs/heads/master | 2017-11-12T15:49:19.009072 | 2017-03-24T17:40:45 | 2017-03-24T17:40:45 | 84,361,034 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from . import parse_source_path, s3_read
import unicodecsv as csv
import cStringIO
class CsvReader(object):
def __init__(self, source_path, real_path=None):
self.source_path = source_path
self.return_as_dict = False
self.delimiter = None
self.quoting = None
self.escape_cha... | UTF-8 | Python | false | false | 2,912 | py | 18 | CsvReader.py | 11 | 0.553228 | 0.552198 | 0 | 62 | 45.935484 | 119 |
jjojohjohn/CodingInterviews | 15,333,033,271,011 | 3fbc6053f97ecf7f33c6052da8eb0cb152a2a84d | 739e6e6dc0c7442dbbff796c7a900486d13d0e62 | /ch2/2.3.py | 0c06f4d847e2e98e19f5d2e651027f426f7b7576 | [] | no_license | https://github.com/jjojohjohn/CodingInterviews | 059bc054a22be75be584958b85123d458931af3a | 840172a92e491b63e05fdc4bafa17d25db218e38 | refs/heads/master | 2021-05-02T06:23:57.983928 | 2014-11-12T00:40:56 | 2014-11-12T00:40:56 | 12,779,575 | 3 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from linkedList import Node
def removeMiddleNode(middle):
if middle == None:
return 'Cannot remove a "None" node'
if middle.next == None:
return 'Next middle node does not extist'
middle.data = middle.nextNode.data
if middle.nextNode.nextNode != None:
middle.nextNode = middle.ne... | UTF-8 | Python | false | false | 483 | py | 45 | 2.3.py | 45 | 0.68323 | 0.670807 | 0 | 19 | 24.421053 | 50 |
estraviz/codewars | 10,788,957,849,119 | e45d3652b6b68c4c3b92de25dce5f8bbc33621fa | f30b91db647dca1f77fffa4b7e26b6c6a68abbc6 | /7_kyu/Odder Than the Rest/test_odd_one.py | 30cb82b8aa744815db79d04d25f7fe5c0bb6b9ea | [] | no_license | https://github.com/estraviz/codewars | 73caf95519eaac6f34962b8ade543bf4417df5b7 | 5f8685e883cb78381c528a0988f2b5cad6c129c2 | refs/heads/master | 2023-05-13T07:57:43.165290 | 2023-05-08T21:50:39 | 2023-05-08T21:50:39 | 159,744,593 | 10 | 55 | null | null | null | null | null | null | null | null | null | null | null | null | null | from odd_one import odd_one
def test_odd_one():
assert odd_one([2, 4, 6, 7, 10]) == 3
assert odd_one([2, 16, 98, 10, 13, 78]) == 4
assert odd_one([4, -8, 98, -12, -7, 90, 100]) == 4
assert odd_one([2, 4, 6, 8]) == -1
| UTF-8 | Python | false | false | 235 | py | 2,206 | test_odd_one.py | 1,670 | 0.510638 | 0.353191 | 0 | 8 | 28.375 | 54 |
lucashsouza/Desafios-Python | 1,821,066,177,685 | bbe2a07b1051a34938d449885b5a369980440440 | 9c7581c3b862174878a5e71609f94b3e5a2de5c9 | /CursoEmVideo/Aula07/ex015.py | 24f5b356e198b163628e652f2805aae725d8ba8c | [
"MIT"
] | permissive | https://github.com/lucashsouza/Desafios-Python | 6d9fdc3500e0d01ce9a75201fc4fe88469928170 | abb5b11ebdfd4c232b4f0427ef41fd96013f2802 | refs/heads/master | 2020-06-21T16:49:32.884025 | 2019-07-23T01:23:07 | 2019-07-23T01:23:07 | 143,765,113 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print('Aluguel de Carro')
dias = int (input('Quantos dias de dias: '))
km = float(input('Km rodados: '))
total = (dias * 60) + (km * 0.15)
print ('Valor total a ser pago: R${:.2f}'.format(total))
| UTF-8 | Python | false | false | 201 | py | 106 | ex015.py | 105 | 0.606965 | 0.577114 | 0 | 5 | 38.2 | 56 |
aohanyao/Advanced | 18,537,078,859,203 | cfcb828911ad135c2d7fb09d701afb84541e0a0c | 04bd6fbe71412a1456ee091323718cd100103499 | /python/Sample1/backup/com/jjc/practice/rent/db_query.py | e389e2cd7d1b68c3753716e94bfb37438f3ac97f | [] | no_license | https://github.com/aohanyao/Advanced | 085c091ac379875a12dfec884c6f7ba14a810cdb | 849830103300bc35d79eeae5b29cce965f331a0d | refs/heads/master | 2022-10-10T09:51:27.308522 | 2019-01-15T08:27:25 | 2019-01-15T08:27:25 | 64,308,611 | 4 | 10 | null | false | 2022-10-07T13:07:23 | 2016-07-27T12:59:48 | 2019-01-15T08:27:35 | 2019-01-15T08:27:33 | 90,852 | 4 | 6 | 1 | Python | false | false | #!/usr/bin/python3
import pymysql
# 打开数据库连接
db = pymysql.connect("localhost", "root", "root", "python_58_rent")
# 使用 cursor() 方法创建一个游标对象 cursor
cursor = db.cursor()
# 拼接sql
sql = '''SELECT * FROM rent_58_list'''
try:
cursor.execute(sql)
results = cursor.fetchall()
for row in results:
name = row[1]
... | UTF-8 | Python | false | false | 466 | py | 164 | db_query.py | 101 | 0.639303 | 0.624378 | 0 | 19 | 20.157895 | 67 |
jfm44/TestsPython | 14,663,018,374,802 | 63be872f5aeb22bd594d7c9a91514930f8455244 | 0fe9e46d5b3a171e61900f7847fa120960c758ae | /Exercices/exo17_dataclass1.py | 4842fe8f9ec17e1164910701da7da5e914aba35e | [] | no_license | https://github.com/jfm44/TestsPython | 5743604f1027e6a311b8e01fde267ff767a8b2cc | 292295d621de60f04f43a2b22cbeab5d4b2e2551 | refs/heads/master | 2020-05-25T20:24:57.142818 | 2019-05-24T15:09:33 | 2019-05-24T15:09:33 | 187,976,391 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from dataclasses import dataclass
class Inv:
n: str="a"
px: float=1.0
nb: int=1
def cost(self) -> float:
return self.px * self.nb
# la methode init est implicite
@dataclass
class Inventaire:
nom: str="a"
prix_unitaire: float=1.5
nbr: int = 2
def cout(self) -> float:
... | UTF-8 | Python | false | false | 613 | py | 51 | exo17_dataclass1.py | 50 | 0.546493 | 0.536705 | 0 | 32 | 18.15625 | 52 |
lightning-sprinkle/lightning-sprinkle-user-service | 6,451,040,881,156 | 5e3471d6343a13408d3b7b8661616fd3561cc380 | d0110f6f0fc5620b43cef3fb0fd25d74b00e2527 | /app/cert.py | 270e24e5997f2a84eb330424c979fc74032298e2 | [
"MIT"
] | permissive | https://github.com/lightning-sprinkle/lightning-sprinkle-user-service | 7902132def35b94a1ae8cdda4a040fa09d2ed364 | c5f44d17da2a9894982e203aa1fbcc6f74753db2 | refs/heads/master | 2022-10-10T00:41:14.625619 | 2020-03-10T02:45:55 | 2020-03-10T02:45:55 | 243,968,261 | 0 | 0 | MIT | false | 2022-09-23T22:36:17 | 2020-02-29T12:51:40 | 2020-03-10T02:45:57 | 2022-09-23T22:36:17 | 128 | 0 | 0 | 3 | Python | false | false | import ssl
from cryptography import x509
from cryptography.hazmat.backends import default_backend
def isOrganization(hostname):
"""
Function looks up the SSL certificate for the domain, and checks if
it is an OV or EV certificate by reading the following CertificatePolicies
2.23.140.1.2.2: Organization Valida... | UTF-8 | Python | false | false | 1,006 | py | 12 | cert.py | 8 | 0.740557 | 0.689861 | 0 | 26 | 37.692308 | 88 |
washyn/face_recognition_ms_cf | 8,787,503,095,149 | 918f39e5fc08c0106a31cd74cf6b1b7fa46b90ef | 651bf745b71c7da30b46c8e766a09adf7ad9d2c2 | /models.py | 222a7206c481c6806d0ed95ffd139625c6e8046d | [] | no_license | https://github.com/washyn/face_recognition_ms_cf | c18065f22893a6a32d507df220425ff5e46859d9 | baee35ab303122f9ea162869b51feb6692c764ac | refs/heads/main | 2023-02-27T05:33:03.114505 | 2021-01-30T22:42:43 | 2021-01-30T22:42:43 | 314,428,345 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from global_variables import *
from peewee import *
import datetime
import uuid
db = SqliteDatabase(sqliteDbFileName)
class BaseModel(Model):
class Meta:
database = db
# class User(BaseModel):
# username = CharField(unique=True)
# class Tweet(BaseModel):
# user = ForeignKeyField(User, backref=... | UTF-8 | Python | false | false | 922 | py | 32 | models.py | 25 | 0.701735 | 0.701735 | 0 | 38 | 23.289474 | 123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.