blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
ff45b6f53902d20fbeeaf3f3e558a3c2dcafb197
9073a4f05b830450637d9380813d825fa997fd88
/wqxlib-python/wqxlib/wqx_v3_0/SimpleContent.py
f3a37dd879f391b7d26f1bc2ec271b4836944448
[ "MIT" ]
permissive
FlippingBinary/wqxlib
27363510acc0ed27c3d1a28c8958f08615079e67
77cb9d98fca8872dedc7dfc93c7ada2a5193a8e9
refs/heads/main
2023-03-22T08:12:07.545859
2021-03-17T17:19:12
2021-03-17T17:19:12
314,700,826
0
0
null
null
null
null
UTF-8
Python
false
false
31,929
py
SimpleContent.py
from datetime import date, time from decimal import Decimal from typing import Union # TODO: Add docstrings from XSD annotations. class ActivityConductingOrganizationText(str): """A name of the Organization conducting an activity.""" def __init__(self, o=''): if len(o) > 120: raise ValueError("ActivityC...
c8f764a0f8f59b22ea1a311e56a438fead67ba6d
177cf14cd67fd3f2da42fbf367a0e25d61f358b8
/Desktop/arcru_morse/MainProject/Crawler/crawlProcess.py
99b55fcc0eb1647475ff3d9e542b7b713c80576f
[]
no_license
asiurob/opticaym
8666365af6b2585831d26b7581fe45aae4927846
5200c0a04cfb4e4c79d03a09b9db34ff11f4259b
refs/heads/master
2020-03-27T09:11:55.377658
2018-08-29T17:45:10
2018-08-29T17:45:10
146,321,353
0
0
null
null
null
null
UTF-8
Python
false
false
556
py
crawlProcess.py
import scrapy from twisted.internet import reactor from scrapy.crawler import CrawlerRunner from scrapy.utils.log import configure_logging class Spider( scrapy.Spider ): name="project" links = [] start_urls = links def __init__( self, l ): self.links.append( l ) def parse( self, response ): for item in res...
2d31ad6eb8d0b0f79e8539fa14a1000609aa508c
cc971f6eac34a8c21fa4d4d65ef719d2eefe9247
/dataset.py
947d13414dfff682f4c15a59ff1fb8e401c9b1af
[]
no_license
yukii355/optical-GAN
ee2128563a6beb90284f38d6e3d893bf92e0cf7c
9283fe9804efe4d9bcca6f3c310db79aba854599
refs/heads/master
2020-08-06T01:07:06.772216
2019-11-28T09:53:30
2019-11-28T09:53:30
212,779,837
0
0
null
null
null
null
UTF-8
Python
false
false
1,742
py
dataset.py
import torch import torch.functional as F import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchvision.utils as vutils from torch.autograd import ...
db8a70999c5a71812383e36a8620b6b85ec76633
050dc595e3cb7ad3edd22642c65cdb701e8e30fd
/moskino/moskino/catalog/migrations/0002_auto_20200414_1726.py
00b418273d0d6907d1173035680a3aa4f8af609c
[]
no_license
Yaashara/for_work
4ef43d8cf19c94e237629521a37b61caff196792
14f7e108274f4958f68cb6fc7a5fcd07ffd64750
refs/heads/master
2022-07-03T12:54:50.629346
2020-05-14T11:19:30
2020-05-14T11:19:30
263,929,169
0
0
null
null
null
null
UTF-8
Python
false
false
5,856
py
0002_auto_20200414_1726.py
# Generated by Django 3.0.5 on 2020-04-14 14:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.CreateModel( name='mk_event', fields=[ ('name...
c33017f495f94cb09e5c5e908103d6bb8f4fdf47
ed13bccaa69a93c66f2f8229053359411e403036
/src/main/java/puzzles/easy/horse/Solution.py
6463166728c975e953379cf2af27f52e1c7e7ce4
[ "MIT" ]
permissive
vafin-mk/codingame
ec8b3861de872582971ec88a27b3ae9407d9c3a4
18da2175dd043a2a2ba0f4ac60c0edd93225d3fa
refs/heads/master
2021-07-09T01:23:30.179091
2018-05-26T18:51:12
2018-05-26T18:51:12
96,515,154
1
1
null
null
null
null
UTF-8
Python
false
false
366
py
Solution.py
import sys import math # Auto-generated code below aims at helping you parse # the standard input according to the problem statement. n = int(input()) arr = [] for i in range(n): arr.append(int(input())) arr.sort() minn=100000 for i, val in enumerate(arr): if(i==0): continue diff=val-arr[i-1] ...
77c7ffeb85d47b1c6007cb4a733719d9b36dfceb
ac1bda48e351ebac39fa7f0a87249092bc3c07a5
/dirty_python/nltk/sentdex/6.classifier.py
4b5cbde44bc707b3b6299edd87a696a7314816ac
[]
no_license
smoothpie/data-experiments
2a8805fc67feb4b3ff3efb6e16cd3203ab96988f
fce600fb844e15075875d30bc7a7456b888f7a58
refs/heads/master
2020-04-22T04:27:12.064873
2019-02-11T12:37:06
2019-02-11T12:37:06
170,124,159
1
0
null
null
null
null
UTF-8
Python
false
false
4,152
py
6.classifier.py
#%% import nltk import random from nltk.corpus import movie_reviews from nltk.classify.scikitlearn import SklearnClassifier from nltk.classify import ClassifierI from statistics import mode import pickle import sklearn from sklearn.naive_bayes import MultinomialNB, GaussianNB, BernoulliNB from sklearn.linear_model im...
3ef794be4bc3439690caf612b57755f22283057c
974256601fc9c4b484dcb8cd0b9dfc6d0212bacf
/static/__init__.py
eee2445aa0a5d464131a09bc66eaf5e8644beb18
[]
no_license
zhguokai/mircostone
0e3e7c380cbaff971a3dd0696b616a1997675812
acb3d50c5e6785c4faf24387da0b48446554e462
refs/heads/master
2020-06-04T03:44:06.081395
2015-01-14T15:59:01
2015-01-14T15:59:01
28,231,848
0
0
null
null
null
null
UTF-8
Python
false
false
147
py
__init__.py
# -*- coding: utf-8 -*- """ """ import os # 当前文件路径 static_path = os.path.join(os.path.dirname(__file__)) # 作者 __author__ = 'zhgk'
c58212ea780586db9e839e2c84568a2b24d1967e
bf45bde210cf21a1f384141ffecffb9d9f80b357
/forms.py
57cb593ada74a044a2e6566c991da932fd1c258a
[]
no_license
lukeaelder/flask-feedback-24.5
c0adfab7e5114862c353bf4a5fc0515493fa7082
06ffd7c3bf428f9f943fc100ec227daffe39e947
refs/heads/main
2023-01-09T23:14:44.383912
2020-11-21T22:33:53
2020-11-21T22:33:53
314,915,768
0
0
null
null
null
null
UTF-8
Python
false
false
1,802
py
forms.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, TextAreaField from wtforms.validators import InputRequired, Email, Length class RegisterForm(FlaskForm): """Form for registering a user.""" username = StringField("Username", validators=[InputRequired(message="Username can...
777d2d7ca64a505a772b23d23e02ce82081436a7
57253618761f65ef5137f0eafe8ae9b45731e449
/queuey/statuses/admin.py
eaa29e5868e973cf0dbacdcf80a6127d142dbf31
[]
no_license
kchiv/queuey_v2
d24054efaa393fe80261733eb96965b02f7ff342
b1a455d1eec326049a0f8694f434890b690975ce
refs/heads/master
2022-11-26T05:39:41.015388
2020-08-07T04:38:44
2020-08-07T04:38:44
273,980,242
0
0
null
null
null
null
UTF-8
Python
false
false
159
py
admin.py
from django.contrib import admin from .models import Status, Priority # Register your models here. admin.site.register(Status) admin.site.register(Priority)
a9dee4537c91ea6c24d2a9dbcf3b23f4f0ccf4f6
565f11312f4da59594f75e941beb3c07dc5f3b52
/lstm2.py
f83977b6f7cd701b630b8d882dcbbbd6191ccf12
[]
no_license
gomikasuchan/kenkyu
8da46cbdd18bf95b7021565ffcb9dbcb92d903cc
84d1d54cee5a92ae29986e3459359512e3ba348a
refs/heads/master
2023-02-01T10:58:01.947171
2020-12-17T09:36:03
2020-12-17T09:36:03
319,558,107
0
0
null
null
null
null
UTF-8
Python
false
false
3,725
py
lstm2.py
import pandas as pd import numpy as np from keras.models import Sequential from keras.layers import Dense, Activation, LSTM, Dropout from keras.optimizers import RMSprop df = pd.read_csv('D:/20180615_立石.csv') L = len(df) tag = df.iloc[:, [3,4]] #発話意図タグの列のみ抽出py tag = tag.dropna() #欠損値を削除 tag_com = tag[...
609458cb53cdc5b1085c84bff0c33db624783354
2337351b228818e41be3002bd38f68f77c2aa074
/sa/profiles/Nateks/FlexGain/profile.py
8f0a3810cdc71e3390e5ab6a4a3c64f2f8c0a8ee
[ "BSD-3-Clause" ]
permissive
nocproject/noc
57d40c680a1499374463e472434f9595ed6d1374
6e6d71574e9b9d822bec572cc629a0ea73604a59
refs/heads/master
2023-08-31T01:11:33.544573
2023-08-30T17:31:11
2023-08-30T17:31:11
107,815,776
105
33
BSD-3-Clause
2023-07-31T07:57:45
2017-10-21T21:04:33
Python
UTF-8
Python
false
false
1,178
py
profile.py
# --------------------------------------------------------------------- # Vendor: Nateks # OS: FlexGain # --------------------------------------------------------------------- # Copyright (C) 2007-2016 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- ...
5f5e7ce3491b863d7622378d1edbfaedbcb4b809
5dc77586e3e0f9de1f032fd2ca68494d8e58928f
/great_expectations/expectations/metrics/table_metrics/table_row_count.py
ed2675b562329ccd020ad1a70e74534b3256aba4
[ "Apache-2.0" ]
permissive
great-expectations/great_expectations
dd7c22e6277d6b08bee3ff38a015e6e8cd434df6
b0290e2fd2aa05aec6d7d8871b91cb4478e9501d
refs/heads/develop
2023-09-04T09:30:26.395518
2023-09-02T00:00:13
2023-09-02T00:00:13
103,071,520
8,931
1,535
Apache-2.0
2023-09-14T19:57:16
2017-09-11T00:18:46
Python
UTF-8
Python
false
false
2,209
py
table_row_count.py
from typing import Any, Dict from great_expectations.compatibility.pyspark import functions as F from great_expectations.compatibility.sqlalchemy import sqlalchemy as sa from great_expectations.core.metric_domain_types import MetricDomainTypes from great_expectations.core.metric_function_types import MetricPartialFunc...
ddfb8c21bb0a9d0c3ff3c49b7fd4f1d679f419ab
a4a5819d8c057b59dfd9113271610fc6dc14e4ee
/lc/curve.py
9ca2476595a091dd8f2e028e8ce71666cda96e20
[ "Apache-2.0" ]
permissive
allenai/learning-curve
8da109914e8ff57a67a504c7e169baaee40d6919
6a56f9ea6adb398b342fe188e40cf53484e82c59
refs/heads/main
2023-05-02T16:00:21.548953
2021-05-28T00:58:58
2021-05-28T00:58:58
354,645,980
8
1
Apache-2.0
2021-05-28T00:58:58
2021-04-04T21:01:51
Jupyter Notebook
UTF-8
Python
false
false
6,259
py
curve.py
import math import numpy as np import matplotlib import matplotlib.pyplot as plt from .variance import ErrorMeanVarianceEstimator class LearningCurve(): def __init__(self,param,covariance,gamma): self.param = param self.covariance = covariance self.gamma = gamma @property def alp...
dc00fae4bde03ca3f1e1f5cd83a25ab320b47b8a
b3afb1e06d2d25c3581026bfcbb8dd72d5f731fe
/playai.py
cedccd3b16c7d3e3066ae9815d3c9c33dc7b149a
[ "MIT" ]
permissive
roma1n/NEAT-racing
2ed4bb1d2b4c0936f76c8b88a9343e053c17a2aa
6ab1b38f1afe51f4ac97b3d3e5c0223c4ae5f245
refs/heads/master
2022-12-11T10:18:17.655913
2020-09-01T09:13:16
2020-09-01T09:13:16
277,368,283
2
0
null
null
null
null
UTF-8
Python
false
false
169
py
playai.py
import sys from aidriver import run_ai, run_best_ai if __name__ == '__main__': if len(sys.argv) == 1: run_best_ai() else: run_ai(sys.argv[1:])
5510ee984f752a440cb82d8d8d525c79b0e97026
72f9c5c099fe07073a4a619c2d843a44aa69343e
/state-of-the-art algorithm/MUSIC_ESPRIT_Range.py
d18b6aed77a9af1dc234df49790e913d004fe9ee
[]
no_license
fixernhc/radar_mti
4d1fb80193bb316a7822df6557900ca2fb040610
4213025d0305f453d1ff1dee3c5ff2fa77636077
refs/heads/master
2023-05-24T19:19:45.150242
2021-06-11T20:13:36
2021-06-11T20:13:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,767
py
MUSIC_ESPRIT_Range.py
import numpy as np import matplotlib.pyplot as plt import scipy.linalg as LA N = 1000 M = 100 s = 2 f1 = 1.000e9 f2 = 1.020e9 fs = 4*f1 signal = [] f=[] f_inc=fs/(N) def steering_vector(f_inc, N, M, fs): steering = [] for k in range(M): s_vector = [] for i in range(N): w = 2*np.pi...
aed19318cc0c88bcb26841b780de93fa6c091b5c
d6f6c1098ee40180dfae70bbc38ac8695a3a35f1
/Pipe.py
40fe87425f7a06dc3659d21837efcd9ca64fff4a
[]
no_license
nsolomon7-zz/Flappy-Bird-Reinforcement-Learning
3f77eb436e7d2fa476b7387b5e563bd5b5f884cd
4929b24e348b8931d172331c7599eef1679b39b5
refs/heads/master
2022-05-07T22:58:15.737273
2019-04-22T18:29:29
2019-04-22T18:29:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,598
py
Pipe.py
import pygame class Pipe(pygame.sprite.Sprite): pipe_width = 128 def __init__(self, center, height, width): pygame.sprite.Sprite.__init__(self) self.center = center self.gap = 150 self.scored = False ubody_height = self.center - round(self.gap/2) - 32 lbody_h...
f904f269294ed79ec06b7897220b0ac9ef025f33
8a12637442a61a145599c1986a0c55bc71c4ed9f
/quiz/api.py
c6071e44f6f13faac400f2bb9ad8a9a14f2ce6a0
[]
no_license
gmohre/quiz-demo
8a94ac9402bffacfea7a7f35c7b7dc475d49147a
7b11d8140bb8609beb2bffd369205efa14731360
refs/heads/master
2020-04-04T00:08:22.988959
2018-11-01T00:44:00
2018-11-01T00:44:00
155,641,297
0
0
null
null
null
null
UTF-8
Python
false
false
2,099
py
api.py
import json from flask import Blueprint, jsonify, request from hashlib import md5 from quiz.models import db, Test, Assessment, Question, Answer, Response api = Blueprint('api', __name__) @api.route('/test/<int:test_id>/', methods=('GET',)) def get_test(test_id): test = Test.query.get(test_id) return jsonify...
9c34cbc489a86c045c1832cd0b8ab52380dad6e3
ba87ad669cec6b0a3fd3a4e321f9a21bf7760a08
/cxcalc/plugins/__init__.py
2ff618312dc53d1b5f4f0a887ee93c9e3adddbe7
[]
no_license
flc/cxcalc-py
3da0d6ecc16e46f2dee132d0fedaf77fb634f9d0
7e0d50d5a85d749baf1e9f2ffc3fd55d9b1746f4
refs/heads/master
2022-11-22T20:25:29.450365
2020-07-27T13:56:50
2020-07-27T13:56:50
269,934,100
1
1
null
null
null
null
UTF-8
Python
false
false
245
py
__init__.py
from .base import * from .partitioning import * from .protonation import * from .name import * from .elemental_analysis import * from .charge import * from .geometry import * from .isomers import * from .other import * from .conformers import *
1b99b74ae555fb024db72a46f74e844e36c30cbd
f85b62a436490ae32afb995cf1238734e94d4842
/pokedex.py
20e169141c4daffa2f7bc8793bfc2be1be3952b8
[ "MIT" ]
permissive
AlanMorel/pokedex
34d35ce4b2e6a23c90d324ebc21823d0c25453f1
9fd879a817cdffda081d6a5209768be3f5653e79
refs/heads/master
2022-10-25T02:40:24.840413
2022-09-28T15:49:29
2022-09-28T15:49:29
56,246,908
3
2
null
null
null
null
UTF-8
Python
false
false
2,983
py
pokedex.py
import os from random import randint from dotenv import load_dotenv from flask import Flask, redirect, render_template, request, url_for from data import load_pokemon load_dotenv() app = Flask(__name__) name_cache = [] @app.route('/') def index_page(): return render_template('index.html') @app.route('/poke...
8e3116a1dcd1aceb606fa9b140811029cbdaf129
717171ed7a14ad60dd42d62fe0dd217a0c0c50fd
/19年7月/7.26/临近终点.py
a4034439701c3be47e683089a95dbee2e21a245e
[]
no_license
friedlich/python
6e9513193227e4e9ee3e30429f173b55b9cdb85d
1654ef4f616fe7cb9fffe79d1e6e7d7721c861ac
refs/heads/master
2020-09-04T14:34:48.237404
2019-11-18T14:54:44
2019-11-18T14:54:44
219,756,451
1
0
null
null
null
null
UTF-8
Python
false
false
383
py
临近终点.py
import numpy as np Y = np.array([[1,0,1,0,1,0,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,0,1,1,1]]) print(Y) print(Y.shape) Y_p = np.array([[1,0,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1]]) print(Y_p) print(Y_p.shape) print(np.abs(Y_p-Y)) print(np.mean(np.abs(Y_p-Y))) print((100-np.mean(np.abs(Y_p-Y))*100)) print('预测的准确...
08d8ba688f92d2bb8cc222f7ed3909e4ba74cfcf
d2d2df31609124b18df33bdce72964228ef9f7ce
/opts.py
07faaa806849ec9a8abcbb0951dec8d17a12e692
[]
no_license
Alexyuda/action-recognition-video-audio
653f041e7939bbcb26abbbf5234e16d566fcc2c8
2ba45ac61b837f33452d83f3e3740d537f8da78a
refs/heads/master
2022-04-04T14:33:43.486191
2020-02-25T14:06:04
2020-02-25T14:06:04
235,169,771
1
0
null
null
null
null
UTF-8
Python
false
false
2,294
py
opts.py
import argparse parser = argparse.ArgumentParser() # ================================ Dirs ================================ #!!!all dirs are relative to root_dir!!! parser.add_argument('--root_dir', default=r'D:\TAU\action_recognition', type=str) parser.add_argument('--checkpnts_dir', default=r'checkpnts', type=str) ...
06216493e63bab9bf85ad42672cf172cb4fbea87
fa415ed83069c5f5b69e35cdf7dc7f10c3a313fe
/Campus_Placement_Management_System-master/campus/migrations/0008_auto_20210318_1213.py
ba1ee168fec4b4f45c3f281316d1f381b3d66e9f
[]
no_license
h-y-developers/c_p_m_system
281e9259b0c7a8d0d8c28cf9570a200e4621a44d
13d331b31cf26d89d095901e1e746c63ae160bde
refs/heads/master
2023-03-16T22:20:00.178698
2021-03-18T09:23:08
2021-03-18T09:23:08
347,987,136
0
0
null
null
null
null
UTF-8
Python
false
false
446
py
0008_auto_20210318_1213.py
# Generated by Django 2.2.6 on 2021-03-18 06:43 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('campus', '0007_auto_20210318_1208'), ] operations = [ migrations.AlterField( model_name='faculties', ...
a7fe5e03e737c675e2b6bc6dacebcd3871a6dcdc
75d9bae2c0102d489b703ab7ad2bd4058f4468be
/binaryconvert.py
d362506e3a5006f4aba70b7f510a5d4861b807f3
[]
no_license
icebowl/python
19f90b970a5a1f7ec08c7bae5c1e82b271ec65fd
6b1a57c224981516c8d490503bd536586c42403a
refs/heads/master
2021-07-26T00:56:24.679771
2021-06-22T11:57:48
2021-06-22T11:57:48
100,441,849
2
3
null
null
null
null
UTF-8
Python
false
false
485
py
binaryconvert.py
def bincon (decimal): print("BASE 10 DECIMAL: ",decimal) bin_str ="" for i in range(8): binary = str(decimal % 2); print (binary," ") decimal = decimal // 2; bin_str = str(bin_str) + binary; print(bin_str) #bin_str = "".join(reversed(bin_str)) print(bin_str[::-1] ) print() def main(): print ("Type a v...
61b44be327eaa7639eaaa4622c4f95462aa2dc1c
924631c18178c7871a36388e0276f3f4fafd31ec
/tests/fixtures/test_fixtures.py
851ce086e382639e8fd5c5482bc686d914fd6dba
[ "MIT" ]
permissive
lamarmeigs/adventure
e44dccdaddeb7c47c62b5c9ad6a69267117dcbdb
570ca211911b86ef62c1258a2d040c3fd95fb786
refs/heads/master
2020-04-02T03:26:46.334059
2017-02-26T02:39:03
2017-02-26T02:39:03
61,458,560
2
0
null
null
null
null
UTF-8
Python
false
false
992
py
test_fixtures.py
import json import os from unittest import TestCase from adventure.fixtures import load_fixture class DummyModel: def __init__(self, foo, bar): self.foo = foo self.bar = bar class LoadFixtureTestCase(TestCase): @classmethod def setUpClass(cls): cls.file_path = 'test_fixture.json...
c6f9b44870fa884cdc1d9becd51bb6b3e8a28fe8
97872756aef5046d337c88e6a1c04b262f47b457
/app/models.py
8e32db0aa16b3990968aca838700507f97bf9668
[]
no_license
jregchiu/ubcscheduler
e031dfb42c9fac589c9192a26ac83507706497f8
0ee0a5f18a4d6db362828e9f709d5daa7d22ba8a
refs/heads/master
2020-03-10T15:05:19.145725
2018-07-09T16:27:15
2018-07-09T16:27:15
129,441,283
1
1
null
2018-07-09T16:05:20
2018-04-13T18:46:30
Python
UTF-8
Python
false
false
1,217
py
models.py
from app import db from sqlalchemy.dialects import postgresql as pg class Course(db.Model): __tablename__ = 'courses' id = db.Column(db.Integer, primary_key=True) code = db.Column(db.Text, index=True, unique=True, nullable=False) activities = db.Column(pg.ARRAY(db.Text), nullable=False) sections =...
66fa87dd4627f468825d6d372a123aea71d2cfa1
6d500a1f04edbc35252f6db07fcea4a60fad74cf
/API/views.py
643448086cbd3113a8d8b8e58a1dd513cf88f9fb
[]
no_license
niloy369/risk-management
0ac04300de9446461cee5e37a9e3af26614bff89
b65d3cafcdd9bda7079758ea6784db0742c215bc
refs/heads/master
2022-04-25T23:13:36.708279
2020-04-30T03:53:16
2020-04-30T03:53:16
260,107,072
0
0
null
null
null
null
UTF-8
Python
false
false
3,369
py
views.py
from django.db.models import Count from django_filters import rest_framework as filters from rest_framework import exceptions from rest_framework.generics import ListCreateAPIView, ListAPIView, CreateAPIView, RetrieveAPIView from rest_framework.response import Response from .filterset import PassportInfoFilterset, Doc...
73741a8145f415e24aae58b4c36d00dfc21c14f7
2acd59481c55701b1796c1750d8a08cd5a7a0656
/projnew/proj1/app/migrations/0009_auto_20180730_0949.py
af8bc95a92548537f66a9cbf73df62d8f581f725
[]
no_license
akashpatil-219/Library_management
247216b8dfc188e634e4d60439d7f7725a762e40
dde8057b9500655ac7e3bfa4e83e4b058689fa75
refs/heads/master
2020-03-24T17:29:24.380050
2018-07-30T11:06:26
2018-07-30T11:06:26
142,860,700
0
0
null
null
null
null
UTF-8
Python
false
false
715
py
0009_auto_20180730_0949.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-07-30 09:49 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0008_auto_20180730_0941'), ] operations = [ migrations...
5785656b695727c7570bce44f61da41f775125c9
009e06a94a9c752e92293d098aac315a2afe3188
/pre_processing.py
69dac33534cd4299099f556fd000be9a1fcb8514
[]
no_license
loureirod/Natural-language-processing
090b9a36b133fac3ae72c3e17c6d7e4f40e3949c
277cf35a0f0a5775562754a2a556f2a6a708142a
refs/heads/master
2021-04-15T14:09:15.515824
2018-05-03T12:51:25
2018-05-03T12:51:25
126,377,855
0
0
null
null
null
null
UTF-8
Python
false
false
4,085
py
pre_processing.py
import os,sys import re import pandas as pd import numpy as np import gensim.models as gm def split_text(text): '''Split words and english short forms ''' text = re.sub(r"\'s", " ", text) text = re.sub(r"\'ve", " have ", text) text = re.sub(r"n\'t", " not ", text) text = re.sub(r"\'re", " are ...
def03a06ad1182a913ed095741662c8c85af34bc
7cf6288309ba107415e1b3ae13c18936608cd2b5
/Search/Search.py
62119867828b1b705481bc5bb058e51e89e10f19
[ "MIT" ]
permissive
Chase1325/Artificial-Intelligence
83c3b3b8785e1ae5ae72e12a95ef4232e6c76006
1a68a4b61e7eff199cd3aab472c1a3ab311b58ab
refs/heads/master
2020-04-17T19:50:36.075406
2019-04-15T14:46:47
2019-04-15T14:46:47
166,880,762
1
0
null
null
null
null
UTF-8
Python
false
false
13,073
py
Search.py
import argparse import collections class Node: def __init__(self, node, weight=0): self.node = node self.adjacent = {} self.weight = weight #Add an adjacent node and their weight def addAdjacent(self, adj, weight=0): self.adjacent[adj] = weight #Get the adjacent nodes ...
dbf88df816241ffd4b4c46105d04c67f9aeb2214
309f16247cf6745ef2b3a45e997901dd33c28343
/app.py
c9fd37f46e71909ad31025911e63dda5676120ed
[]
no_license
Code-Institute-Submissions/MS3_GMResource
1500cfcee69faf4236c7a2f015d92ae818ab2c19
070ad1c0d200355fde7ec6734c0f880ed813da87
refs/heads/master
2023-04-17T14:24:53.669380
2021-05-04T09:30:49
2021-05-04T09:30:49
null
0
0
null
null
null
null
UTF-8
Python
false
false
15,365
py
app.py
import os from flask import ( Flask, render_template, redirect, request, session, url_for, flash) from flask_pymongo import PyMongo from bson.objectid import ObjectId from werkzeug.security import generate_password_hash, check_password_hash from datetime import datetime if os.path.exists("env.py"): import e...
908d9e6ff86bb8f19d272add9df2e58144056087
df3dae5cd9aac6354a61ba43bfb5b79a421df96b
/cessp2force_lin.py
ce239dc87c623237ce48915627bccd3fe5fb9330
[]
no_license
tgzhou98/DeepMD-generator
31235dafcc9ff0b8e8ca292e9bf67da81f7e462e
3d455f89174804c9e4d68ebc788533b553b0acaa
refs/heads/master
2020-09-02T16:38:52.563620
2019-11-03T06:26:08
2019-11-03T06:26:08
219,261,086
1
0
null
null
null
null
UTF-8
Python
false
false
15,267
py
cessp2force_lin.py
#!/usr/bin/env python3 ################################################################ # # vasp2force: # convert vasp output data into potfit reference configurations # ################################################################ # # Copyright 2014 # Institute for Theoretical and Applied Physics # ...
286b4f6dcd1203d3a5e464234ca4d7bbba19e57a
e0a47e1756398ca87fc34573d286aad2ca66b295
/cookbook/cookbook/schema.py
53fd75608f4990ba63e1772e69052a39a2bbf057
[]
no_license
codingj87/graphene_study
657dd8cfe16cd971c83f3a01bcafed77500b34ed
f2bf645c981e521de9ade49d69609b0ea9efb478
refs/heads/main
2023-06-04T05:58:39.756197
2021-06-24T09:21:37
2021-06-24T09:21:37
379,868,056
0
0
null
null
null
null
UTF-8
Python
false
false
218
py
schema.py
import graphene from ingredients.schema import Query as ingredients class Query( ingredients, graphene.ObjectType ): pass class Mutation(graphene.ObjectType): pass schema = graphene.Schema(query=Query)
5f6192756e2fbdc694ddf65d7e6a8c575738a32d
85bc55833b008313de68ec3030fbe12a12071ee6
/bin/pyl-to-json.py
374bd8a914d8cee7c820467e5a77573b33a0d687
[]
no_license
gwk/gloss
5a6261867c3011cb0b576af353b21f3a0b52c69e
2d8e62decd294679ad77a8c9270c38178ed8cab0
refs/heads/main
2023-07-22T09:59:32.718245
2023-07-19T14:28:56
2023-07-19T14:58:04
1,144,191
4
1
null
null
null
null
UTF-8
Python
false
false
1,071
py
pyl-to-json.py
#!/usr/bin/env python3 # Dedicated to the public domain under CC0: https://creativecommons.org/publicdomain/zero/1.0/. import json import sys from argparse import ArgumentParser, FileType from ast import literal_eval def main() -> None: parser = ArgumentParser(description="Convert python literal files to JSON.") ...
d5369cd8d9d280fd8aa18c99d860bc1ab4523392
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03338/s746570381.py
616624bfd1db4642124e1e70c23158e937988250
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
120
py
s746570381.py
N = int(input()) S = input() maxA = 0 for i in range(N): maxA = max(maxA, len(set(S[:i]) & set(S[i:]))) print(maxA)
b427c88d18858f683f19087c0ee4dfb34248e9d8
d5fdece50ddc00f2a5686cd0839716bc0ca55622
/Program/Imagesplice/img_splice.py
80ee2860664aa92fcb89d967c73e59291438b117
[]
no_license
uchihanuo/helloworld
47611945919c0d82b67f0a0c13107e7793c7b0b2
bf3103fb69e2ffcc4e5a7201a2f5b5086e3d9b6c
refs/heads/main
2023-06-20T20:04:33.947053
2021-07-23T07:50:39
2021-07-23T07:50:39
388,643,831
0
0
null
null
null
null
UTF-8
Python
false
false
2,746
py
img_splice.py
#! python3 # -*- coding: utf-8 -*- import os import time import cv2 as cv import numpy as np # import logging # logging.disable(logging.CRITICAL) # logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s') # logging.debug("Start of program.") def main(): # to get selected imag...
5cec327cb1a3f18d9618a524e12fa32865847a47
6907db4aaeef545b93b564b2f3b7582201240bdc
/06/Hack_Assembler.py
cbdfccc2eadc6bd3b05bdf2db475f3c4e6439508
[]
no_license
shreesha00/nand2tetris
e5a1bff580075a7ed3e5cfabdd556e38b202e4ee
8bbd2fbdde1680b8c76a069012c01d273e75b2e4
refs/heads/master
2020-08-02T13:22:13.069218
2019-11-13T19:09:04
2019-11-13T19:09:04
211,367,444
0
0
null
null
null
null
UTF-8
Python
false
false
4,904
py
Hack_Assembler.py
#Assembler for the Hack Computer and Jack programming language #Author : Shreesha G Bhat # CS18B103 # CSE Department # Indian Institute of Technology, Madras #Part of CS2300 course based on the Nand2Tetris course import sys filename = sys.argv[1] symbol_table = {} for i in range(16): symbol_...
26daa2de3179c2dd52443680039848ae22cf7963
333364108cdd0479fac6ec18ea8d348941165df3
/approaches/jdeodorant/detection_feature_envy.py
3ab0c2b6a76f75f173cc85879d94747e708dbd78
[ "MIT" ]
permissive
antoineBarbez/SMAD
d464b09824e330a53b537db070f4cf74a92046f5
1bee38dccc69fd8bdd550ef97441859af6afcaf8
refs/heads/master
2023-04-09T05:12:02.593231
2021-02-16T22:28:54
2021-02-16T22:28:54
152,662,620
7
3
MIT
2023-03-24T23:39:54
2018-10-11T22:20:23
Python
UTF-8
Python
false
false
1,030
py
detection_feature_envy.py
from context import ROOT_DIR import utils.data_utils as data_utils import utils.detection_utils as detection_utils import utils.java_utils as java_utils import os # Returns the set of detected occurrences def detect(systemName): JDFEFile = os.path.join(ROOT_DIR, 'approaches', 'jdeodorant', 'metric_files', 'feature_...
b0ce4f4531603ffb45d629f8544fbdbf5af67667
e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f
/indices/pancrea.py
a473269e22f692f46c670fed28c88e0ee1330cec
[]
no_license
psdh/WhatsintheVector
e8aabacc054a88b4cb25303548980af9a10c12a8
a24168d068d9c69dc7a0fd13f606c080ae82e2a6
refs/heads/master
2021-01-25T10:34:22.651619
2015-09-23T11:54:06
2015-09-23T11:54:06
42,749,205
2
3
null
2015-09-23T11:54:07
2015-09-18T22:06:38
Python
UTF-8
Python
false
false
102
py
pancrea.py
ii = [('RogePAV2.py', 4), ('ProuWCM.py', 7), ('BuckWGM.py', 1), ('WadeJEB.py', 1), ('HogaGMM2.py', 1)]
7df421564e2bf678944859e878f7a2b8df819237
8dc97ea2a3f828c6770067820b6eb7b09b43a8a2
/C11Primary_communication_node.py
f50c85a07d2651af7587d73e0c21b872a2dfc05a
[]
no_license
rLoopTeam/eng-software-pod-gui
a87659e17be65c007d685e034db64d03fa4f1d95
088a768a2954777f999b5baaef9be1d0b84796b8
refs/heads/master
2021-01-10T04:53:48.176023
2016-01-16T21:46:48
2016-01-16T21:46:48
49,030,197
1
0
null
null
null
null
UTF-8
Python
false
false
4,804
py
C11Primary_communication_node.py
from __future__ import print_function # In python 2.7 from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory from twisted.internet import reactor from time import strftime import datetime import random import time import math import json import sys #from IDs import MessageList as ml d...
f79cf6d3ea0382712cea6633d1349f791b2bb216
4bbab8b8105dae0b5bd5fbdaed6bab1e5ede6dad
/_DONE/flatten-array/flatten_array.py
84767ac9041055541c31953f0b970cd0a0ce9d68
[]
no_license
nicolas-tdc/python-exercism
a5f8bf91315978fa22d4a57eb3414f8785537c5c
b27243fc1756d83a2785213b14f1e13dbd0222aa
refs/heads/main
2023-08-28T03:42:23.555310
2021-10-01T16:32:29
2021-10-01T16:32:29
404,169,972
0
0
null
null
null
null
UTF-8
Python
false
false
345
py
flatten_array.py
"""Flatten array""" from collections.abc import Iterable def flatten(iterable): """ :param iterable: list :return: list """ flattened = [] for i in iterable: if isinstance(i, Iterable): flattened = flattened + flatten(i) elif i != None: flattened.append(...
7674371311da37e61e0d00ede3538fdccdd9f850
17cf48fa2724b2b2e2aaae47fc3221e1dc33cad3
/harf_tf_02.py
6a03fb04014cce87b2e5c38b5ef9ef2c9c688a24
[]
no_license
aslanismailgit/word2vecTurkishAlphabet
b8f50f51a1f34324c702f3d7a451021703292a48
ac560a94ebe81a91852e24bcb6cfaec7937721eb
refs/heads/master
2021-02-12T06:46:18.914035
2020-03-03T07:32:23
2020-03-03T07:32:23
244,569,947
0
0
null
null
null
null
UTF-8
Python
false
false
4,189
py
harf_tf_02.py
import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib import seaborn as sns #import re from nltk.tokenize import word_tokenize import nltk import pickle import time from harf_tf_func import * #%% with open('./data/dictioanry_tr.pickle', 'rb') as f: tr_df = pickle.load(f) #%% txt ...
c42cccb4a2973cb069cb1e9e9fe35467ed12013f
961aad2d93201d6f92c27698e3f3b2d92be9e512
/readInputData.py
1cc32d1daf2483379f13a3e8da7d5dbf2bece906
[]
no_license
Calum-Johnston/Travelling-Salesman-Problem
7842fa1ef539e2e4309fb8140ff2e86e8525f751
7b3cae5601827abac76356e1edb49e754a8b12a6
refs/heads/master
2020-08-06T21:26:05.191275
2019-10-06T11:59:04
2019-10-06T11:59:04
213,160,344
0
0
null
null
null
null
UTF-8
Python
false
false
1,368
py
readInputData.py
import re import numpy as np def readData(): with open("NEWAISearchfile012.txt", "r") as file: next(file) #Skips first line line = next(file) #Gets number of cities #Creates an array of the correct size size = re.findall('\d+', line) size = int(size[0]) cities = n...
87555b6193cc709f9e87ed1e979a61137f9d3963
f5d1ef8ea6173b3b380fa2985fe346162a0b68b3
/442_Find_All_Duplicates_in_an_Array.py
ccb0ec94dd488d2975bab5b81988c23c375fa107
[]
no_license
ZDawang/leetcode
a66801a2ed5b06ee4e489613885a22e3130618c7
a46b07adec6a8cb7e331e0b985d88cd34a3d5667
refs/heads/master
2021-09-11T15:21:36.496025
2018-04-09T06:28:56
2018-04-09T06:28:56
111,512,346
8
0
null
null
null
null
UTF-8
Python
false
false
548
py
442_Find_All_Duplicates_in_an_Array.py
#!/usr/bin/python # -*- coding: utf-8 -*- #author : zhangdawang #data: 2017-5-17 #difficulty degree: #problem: 442_Find_All_Duplicates_in_an_Array #time_complecity: #space_complecity: #beats: class Solution(object): #思想,若有一个数重复,那么它们作为下标指向的数相同。 def findDuplicates(self, nums): res = [] for n...
229ff53989cde723a03b5d48667d1edb40031c83
c614189dd5f792b512ebb1f9017e7438bd64673c
/astroPicWallpaper.py
8621a9e27013b2e5edf183831e166862fd3b3ecd
[]
no_license
siddhartpai/astroPicWindowsWallpaper
8b2240be634bb5fa867f005e9d5099e1851b867e
69d7f46b836d1d1e58d250cc5e59480aea03a6fc
refs/heads/master
2021-01-10T00:59:45.599624
2015-03-23T07:07:10
2015-03-23T07:07:10
32,715,502
0
0
null
null
null
null
UTF-8
Python
false
false
612
py
astroPicWallpaper.py
import urllib2 import urllib from time import gmtime, strftime import ctypes URL = "http://apod.nasa.gov/apod/astropix.html" URL_FOLDER = "http://apod.nasa.gov/apod/" checkString = "<a href=\"image/" pageData = urllib2.urlopen(URL) line = pageData.readline() while(line!=''): if checkString in line: break line =...
74b40d2467a8b8e76cd0584a99c8c4e9e7bed3f8
b78145c4501510b67f8a12e286b7f1487454d96a
/command/identify.py
6085594900df0c55bdf42d75a7ee0bc5e431bece
[]
no_license
awgreene/operator-courier
a6a2bb61e9807c97766d5a9ff637cf87c89cd8b4
b1c4b8ad0ae8a6dd37bb773a71fcd1a3658cf731
refs/heads/master
2020-04-12T11:11:47.666349
2019-01-23T19:36:22
2019-01-23T19:36:22
162,452,109
0
0
null
2018-12-19T14:53:46
2018-12-19T14:53:46
null
UTF-8
Python
false
false
548
py
identify.py
import yaml def get_operator_artifact_type(operatorArtifactString): operatorArtifact = yaml.load(operatorArtifactString) if isinstance(operatorArtifact, dict): if "packageName" in operatorArtifact: return "packages" elif "kind" in operatorArtifact: if operatorArtifact["k...
09a2f8d8a1ebab08c64436ddd4d8be9577f85216
a0c3ffbd69823299ef655cab1de3bd6bc25972cb
/code/Question4/Solution1.py
2676b2ad58f4a4cc89b852bd39fa4a4ad4a0ab2e
[]
no_license
KyleC14/SwordToOfferPractice
ef17304b9663bbce32f00b9d71bfab0fe19b9484
35b4f4553273434294644404e886e0fa9a4f1dcd
refs/heads/master
2023-01-02T06:14:03.584683
2020-10-20T16:21:01
2020-10-20T16:21:01
282,450,427
0
0
null
null
null
null
UTF-8
Python
false
false
794
py
Solution1.py
#总体是逐行遍历 class Solution: def findNumberIn2DArray(self, matrix: List[List[int]], target: int) -> bool: #检查空数组 rows = len(matrix) if rows == 0: return False columns = len(matrix[0]) if columns == 0: return False #查看大致范围 start = matrix[0]...
8afbc5c84e016a53c1a8f67b0d640b23bacb9857
c599292118a4843c1160c7e498ab1ee47039f03b
/innerclass.py
a1756ee9a1671bf43c9ab58617fa336722a7c42e
[]
no_license
himanshu116/pycode
435abce82d31c0532addc7b17dfd687c52002a40
dd7bf1b67cf3eb25c81e5e2d9bc5b20b7256fe3c
refs/heads/master
2020-04-27T20:15:41.999913
2019-03-09T05:11:51
2019-03-09T05:11:51
174,651,231
0
0
null
null
null
null
UTF-8
Python
false
false
218
py
innerclass.py
class inner1: def __init__(self): print("outer class constructor") class inner: def __init__(self): print("inner class constructor") a1=inner1() a2=a1.inner() del a1 print(id(a2))
8b639af4fc625522a17a0d4c9a8014e2ca71ec6e
9e983bc2159498df230acf87debfaac42d85a097
/common/adb_shell.py
3a88bbd6f4daba301551d413d3c59807ebf2f1f5
[]
no_license
hotDOGEEE/CnTestFramePoco
6b528211c0832faa56d071df1fd87966096d2a80
f6d35a5a2462000a20d837e181bac41011bdf83a
refs/heads/master
2023-07-27T08:38:54.772585
2021-09-08T10:02:56
2021-09-08T10:02:56
363,015,947
1
0
null
null
null
null
UTF-8
Python
false
false
1,775
py
adb_shell.py
import subprocess import time class AdbShell(object): def __init__(self, resolution=None): """ :param resolution: 设备屏幕分辨率, 默认2340*1080 """ if resolution is None: resolution = [2340, 1080] self.resolution_x = resolution[0] self.resolution_y = resolution...
a84f6033db0550829db1a73926f2bbb1da8842bc
182d3361b74b3c2649984b2c478fe1b855cec43c
/app/res/rcc/product.py
c1df4a4b2920d0b8dc86a5e0039b1c2bbd438974
[]
no_license
samuelitwaru/amoshop
c0a9c18223d7745293c3de290915cabbef9d04ed
61f6a36c7d1376e2067a304adbe4f50b292d8b16
refs/heads/main
2023-07-19T07:41:01.041484
2021-08-30T15:20:01
2021-08-30T15:20:01
396,804,260
0
0
null
null
null
null
UTF-8
Python
false
false
57,421
py
product.py
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x34\xf2\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\xa3\x...
79b17071e40a5221007cff85eeb0378b19f51051
0c800a4f8d7de9c01bddea2f9b0ce7fa8769339c
/web/dashboard/views.py
c0682d9d711f1f9ab6882609278f81bdaa18b7e2
[]
no_license
honeynet/cuckooml
bb4ea096f0d6680a3529c4fde4628eeead2eb030
b58c847a877d74881d36b94a96fc55038a0936ad
refs/heads/master
2022-07-18T07:48:41.083028
2022-06-27T08:04:50
2022-06-27T08:04:50
56,984,886
151
57
null
2022-06-27T08:04:51
2016-04-24T17:30:58
Python
UTF-8
Python
false
false
2,432
py
views.py
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import sys import time from django.conf import settings from django.shortcuts import render from django.v...
be5e029d3b448e8aa79bba293ef621fa435008de
69ec6ddb9c10d180f81ddf625b9fded9c980ca83
/ods/teste_scapegoat.py
b5550171da0bee3bbf140ae01221e3a4f9423efd
[]
no_license
matheusms/ods-python
6ba96333b6bbcb702fd831c45878da78a2cf0fb8
a5219ee3db4f259b0adee38841705acf5b47a482
refs/heads/main
2023-05-19T17:38:01.960244
2021-06-08T16:08:15
2021-06-08T16:08:15
353,063,040
0
1
null
null
null
null
UTF-8
Python
false
false
151
py
teste_scapegoat.py
from P2_scapegoattree import ScapegoatTree teste = ScapegoatTree() teste.add(1) teste.add(2) teste.add(3) teste.add(4) teste.add(5) teste.tamanho()
b8f5bb402cddaaf5c9fff47bb96ba8369d4a1e66
b411f1279d0e6951882b27838b6bb8f2ae6503cf
/products/api/views.py
e9b8c23985acc446d70119ed56749e4dfbd9af73
[]
no_license
yh496/Allswap-cornell
7b9e495e389b6d54a768d5455247be607ba38e0f
5e44921a655388d9cea1fb0e92fa9275e65166e0
refs/heads/master
2022-12-13T05:07:33.947095
2020-03-04T19:08:49
2020-03-04T19:08:49
242,001,786
0
0
null
2022-12-08T03:39:24
2020-02-20T22:16:05
JavaScript
UTF-8
Python
false
false
602
py
views.py
from rest_framework import viewsets from products.models import Product from .serializers import ProductSerializer from rest_framework import generics from allswap import settings class ProductViewSet(viewsets.ModelViewSet): """ A viewset for viewing and editing user instances. """ serializer_class = P...
9aa5f17668c9274806e195057d60fd7f6ce34699
8a1704e739bfb265b3b2bb6336ab7e58c902b267
/2019/09-september/06/solution.py
87c59099fdc03071f8297dd28e6ea974630f7798
[]
no_license
hallzy/DailyInterviewProSolutions
c0616330836e628d519a496dc6d87369f7d496fc
311d1e0b90e95a078010d96f7a02b12f25cefa94
refs/heads/master
2020-07-13T09:50:23.988820
2019-09-12T02:49:52
2019-09-12T02:49:52
205,059,766
0
0
null
null
null
null
UTF-8
Python
false
false
2,273
py
solution.py
class Node: def __init__(self, value): self.left = None self.right = None self.value = value def findCeilingFloor(root_node, k, floor=None, ceil=None): # Fill this in. if root_node == None: return floor, ceil if root_node.value == k: return k, k # Candidate...
16e1065f1014042b93cdcf7aacb3c858daba40bd
7ba673a47ac576f5181d4ac728a357def2cc61a9
/tiff/binaryreader.py
5158e1f4e412dff17cc58aeb8e5955dde1195aaf
[]
no_license
sthomen/tiffpie
7b73af8bc1a7d000e144332c3602dd27a13c3773
df2b99c270ec85d7392541933a750044ee2b21f7
refs/heads/master
2021-01-18T23:49:29.858043
2016-01-25T19:02:10
2016-01-25T19:02:10
50,238,429
0
0
null
null
null
null
UTF-8
Python
false
false
912
py
binaryreader.py
# vim:ts=4:sw=4: import os from struct import unpack class BinaryReader(object): """ Perform binary reads at a given byte order Note: while this object is like a file, it is not File Like(tm) """ def __init__(self, fp, bo='@'): if type(fp) == file: self.fp=fp else: self.fp=open(fp, 'rb') self._byteo...
35238403930a293e7dca497e7939a6f7b36bdfe0
1a443d14fbd8fe72a9190da1feaa8e1f07f630e7
/httpss_pik_ru3s19b.py
e07016c6088cdb1b18caca184b767965688aec45
[]
no_license
GAKiknadze/piksGroupsUrls
e5aa0f8e2ee59d69405b60f9d2e1b0c9119b4139
78413822faa35170a2842305ee26f57484566972
refs/heads/master
2022-10-25T03:48:19.858183
2020-06-14T14:04:04
2020-06-14T14:04:04
272,215,319
0
0
null
null
null
null
UTF-8
Python
false
false
1,046
py
httpss_pik_ru3s19b.py
from urllib.request import Request, urlopen import itertools from threading import Thread START = 4 STOP = 5 FILE = open('pik_redirect.txt', 'a') ALPHA = 'abcdefghijklmnopqrstuvwxyz1234567890' def check(url): try: req = Request( 'https://s.pik.ru/{}'.format(url), headers={'User-Agent': 'Mozilla/5.0'}) web...
265c83107d4345da608c5a787050b759c68c6590
f3f6ab723eaa4fcb799ff2c5e3b8cb33201c6d91
/folder1/folder12.py
51cda872c00868feb15c366e4b780f47bd64a2f2
[]
no_license
mmlemon/python-module-sample
000da5658cb8ea4298e2491dac64f812e318b650
c3cb10638e4bf11a50cd47861fe67c5a99ea0c2d
refs/heads/master
2020-12-09T15:59:21.217905
2020-01-12T07:18:15
2020-01-12T07:18:15
233,354,129
0
0
null
null
null
null
UTF-8
Python
false
false
453
py
folder12.py
""" folder1内、同一階層を参照する """ import folder11 def folder12method(): return "folder12method" def folder12method_folder11call(): folder11class = folder11.folder11class() return 'folder11.var:{}, method:{}, class_method:{}'.format(folder11.folder11var, folder11.folder11method(), folder11class.folder11class_method()) i...
dc5103820f82cedc29bda87aff5b21ab34f145b2
3f12054b203ef0c0a981a8be74ab7276fb378777
/CmpE_460/project_1/p2.py
a86a5c3d04907bf7a9bbc20a15ec3704add6233a
[]
no_license
ptpam/2018_Spring
2a9645645fbb5846365f10e0ce41f8676eaa0216
e761ddc9f6d36fbdbdcffed228eb0cbc0d0fc264
refs/heads/master
2021-01-24T12:04:39.880696
2018-06-06T17:36:58
2018-06-06T17:36:58
123,116,594
0
0
null
null
null
null
UTF-8
Python
false
false
4,314
py
p2.py
import numpy as np import matplotlib.pyplot as plt w = 1000 h = 1000 def normalize(x): x /= np.linalg.norm(x) return x def intersect_sphere(O, D, S, R): # Return the distance from O to the intersection of the ray (O, D) with the # sphere (S, R), or +inf if there is no intersection. # O and S are ...
2d35757e1b45e1a4fce0aa73376c2fc7beb74460
04227377984a4072421ebbaf892457dc4517d661
/train.py
c000b87dce38b555be1c1198144dca1034031f6b
[]
no_license
ykgautam09/Emotion_Detection_audio
2ba4ce7f3a0258bb402fe43bcbed46b217e5313e
eb3f6df725d0f52de8a515a5e8f437dde3d9a132
refs/heads/master
2022-12-28T08:17:44.140958
2020-10-09T18:25:46
2020-10-09T18:25:46
302,646,173
0
0
null
null
null
null
UTF-8
Python
false
false
3,398
py
train.py
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import tensorflow.keras as keras DATA_PATH = './cleaned_data.csv' LEARNING_RATE = 0.0001 EPOCHS = 20 BATCH_SIZE = 40 SAVE_MODEL_PATH = './er_model.h5' OUTPUT_KEYWORD = 6 MFCC_PATH='./cleaned_mfcc_feature.npy' def load_dataset...
0379dacbc31aeb74aa14c17e09784b161f372417
ee3449d49f7a75b11a92496d3b5a340a399fc131
/Classification/code/util/data_utils.py
c9f6fb97e17c3a8dc99bfd71d6ef199a0b48c711
[]
no_license
uhh-lt/comparative
61916d1f716140c261443960458e130ab33a515d
642c332200fba544b8eb889358e4cc5cb908b65e
refs/heads/master
2022-02-20T08:34:03.795476
2019-06-06T14:22:15
2019-06-06T14:22:15
101,860,619
5
1
null
null
null
null
UTF-8
Python
false
false
1,749
py
data_utils.py
import collections import pandas as pd from bs4 import BeautifulSoup from pandas import DataFrame as df from sklearn.model_selection import StratifiedKFold from sklearn.utils import shuffle CUE_WORDS_WORSE = ["worse", "harder", "slower", "poorly", "uglier", "poorer", "lousy", "nastier", "inferior", ...
7ed86b2a68e93fcbb04e6dd52fa0fe34e1d4ce79
588a471a7d2ed30b83fca077d74c6620ab7ab1eb
/decrypt_chrome_cookie.py
54f2651f61c85d4d1d47eba79248e7946f4d21b2
[]
no_license
richardsonjf/decrypt-chrome-cookie
55e8b00ea325cec6061f5d2ac4bf0474e7d70965
23e0a60939bc3c0264657a94352bee4044fe8589
refs/heads/master
2020-09-24T02:18:41.741300
2019-11-28T14:35:21
2019-11-28T14:35:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
804
py
decrypt_chrome_cookie.py
from os import getenv from shutil import copyfile import sqlite3 import win32crypt original_cookie = getenv("LOCALAPPDATA") + "/Google/Chrome/User Data/Default/Cookies" copyfile(original_cookie, './DecryptedCookies') with sqlite3.connect('./DecryptedCookies') as conn: cursor = conn.cursor() cursor.e...
7c004e3fb325e5be1cfa54ff9bdc1c8f79ec7805
ddcae21b0380c10b3c693d638ab2bb0c344b094d
/Outros/Atividades Guanabara/dolarReal.py
0e0759a2196c84d73b403a9932d7a28c7044087d
[]
no_license
aka-luana/AulaEntra21_Luana
6dc18f7ceeedec96f63305f77ec4dfdf719b158b
e8222a410a5dcf7174aba4d08bcf8f46d7be5376
refs/heads/master
2023-03-26T13:42:08.217019
2021-03-11T01:16:47
2021-03-11T01:16:47
287,594,094
0
1
null
null
null
null
UTF-8
Python
false
false
142
py
dolarReal.py
dinheiro = float(input("Quanto você tem na carteira? R$")) print("Com {:.2f} você pode comprar US${:.2f}".format(dinheiro, dinheiro/3.27))
0782fc3312fd8ccca50920a72bad0de93f1be020
0eceb2020cdf6ae9c20b441774eef263e68bd81c
/main.py
b6ab42b4a710c22d2ea79941c9ea463f25b065b3
[ "MIT" ]
permissive
raember/ARTalk
49bc7d2f99c931b50b733ce01c523c648285496f
aadc39928333ed2b09be37f1ff50ae1f9d92254b
refs/heads/master
2020-05-07T13:49:31.173051
2019-04-10T15:32:14
2019-04-10T15:32:14
180,565,047
0
0
null
null
null
null
UTF-8
Python
false
false
341
py
main.py
from artalk.parser import Parser if __name__ == '__main__': with open('in.txt', 'r') as codefile: content = codefile.read() for code in Parser().parse(content): print() print(f"[{code.title}]") for block in code.blocks: print(f"{block.first} {block.second}: {block.to...
5d2e214b2bbeddaa521f95236cb237770389defc
5dfe4b55c73a627588f9a93a9c7a9dd3651dd2a5
/bayes_opt_qa/models/constrastive/__init__.py
87542feec96fd90e021cb2358dbccdf74aa07883
[]
no_license
ai-systems/explanationlp
0b4c0422876f3115c4198f62b77a2f9dc4ab152e
152e2a259544b49a1290975804e07b72ea68892a
refs/heads/master
2023-04-26T05:36:45.744541
2021-05-27T11:06:35
2021-05-27T11:06:35
371,336,080
0
0
null
null
null
null
UTF-8
Python
false
false
48
py
__init__.py
from .constrastive_model import ContrastiveModel
ba24e280637fa87943e86c1244734a8d6a983a25
82d07aaad8706dfc458ffa22d2b4dce89de162b4
/变量**变量&次方计算.py
261f5c6f789e0c63c5683f7297f2c89532457f70
[]
no_license
czfnice/Python-science-calc
d8e2a2a5a7f7ac84d1cd33b21006b7da679f3d41
12e27525194efbf07b756bc38b648ed0071f57cd
refs/heads/master
2020-12-26T17:56:22.874175
2020-04-11T05:24:35
2020-04-11T05:24:35
237,586,920
0
0
null
null
null
null
UTF-8
Python
false
false
198
py
变量**变量&次方计算.py
c = input('请输入一个变量') d =input('请输入上面变量所要计算的次方') b = int(d) a = int(c) if a > 0: print(a**b) elif a < 0: print(a**b) else:print('请输入非零数')
cb590a8d910674264447084c276d54b42f8bb738
c10e20bb9c175493a9b448804a9e0bac654ad68d
/train_fault_type.py
888f9c639fa8444114154636456399d7da32759e
[]
no_license
xiaonanchong/anjie_elevator
8ab5a5e58f91bac5cae92992a3e04cf3abe45eac
f397147876e95bdfb604b36810b594e40c719a80
refs/heads/master
2020-08-23T00:19:34.405838
2019-10-29T09:29:07
2019-10-29T09:29:07
216,505,209
0
0
null
null
null
null
UTF-8
Python
false
false
562
py
train_fault_type.py
import utilities x1, y1 = utilities.form_training_data([105,106,107,108, 169,170,171,172, 209,210,211,212, 278,279,280,281, 274,275,276,277, 270,271,272,273], [1,0,0]) x2, y2 = utilities.form_training_data([118,119,120,121, 185,186,187,188, 222,223,224,225, 282,283,284,285, 286,287,288,289, 290,291,292,293], [1,0,0])...
3a37b3ac6661830dad860e1347c429e100fdc8ab
3e7a8c5630de986a4d02011b1bd368c041f3f477
/keras/基于keras实现对bert模型的蒸馏.py
ba9ef67ba1749256fbaa07606ca29c07315d8e7f
[]
no_license
gswyhq/hello-world
b9ef715f80d2b39c8efaa1aa2eb18a6257e26218
b1ab053a05e1f8c63b8b04d6904a3cdca450bd9f
refs/heads/master
2023-05-26T13:15:36.788620
2023-05-19T13:38:50
2023-05-19T13:38:50
158,821,148
16
6
null
2021-03-19T02:59:48
2018-11-23T11:04:43
Python
UTF-8
Python
false
false
14,049
py
基于keras实现对bert模型的蒸馏.py
# -*- coding: utf-8 -*- # @Date : 2020/9/8 # @Author : mingming.xu # @Email : xv44586@gmail.com # @File : distilling_knowledge_bert.py """ 通过利用大模型(或ensemble多个模型)得到一个 Teacher Model,利用 Teacher Model 来对数据生成 soften labels, 然后通过一个小模型,同时学习 Ground True 和 soften label,来做知识蒸馏。 在生成 soften labels 时,有一个超参数 Temperature,该参数...
93c7c95dfb1b3fe3219dc5f9d782ecf13429df0f
821ef216eca3ecef983271ce70d0de943cea1a0b
/pajbot/managers/discord_bot.py
ce49a18eb7e7120e955d13b421f956860ffcf5ae
[ "MIT" ]
permissive
sgaweda/troybot
3ec3d1607d05756feebe45a8b5d4c3517e093354
7153c0ad387e31de57c71172893fd92c85259d1b
refs/heads/master
2021-01-06T08:24:14.766210
2020-02-17T17:30:36
2020-02-17T17:30:36
241,260,556
0
0
MIT
2020-02-18T03:09:00
2020-02-18T03:08:59
null
UTF-8
Python
false
false
22,077
py
discord_bot.py
import logging from pajbot.managers.db import DBManager from pajbot import utils from pajbot.models.user_connection import UserConnections from pajbot.models.user import User import discord import asyncio import json import threading from datetime import datetime, timedelta log = logging.getLogger("pajbot") class Co...
ccd4856a530cfb78c4a5133ef65775f9bd0f7ee9
d855ef7752584f7c852e25cf8d9d39eb9898bcac
/day19/app.py
57e8ab716540b598cadc61c8e16445b30d474a1a
[]
no_license
rikjansen-hu/aoc17
296e8832a917be279a8e3665d51c30060e2177f4
a81fea6888e9fb9d8f1a41d9fdf25efd2613f5b5
refs/heads/master
2021-09-01T04:00:51.030194
2017-12-24T16:26:12
2017-12-24T16:26:12
115,137,676
0
0
null
null
null
null
UTF-8
Python
false
false
948
py
app.py
import numpy as np INPUT_FILE_NAME = 'input' START_ROW = 0 START_DIR = np.array([1, 0]) START_SYMBOL = '|' JUNCTION_SYMBOL = '+' SPACE_SYMBOL = ' ' def turn_left(x): return np.array([-x[1], x[0]]) def turn_right(x): return np.array([ x[1], -x[0]]) def symbol(grid, x): return gr...
4783cd4ba96b9695b89ff354b112a801b7d7d1c0
76ec76a8e93d9f2e5458e80ab13d2dd16e2738fc
/grade_submit.py
0057166e60df253ab98c86a278b3316525f1f230
[]
no_license
cgoliver/pyCourses
aa9bdc7a0345dd0ee9616342745de7a25ff21d13
fb8608f70b2d317866381719ca7b8537e68404d8
refs/heads/master
2021-01-22T06:23:36.562708
2017-08-24T22:04:26
2017-08-24T22:04:26
81,757,581
0
0
null
null
null
null
UTF-8
Python
false
false
5,682
py
grade_submit.py
import re import time import sys import getpass import argparse import datetime import cPickle as pickle from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.suppor...
d88b9efd5f9d973490f13704b6e14ef90c1f982c
8924af2c790fb1793ac82920c341acf669bd6185
/Yank/__init__.py
3bce4befa58c29540422e47af3fdc16ecc8395d6
[ "MIT" ]
permissive
jeffcomer/yank
679a43cca8f0f9e399872da5f0ccd5ff71f9a94c
cb2bb72dd25939f1ebeccd5ab4ec0ab8123d8175
refs/heads/master
2020-12-31T10:43:52.758815
2020-04-23T00:34:07
2020-04-23T00:34:07
239,005,654
0
0
MIT
2020-02-07T19:19:28
2020-02-07T19:19:27
null
UTF-8
Python
false
false
308
py
__init__.py
#!/usr/local/bin/env python """ YANK """ # Define global version. from . import version # Needed for yank 3.X. # Self module imports from . import utils from . import restraints from . import pipeline from . import experiment from .yank import Topography, AlchemicalPhase __version__ = version.version
94428050e5ac5f136eb00d57980d189d99d29439
7f1680e8ba04c10d09f7018350a28235bc574bf5
/canvas/survey.py
6f5c39199a085de020c4cd2ea3b749a27c2cc9be
[]
no_license
atafliovich/scripts
26ca05c05d4bf685c5cc566c9da7b9e2c9a542c4
ed80fd4240c383cafc6efd8d640d4e518f565290
refs/heads/master
2023-05-05T23:06:33.078223
2021-05-30T05:56:45
2021-05-30T05:56:45
281,219,912
0
0
null
null
null
null
UTF-8
Python
false
false
7,403
py
survey.py
''' Full specs for Quiz: https://canvas.instructure.com/doc/api/quizzes.html Full specs for QuizQuestion: https://canvas.instructure.com/doc/api/quiz_questions.html#method.quizzes/quiz_questions.create ''' from canvasapi import Canvas API_URL = "https://q.utoronto.ca" # TODO: Go to https://q.utoronto.ca/profile/se...
f6dcb33b9027dab8893eb0385b6dc1552acaf894
52b5773617a1b972a905de4d692540d26ff74926
/.history/Roman_20200805112208.py
0d759e593f19bff2ee08f37f167687d8183d7361
[]
no_license
MaryanneNjeri/pythonModules
56f54bf098ae58ea069bf33f11ae94fa8eedcabc
f4e56b1e4dda2349267af634a46f6b9df6686020
refs/heads/master
2022-12-16T02:59:19.896129
2020-09-11T12:05:22
2020-09-11T12:05:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
518
py
Roman_20200805112208.py
def romanToInt(param): totalValue = 0 romans = {'I':1,'V':5,'X':10,'L':50,'C':100,'D':500,'M':1000} for i in range(len(param)-1): if i+1 == len(param)-1: totalValue += romans[param[i+1]] if romans[param[i]] < romans[param[i+1]]: totalValue -= romans[param[i]] ...
4fc8f95d88aed3137b57b76b12e226d4ec622d63
2e7cd990cb055afb1d720d7e17e0590f98a8df8a
/Lecture74.py
97f4f6ec2121f149af9a3def7526a374b2477f5d
[]
no_license
parnoupat/CP3-Parnoupat-Narasuppharath
4695335520886a77628ba7852531e8311b39aa17
1a0fe92102461de6ca05d6a005b187f3a441de49
refs/heads/main
2023-03-29T08:35:36.340787
2021-03-31T18:42:29
2021-03-31T18:42:29
350,069,812
0
0
null
null
null
null
UTF-8
Python
false
false
163
py
Lecture74.py
userInput = int(input("type number of your fruit : ")) myFruits = set() while len(myFruits) < userInput : myFruits.add(input("Fruit : ")) print(myFruits)
de1c5cbd7fe082e290ca3297d3d0909c2fc28264
79aaa3d38c0296d0c0572fd77bfbe24bb2ee4adb
/radial_slice.py
eb0664ce76a305fd62a63fd7563e3abdcc25e858
[]
no_license
ixicrom/droplets
809cb3e939211b6a50acd71a47468707e01661f3
c0e52a0a1be2aed8ad321430feee6c4c3b510a85
refs/heads/master
2021-07-20T06:01:24.962827
2021-02-11T16:39:04
2021-02-11T16:39:04
241,429,544
0
0
null
null
null
null
UTF-8
Python
false
false
2,130
py
radial_slice.py
from skimage import io import numpy as np import math import pandas as pd import matplotlib.pyplot as pl #read the image file into an array imFile = '/Volumes/PhD/DavidData/Emily/2014_6_2-T2M_6_63xoil_1.lsm' imArr = io.imread(imFile, plugin = 'tifffile') imArr.shape im1 = imArr[0][0][:,:,0] pl.imshow(im1) #initialise ...
a5d116d8a84839aaa58da666fd7a4ea1b4ed63f8
2b43b10fb1eef1a10a45e212f786ae7998b2ff46
/scorecardSummary.py
a41e472670db87000a2dc68d5708b13c51c14dd2
[]
no_license
nuschandra/cricket-content
9e7998dedd796d568706b77c6cfd536d9090eaba
b21e928a7c2e8f3eb79c1d7a20b38865ae6ba0ee
refs/heads/master
2021-05-05T02:25:18.437433
2017-09-05T01:56:33
2017-09-05T01:56:33
119,739,261
0
0
null
null
null
null
UTF-8
Python
false
false
2,612
py
scorecardSummary.py
def batsmanSummary(currentBatsmen,batsmanName,batsmanRuns,batsmanStrikeRate,index): name=[None]*2 batsmanRunsScored=[None]*2 batsmanBallsFaced=[None]*2 strikeRate=[None]*2 for idx,player in enumerate(currentBatsmen): runs=player.findNext('span').findNext('span').findNext('span').findNext('span') name[idx]=play...
0fa6aa53519dc5d8ea0586c7c4df806ea4837ab8
25e238c92f8a90859ee18b9a8f44463edfa82b03
/clinical/views.py
e88ab78c68d6089d464efaeb0c1e407ba1383eff
[]
no_license
kalolad1/genome-project
a150799f4e7ea531d93467f472b708431076274d
56b56b5d4aa645e9d13df8afd71d4a0f6b06a036
refs/heads/master
2021-06-14T13:41:37.621588
2021-03-26T20:34:11
2021-03-26T20:34:11
160,967,416
0
0
null
null
null
null
UTF-8
Python
false
false
1,878
py
views.py
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .models import Patient, HealthEncounter @login_required def home(request): """ This view sends the user home with all of their stored patients. """ # Retrieves all of the users patients from th...
4e8f1a608f3e7e5b56af7f5bcba786988530fc12
fb39c7e3c973a45cf0c00519c9b8b57a1ffe0886
/ICS4U/Recursion/SumDigits/recursive_sum_digits.py
9cda1a1f8db4ac9100ec07a4b942617213769f46
[]
no_license
phlergm/ICS4U
87f3d75c67e26cc5e89d2b48c3a5dece8bfd5f99
c709605b69f79b92bfa26378c489ceebfeaeb56b
refs/heads/master
2020-07-06T01:08:19.368562
2019-08-17T13:53:50
2019-08-17T13:53:50
202,841,243
0
0
null
null
null
null
UTF-8
Python
false
false
326
py
recursive_sum_digits.py
number_sum = 0 def sum_digits(x): global number_sum if int(x/10) == 0: number_sum += x return number_sum if x <= 0: return -1 else: number_sum += (x % 10) x = int(x/10) return sum_digits(x) number = int(input("whta nuber \n")) print(sum_digits(num...
9f3954135eec6092989c32b9b7d9b171b95bfeee
31e64391cc8b6133368b42ceb3130127908147a5
/AlgoSpecProject/Course3/Week2/acyclicity/__main__.py
7467c1dc305352281dfd90e67387c8bb4748b506
[]
no_license
evdokp/AlgoSpec
287722bba9b2481629fd2e863295faf5f7e9a8ce
564f5f83acab55538a69d1a3aec6defbd93f793e
refs/heads/master
2020-04-07T03:09:52.894687
2018-08-23T13:05:33
2018-08-23T13:05:33
52,036,944
0
0
null
null
null
null
UTF-8
Python
false
false
1,002
py
__main__.py
#Uses python3 import sys def explore(v, graph, visited, origin): visited[v] = True result = False for w in graph[v]: if w == origin: result = True if result: return result if not visited[w]: result = explore(w, graph, visited, origin) ...
35f1d131e8e033c674a7a3b98adb3441a7945b86
e1e9ebf13a3b81537cb510c7c398ebc9f8b15472
/round1_rank2/code/main.py
dfb2a98e52a4a884551b58c714875676fe8c3f13
[]
no_license
a876571186/TianChi_Meinian
e3f1636751aeecc72fc20f7ae4e6479810303886
a71a17cbeab85f266bb9fd162963f50afa2fa47e
refs/heads/master
2021-10-08T17:06:24.903106
2018-12-15T07:57:33
2018-12-15T07:57:33
null
0
0
null
null
null
null
UTF-8
Python
false
false
29,203
py
main.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2018/5/7 0007 下午 13:02 # @Author : Juzphy import time import pandas as pd import lightgbm as lgb import numpy as np import re from collections import Iterable from sklearn.model_selection import KFold from sklearn.metrics import classification_report import w...
258d35ea742d0d0a07010dc1141d1c963c1bcf0a
8e5d6eb1a2f11d4d25eacb9b19e674727e7adfd1
/phd_satellite_trajectory/perigee_raising/plot_orbit.py
a5f2594c50aa572082634a57aa630fbf8b45b108
[ "Apache-2.0" ]
permissive
zampanteymedio/phd-satellite-trajectory-public
4792d4ccd18957137bf6674a2df99d9153802a20
d8c1d2154a413f8c010bfb944cedbd4676e3f842
refs/heads/master
2023-03-22T02:27:08.685402
2021-03-07T16:21:29
2021-03-07T16:21:29
338,893,438
3
1
null
null
null
null
UTF-8
Python
false
false
3,298
py
plot_orbit.py
import argparse import sys import matplotlib.image as mpimg import gym import matplotlib.pyplot as plt import numpy as np from stable_baselines3 import A2C from stable_baselines3.common.distributions import SquashedDiagGaussianDistribution from stable_baselines3.common.evaluation import evaluate_policy from stable_ba...
a24f696a6aab602453b4d6bcf2798ef5dcd72e6b
a3b306df800059a5b74975793251a28b8a5f49c7
/Graphs/LX-2/molecule_otsu = False/BioImageXD-1.0/ITK/lib/InsightToolkit/WrapITK/lib/itkShapeRelabelImageFilterPython.py
0a0d95af7f85e12954d3d9015672320fb242a2fe
[]
no_license
giacomo21/Image-analysis
dc17ba2b6eb53f48963fad931568576fda4e1349
ea8bafa073de5090bd8f83fb4f5ca16669d0211f
refs/heads/master
2016-09-06T21:42:13.530256
2013-07-22T09:35:56
2013-07-22T09:35:56
11,384,784
1
1
null
null
null
null
UTF-8
Python
false
false
44,234
py
itkShapeRelabelImageFilterPython.py
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3,0,0): new_instancemethod = lambda func, inst, cls: _itkShapeR...
c7aa3fb73ab0840bedab3e14d56ff9fa0c00a9bc
3a760e62a47cde919ca8f357656ffeac06b34096
/Main.py
723631d1c64a5e6bfb26730bdcf0b89c43e25206
[]
no_license
ScriptProdigy/framework
1a748812bcafd58ed4adb0abac02b9cb26f794b0
c4ace6cb87db04a28b3daf6c498299f0b7562daf
refs/heads/master
2021-01-15T19:44:53.662240
2012-05-13T00:22:23
2012-05-13T00:22:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
415
py
Main.py
import sys from PyQt4 import QtGui from includes import PluginFramework class Main: def __init__(self): self.app = QtGui.QApplication(sys.argv) self.plugins = PluginFramework.PluginFramework() while(True): pass def run(self): self.app.exec_() if(__name__ == "...
de0f9496a5304822d64201844c1f84578c2eb8de
3de2ee5452e622a20acfac60bfc818080122ff91
/other_setting/new-concat/layer_utils/focal_loss.py
cf4fe0d4d9155de16ffaea09944547efd2e93433
[ "MIT" ]
permissive
Zhiwei-Chen/CCnet_Tensorflow
af9d04259fd383ad3d653bff91c028ca83defaca
34df9a7bc82802a8eeb5d8e8e11a0409052b1dde
refs/heads/master
2023-03-17T17:20:12.976757
2018-06-01T16:54:50
2018-06-01T16:54:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,842
py
focal_loss.py
import tensorflow as tf import numpy as np class SigmoidFocalClassificationLoss(): """Sigmoid focal cross entropy loss. Focal loss down-weights well classified examples and focusses on the hard examples. See https://arxiv.org/pdf/1708.02002.pdf for the loss definition. """ def __init__(self, anchorwise_outp...
831881d5a394b0c1d3e89a857a0d64515a85d468
da3eaf98ed94de712cd32a704c528328c368e771
/socialmedia/posts/views.py
2e71dfae107d8134dd01da2e6e416a1f4bff3e24
[]
no_license
pavan709/socialmedia
6323a3836a30100fefa82d1b1297710b1a9b8dfa
fb3a0188c9173f466eb8aeda2f8634c56fe993fc
refs/heads/main
2023-08-25T11:55:13.731373
2021-10-23T11:50:30
2021-10-23T11:50:30
396,027,868
0
0
null
null
null
null
UTF-8
Python
false
false
3,336
py
views.py
from django.shortcuts import render, get_object_or_404 from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.contrib import messages from django.http import Http404 from django.views import generic from braces.views import SelectRelatedMixin, PrefetchRelatedMixin f...
4a2e26a39d31cf404a2560e62ff9864ce13afff0
e39cd9468a2860478b646f9a709dbc3dcd241244
/main_temp.py
ce9acf6412da8c3326d04f96bad1a78c43e27f1a
[]
no_license
kasperjo/Mixed-Observabe-RRT-Single-Agent-
dccd06561d29fb4fbbf7689529c487f08fb0a006
633a496cd969578eb0cbba8c68a8de59b053c2f2
refs/heads/main
2023-07-09T14:06:05.224239
2021-08-17T20:06:34
2021-08-17T20:06:34
396,881,373
0
0
null
null
null
null
UTF-8
Python
false
false
4,069
py
main_temp.py
from Version12_generalizedPlan_oneAgent import * from helper_functions import * from matplotlib import pyplot as plt save_plan = True # # ================================================================= ### Root RRT ### # Parameters x0 = Node(np.array([0, 0])) # Start point Xi = [[-5, 5], [0, 5]] # Constraint set...
5567f8685cd8373d85467c9b987e9f9cd166af5d
cbc4782342ad277b9f8cda805a57854ba3468edb
/SVDBias/SVDBias-surprise-kb.py
ef564569ec208fa6574744ba4ee69ee684c25021
[]
no_license
qingkongmengnuan/BayesianRS
f7f1cdc7ca6336e3d18e98e441b65aa767846005
e440f6bb26bdc9485d2ae15826c0900b7457b92d
refs/heads/master
2022-11-30T20:00:20.305454
2020-08-11T08:25:11
2020-08-11T08:25:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,017
py
SVDBias-surprise-kb.py
# coding:utf-8 ''' @author: Jason.F @data: 2019.07.13 @function: Implementing SVDBias with surprise lirbray Dataset: KnowledgeBase-cc Evaluating by hitradio,ndcg ''' import numpy as np import pandas as pd import math from collections import defaultdict import heapq import surprise ...
cfc70aa28527b8c34dd914d0155351c06c129306
7eaea2cafacc6b31c1786632a7894b24b2758e4b
/test/boot.py
61833ea5f45b86209854fc6a4406c6e98d04312e
[]
no_license
BBPL/IoT
801b3d45aac0a820a0f043e1e6b72c9ac3012f94
f6cf9bcf4caf68ebb05757fe3d9374925e54dfac
refs/heads/master
2020-03-29T10:11:42.635307
2018-09-27T18:03:27
2018-09-27T18:03:27
149,793,578
0
0
null
null
null
null
UTF-8
Python
false
false
128
py
boot.py
# boot.py -- run on boot-up from network import WLAN import pycom pycom.heartbeat(False) pycom.rgbled(0x00ff00) wlan = WLAN()
d2c904c7c5365c7c713e96dbbf47d989725203b2
45966bef34b32cdfd9539b06c0e7dd92a42ba52a
/lessons/first/dictionaries.py
52ffc0698ecddcc1e6b1391ef4891c04bf54c4dd
[]
no_license
gfhack/nanodegree-data-science-fundamentals
1fa072a3e966b2b572cafe2f5e2771de43ae2849
f84ab6a1e6a5660bf26a0416475519c1cd2889bf
refs/heads/master
2020-03-06T20:31:06.276049
2018-04-22T19:13:59
2018-04-22T19:13:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
494
py
dictionaries.py
elements = {'hydrogen': 1, 'helium': 2, 'carbon': 6} elements['lithium'] = 3 print(elements['carbon']) print('mithril' in elements) print('adamantium' not in elements) # quiz population = { 'Shanghai': 17.8, 'Istanbul': 13.3, 'Karachi': 13.0, 'Mumbai': 12.5 } print(population) test = {1: 'vai', 1.1...
af4d6fb2b148eb3c94a1e83d6de949dd27e54d03
31858401fa4810cec058318074e051bd46b2fa02
/Map.py
d486226dd957bbb0972c1042a7a2ccb8f26427f0
[]
no_license
Ethan-Hill/Ember-Dragon
49a506072720b51e71e01c66a53665bd8db6b77e
0c649c4a2f5407a41a32ff9507becedb23638007
refs/heads/main
2023-02-13T03:44:03.435932
2021-01-13T02:47:18
2021-01-13T02:47:18
305,678,132
0
0
null
null
null
null
UTF-8
Python
false
false
7,129
py
Map.py
import inquirer import os import SamTheSmith import Village import Cave import End from termcolor import colored xLimit = 10 yLimit = 10 xPos = 1 yPos = 1 SamVisited = False PeterVisited = False CaveVisited = False EndVisited = False VillagePeopleX = 1 VillagePeopleY = 3 SamTheSmithX = 1 SamTheSmithY = 6 CaveX = 7...
bafee7af92ffd0cd440fd1fa257ccc4069910f90
1b33b08b5afeeff3f6df6135129840ca69023549
/src/euler/Problem20.py
8ab0af1f5ba24b9815e7f89d589837eef3cf441b
[]
no_license
marijanedjalkova/exercises
6945a8fec5d050f30a3d099a862c9d084e22fb98
2a8a300d02454e0a7f849290ee73bf6172a0d437
refs/heads/master
2021-03-22T00:36:29.104103
2019-09-23T19:20:38
2019-09-23T19:20:38
118,827,736
0
0
null
null
null
null
UTF-8
Python
false
false
336
py
Problem20.py
from math import factorial def find_digit_sum(number): res = 0 num = number while num > 0: res += num % 10 num = num // 10 return res def find_factorial_digit_sum(number): fct = factorial(number) return find_digit_sum(fct) if __name__ == "__main__": print(find_factorial...
b3bab00cdfa44fade8cb99803e4424cd3e8b6c97
ae9fe6d041ea393411902eb270a6da7d5f3f0f33
/programs/smoothing.py
88000df1aea1948b2dab6280a1180609de2da482
[]
no_license
miradavidson/mTierpsy
0ba72a64d387e2e4057f02005b442b1ee4534dcb
e95331014a20f5947d20d86912cf295d772ddd65
refs/heads/master
2022-12-26T11:49:08.377047
2020-09-24T09:33:41
2020-09-24T09:33:41
243,050,147
0
0
null
null
null
null
UTF-8
Python
false
false
2,228
py
smoothing.py
#!/usr/bin/env python """ Smoothing of trajectories """ import numpy as np import pandas as pd def moving_average(curve, radius): """ calculate moving average to smoothen curve """ window_size = 2 * radius + 1 # Define the filter f = np.ones(window_size)/window_size # Add paddi...
d063203c131374ca8ca38a6c46efc4fcc2c867c6
cff075c0bc5aeddea984b714283cbc26f5157b64
/bert/bert_did.py
e02030cc306e52cbb39c0f36646180ad54d8a509
[]
no_license
Karexar/gsw_dialect_identification
ab21cdfed4ed2887d78a01f64ac86edabc513186
00b2a35b9dc6845b08258e18b8a2906212db646e
refs/heads/master
2022-12-11T01:11:09.602080
2020-09-07T14:29:12
2020-09-07T14:29:12
288,726,749
0
0
null
null
null
null
UTF-8
Python
false
false
31,344
py
bert_did.py
import torch import argparse from tqdm import tqdm from transformers import BertForSequenceClassification as BertForSeqClass from transformers import AdamW, BertConfig from transformers import get_linear_schedule_with_warmup from sklearn.metrics import accuracy_score, recall_score, f1_score from sklearn.metrics import ...
4be0d357836ecfe73d4ec11017002ad93a201fb6
b0b57851170461296fdaea31b9a1f229501e66f1
/MainDriver/CSVCreator/CreateSpotCSVDataFile.py
b6449e587271322193b17c0430be038ab00ccdde
[ "MIT" ]
permissive
puchchi/stock_scraper_latest
234d0a91a7b1245f594e487dd33d4783159e8ec6
09abfa12edbec0d6a65915db37ad3ad1b25fa092
refs/heads/master
2021-09-03T17:29:44.486380
2018-01-10T17:48:01
2018-01-10T17:48:01
105,397,399
0
0
null
null
null
null
UTF-8
Python
false
false
1,590
py
CreateSpotCSVDataFile.py
import sys from os import path sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) sys.path.append( path.dirname( path.abspath(__file__) ) ) import MySQLdb import csv from scraper import utility class kCreateSpotCSVDataFile(): def __init__(self, tableName, startDate, endDate, filename): ...
a66130a6e181917f99f735ccec65fd44f64ffb14
119cc64606216c09fe9c4bfe299c7e2efd01b216
/group_by_anagram.py
8d959b15bbe73085160f065383128771de1bdf79
[]
no_license
pijel/assorted-algos
e75cb75d4374c8aafe84fe943aab3312df79f95e
084f3fe3f2130066ac427ff6741e05e8b39ca044
refs/heads/master
2020-03-07T01:51:27.306145
2018-09-20T20:31:44
2018-09-20T20:31:44
127,194,757
1
0
null
null
null
null
UTF-8
Python
false
false
579
py
group_by_anagram.py
class Solution: def groupAnagrams(self, strs): """ :type strs: List[str] :rtype: List[List[str]] """ return group(strs) def hash_function(s): string = "" for c in sorted(s): string+=c return string def group(strs): dictionary = {} for i i...
ee90f00b0bdaf5b303b7b33fdbee461ec8839715
ae94deeb96ea1259febb33d6016241c7d921c2a4
/S3_CompareTest/__init__.py
4c9218de059164ee80ed7eb017dfe88bb4939d44
[]
no_license
RudySM/Behave-python
1333fc0600d792099606fa35cf04f439713f0cb6
aa7cb3ac63995b45fe3f0e956e8d4518e2240ca4
refs/heads/master
2021-05-04T10:34:08.567813
2017-03-17T20:57:21
2017-03-17T20:57:21
47,710,574
0
0
null
null
null
null
UTF-8
Python
false
false
27
py
__init__.py
__author__ = 'rsantamaria'
271a0adb9323fd4f64fcf8098981e1290d787204
f7983f4b74cb9fcd6154007f3b11b34b9ad11ede
/urbansim/gridcell/is_vacant_land.py
99cfaac15e0264cc46126f85fe58ac79e60347bb
[]
no_license
psrc/urbansim
7d2fe615d7c22db839c283304067fce746fdb512
c392d15b35aa1d47bbc185ed76314f8e6dd9f92f
refs/heads/master
2023-06-09T16:55:50.415783
2023-05-11T19:24:34
2023-05-11T19:24:34
19,719,383
4
1
null
null
null
null
UTF-8
Python
false
false
1,773
py
is_vacant_land.py
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from urbansim.functions import attribute_label from numpy import logical_not class is_vacant_lan...
b29310a7c243880a5b8650c4677f68fd6eef104a
f54abdbe2eac010af2141d040a56c9bbf09fbd1d
/src/GpioInputMonitor.py
f2d428c9a9cffc0871e460fca74a028def86b097
[ "MIT" ]
permissive
codedevloper/attify-badge
a8c8fc3bb71d3dc94be9262ea263af468281ce27
4555a0767bc056012906dbde507c34279bd2c6d6
refs/heads/master
2021-01-18T20:24:48.052229
2017-03-30T21:35:49
2017-03-30T21:35:49
86,965,390
1
0
null
2017-04-02T05:24:43
2017-04-02T05:24:43
null
UTF-8
Python
false
false
1,605
py
GpioInputMonitor.py
from PyQt4 import QtCore, QtGui from PyQt4.QtCore import SIGNAL from UI.Gpio import Ui_Form from Threads import InputMonitorThread class IPMonitor(QtGui.QWidget, Ui_Form): def __init__(self,ft232h): self.ft232h=ft232h QtGui.QWidget.__init__(self) self.setupUi(self) pin_set=[] ...
da3bd3b212db390d9e84490eb7ffc78e231d61c2
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03001/s756781903.py
e23169a9b9336cb7fcd32fc42c1c5e7e765f2879
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
128
py
s756781903.py
w,h,x,y = map(int,input().split()) ans = str(w*h/2) if w==x*2 and h==y*2: ans = ans+" 1" else: ans = ans+" 0" print(ans)
1536c878491ad45e8de9038087646b3545ea4129
3909d3cde5c8b8b97c8eb791b0939ed976359c1d
/goodstuff.py
3c5c839b275e32eebe882a6a4251b3097f631732
[]
no_license
cgcummings/dataVisual
2fe7dfe9227ecd3a474f7e2fbf7b3f2f56787849
71dd6a53be40518426aae10de7c15d4134f3f8c4
refs/heads/master
2020-03-07T02:21:17.803782
2018-10-29T17:13:13
2018-10-29T17:13:13
127,206,866
0
0
null
null
null
null
UTF-8
Python
false
false
1,746
py
goodstuff.py
from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np import scipy.constants as sp fig = plt.figure() ax = fig.gca(projection='3d') a = 0.22361 b = 1.6 sigma =41.88 const = sigma / (4.0 * np.pi * sp.epsilon_0) x, y, z = np.meshgrid(np.arange(0.01, a, .1), np...
20f223f02aa583f2c241f4f4c96153bfbbd93eb0
478fca63f418effc466e083d2646c6fa40acbf13
/marketdb/apps.py
012038a5f9e51dbb69d563a969024b110b8e61eb
[]
no_license
BROOKLYNSMARKET/ecommerce
b9912e654ec47302ca7915bd9dc9a91ad374fa20
47c38e738f178d6bd73a611499e13da9c8f4061d
refs/heads/main
2023-02-01T20:05:27.563475
2020-12-15T00:23:50
2020-12-15T00:23:50
311,433,932
0
0
null
null
null
null
UTF-8
Python
false
false
91
py
apps.py
from django.apps import AppConfig class MarketdbConfig(AppConfig): name = 'marketdb'